Merge branch 'master' into ysq-dev-0811

temp
杨世强 1 year ago
commit 7a83d4e067

@ -7,14 +7,14 @@ VITE_PUBLIC_PATH = /
# 本地开发代理,可以解决跨域及多地址代理
# 如果接口地址匹配到则会转发到http://localhost:3000防止本地出现跨域问题
# 可以有多个,注意多个不能换行,否则代理将会失效
VITE_PROXY = [["/dev-api","http://localhost:8091/admin-api"],["/upload","http://localhost:48080/admin-api/infra/file/upload"]]
VITE_PROXY = [["/dev-api","http://192.168.0.162:8091/admin-api"],["/upload","http://192.168.0.162:8091/admin-api/infra/file/upload"]]
# VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
# 是否删除Console.log
VITE_DROP_CONSOLE = false
# 基础页面地址,例如 swagger 等页面
VITE_GLOB_BASE_URL = "http://localhost:8091"
VITE_GLOB_BASE_URL = "http://192.168.0.162:8091"
# 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = /dev-api

@ -0,0 +1,31 @@
import { defHttp } from '@/utils/http/axios'
// 查询客户信息列表
export function getCustomerPage(params) {
return defHttp.get({ url: '/xxjj/customer/page', params })
}
// 查询客户信息详情
export function getCustomer(id: number) {
return defHttp.get({ url: '/xxjj/customer/get?id=' + id })
}
// 新增客户信息
export function createCustomer(data) {
return defHttp.post({ url: '/xxjj/customer/create', data })
}
// 修改客户信息
export function updateCustomer(data) {
return defHttp.put({ url: '/xxjj/customer/update', data })
}
// 删除客户信息
export function deleteCustomer(id: number) {
return defHttp.delete({ url: '/xxjj/customer/delete?id=' + id })
}
// 导出客户信息 Excel
export function exportCustomer(params) {
return defHttp.download({ url: '/xxjj/customer/export-excel', params }, '客户信息.xls')
}

@ -1,18 +1,19 @@
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import type { UnwrapRef } from 'vue'
import {
ManOutlined,
UserOutlined,
WomanOutlined,
FieldTimeOutlined,
LeftOutlined, ManOutlined,
RightCircleFilled,
UserOutlined, WindowsFilled,
WomanOutlined,
} from '@ant-design/icons-vue'
//
const sex = ref<string>('保密')//
const value1 = ref<string>('a')
const message = ref<string>('全部信息')//
interface FormState {
name: string
delivery: boolean
@ -27,34 +28,56 @@ const formState: UnwrapRef<FormState> = reactive({
resource: '',
desc: '',
})
//
//
const open = ref<boolean>(false)
const confirmLoading = ref<boolean>(false)
function showModal() {
open.value = true
}
function handleOk() {
modalText.value = ''
confirmLoading.value = true
setTimeout(() => {
open.value = false
confirmLoading.value = false
}, 2000)
}
//antd
const state = reactive({
checked1: true,
})
//
const current = ref(6)//
//
const isVisible = ref(true)
const isVisible2 = ref(false)
const toggleBlocks: any = () => {
isVisible.value = !isVisible.value
isVisible2.value = !isVisible2.value
}
//antd^^^
const customButtonStyle = [ {
width:'80px',
textAlign:'center',
borderRadius: '50px',
margin:'0 10px',
}]
const messageStyle = [ {
color:'#6666',
width:'90px',
fontSize:'12px',
textAlign:'center',
borderRadius: '5px',
margin:'0 5px',
}]
const phoneStyle = [{
width:'60%',
}]
const changeStyle = [{
border:'none',
boxShadow: 'none',
@ -63,6 +86,54 @@ const changeStyle = [{
const labelCol = { style: { width: '100px' } }
const wrapperCol = { span: 20 }
const activeKey = ref('1')
//
const tablecolumns = [
{
name: '通知标题',
dataIndex: 'title',
key: 'title',
},
{
title: '状态',
dataIndex: 'state',
key: 'state',
},
{
title: '类型',
key: 'type',
dataIndex: 'type',
},
{
title: '发布时间',
key: 'time',
dataIndex: 'time',
},
]
const tabledata = [
{
key: '1',
title: '供应链管理平台正式上线',
state: '已读',
type:'产品信息',
time:'2023-08-22 22:31',
},
{
key: '2',
title: '供应链管理平台正式上线',
state: '已读',
type: '产品信息',
time:'2023-08-22 22:31',
}, {
key: '3',
title: '供应链管理平台正式上线',
state: '已读',
type: '产品信息',
time:'2023-08-22 22:31',
},
]
</script>
<template>
@ -71,6 +142,7 @@ const activeKey = ref('1')
default-active-tab-key
>
<a-tabs v-model:activeKey="activeKey" tab-position="left">
<!-- 第一部分 -->
<a-tab-pane key="1" tab="资料设置">
<div class="datum">
<div class="datumtop">
@ -108,8 +180,8 @@ const activeKey = ref('1')
<a-button :style="changeStyle" @click="showModal">
修改手机号
</a-button>
<a-modal v-model:open="open" title="修改手机号" :confirm-loading="confirmLoading" @ok="handleOk">
<div>
<a-modal v-model:open="open" title="修改手机号" centered :confirm-loading="confirmLoading" @ok="handleOk">
<div class="dialog">
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="原手机号码:">
<a-input v-model:value="value" placeholder="输入内容" />
@ -122,7 +194,6 @@ const activeKey = ref('1')
</a-button>
</div>
</a-form-item>
<a-form-item label="新手机号码:">
<a-input v-model:value="value" placeholder="输入新手机号" />
</a-form-item>
@ -144,21 +215,19 @@ const activeKey = ref('1')
<a-form-item label="性别:">
<div>
<div>
<a-radio-group v-model:value="value1">
<div>
<a-radio-group v-model:value="value1">
<a-radio-button :style="customButtonStyle" value="a">
男性<ManOutlined />
</a-radio-button>
<a-radio-button :style="customButtonStyle" value="b">
女性<WomanOutlined />
</a-radio-button>
<a-radio-button :style="customButtonStyle" value="c">
保密
</a-radio-button>
</a-radio-group>
</div>
</a-radio-group>
<div>
<a-radio-group v-model:value="sex">
<a-radio-button :style="customButtonStyle" value="男性">
男性<ManOutlined />
</a-radio-button>
<a-radio-button :style="customButtonStyle" value="女性">
女性<WomanOutlined />
</a-radio-button>
<a-radio-button :style="customButtonStyle" value="保密">
保密
</a-radio-button>
</a-radio-group>
</div>
</div>
</div>
</a-form-item>
@ -171,8 +240,27 @@ const activeKey = ref('1')
<a-form-item label="籍贯:">
<a-input v-model:value="value" placeholder="输入内容" />
</a-form-item>
<a-form-item label="学历:">
<a-input v-model:value="value" placeholder="输入内容" />
<a-form-item label="学历" name="region">
<a-select v-model:value="formState.region" placeholder="选择学历">
<a-select-option value="初中">
初中
</a-select-option>
<a-select-option value="高中">
高中
</a-select-option>
<a-select-option value="初中">
大专
</a-select-option>
<a-select-option value="高中">
本科
</a-select-option>
<a-select-option value="初中">
研究生
</a-select-option>
<a-select-option value="高中">
博士
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="专业:">
<a-input v-model:value="value" placeholder="输入内容" />
@ -220,7 +308,8 @@ const activeKey = ref('1')
</div>
</a-tab-pane>
<!-- 修改密码 -->
<!-- 第二部分 -->
<a-tab-pane key="2" tab="修改密码">
<div class="datum">
@ -258,6 +347,8 @@ const activeKey = ref('1')
</div>
</div>
</a-tab-pane>
<!-- 第三部分 -->
<a-tab-pane key="3" tab="登录记录">
<div class="datum">
<div class="datumtop">
@ -267,35 +358,121 @@ const activeKey = ref('1')
</p>
</div>
<!-- 日期 -->
<div class="date">
{{ `2023-08-22` }}
</div>
<div class="recordbox">
<div class="recordleft">
<div>
图标
<div
v-for="(item, index) in 5" :key="index"
>
<div class="date">
{{ `2023-08-22` }}
</div>
<div
v-for="(item, index) in 5"
:key="index" class="recordbox"
>
<div class="recordleft">
<div class="recordicon">
<WindowsFilled />
</div>
<div class="recordmessage">
<div class="usersId">
{{ `kang-pc` }}
</div>
{{ `上海市长宁区 14.127.100.242` }}
</div>
</div>
<div>
登录人和地点时间
<div class="recordright">
<span><FieldTimeOutlined /></span>{{ `2023-08-22 12:00` }}
</div>
</div>
<div class="recordright">
<span>图标</span>{{ `具体时间` }}
</div>
</div>
<div class="sorter">
<a-pagination v-model:current="current" :total="500" />
</div>
</div>
</a-tab-pane>
<!-- 第四部分 -->
<a-tab-pane key="4" tab="系统通知">
<div class="datum">
<div v-if="isVisible" class="datum">
<div class="datumtop">
<p>
<span></span>
系统通知
</p>
</div>
<div class="messagetitle">
<div class="messagetitleleft">
<a-radio-group v-model:value="message">
<a-radio-button :style="messageStyle" value="全部信息">
全部信息
</a-radio-button>
<a-radio-button :style="messageStyle" value="服务信息">
服务信息
</a-radio-button>
<a-radio-button :style="messageStyle" value="活动信息">
活动信息
</a-radio-button>
<a-radio-button :style="messageStyle" value="产品信息">
产品信息
</a-radio-button>
<a-radio-button :style="messageStyle" value="安全信息">
安全信息
</a-radio-button>
<a-radio-button :style="messageStyle" value="故障信息">
故障信息
</a-radio-button>
</a-radio-group>
</div>
<div class="messagetitleright">
全部标记为已读
</div>
</div>
<div class="table">
<a-table :columns="tablecolumns" :data-source="tabledata" :total="500">
<template #headerCell="{ column }">
<template v-if="column.key === 'title'">
<span>
通知标题
</span>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'name'">
<a href=""> {{ record.name }}</a>
</template>
<template v-else-if="column.key === 'title'">
<div style="cursor: pointer;" @click="toggleBlocks">
{{ record.title }}
</div>
</template>
</template>
</a-table>
</div>
</div>
<div v-else-if="isVisible2" class="details">
<div class="detailstop">
<p>
关于供应链管理平台正式上线的通知
</p>
<div @click="toggleBlocks">
<a-button><LeftOutlined />返回</a-button>
</div>
</div>
<div class="nav">
<p>消息类型<span>{{ `产品信息` }}</span>发布时间<span>{{ `2023-08-22 22:31` }}</span></p>
</div>
<div class="main">
<p>
8月22日由长江云息打造的供应链管理平台正式上线运行该项目基于云息云建设涵盖采购需求采购价格采购配额采购订单到货签收质量协同对账开票付款计划 / 付款申请等全业务流程助力客户实现对标准采购VMI 采购委外加工等业务的全面管理实现供应商全周期管理实现从需求寻源合同到采购执行的全过程管理打造具有云息特色的端到端的数智化供应链管理体系
</p>
</div>
</div>
</a-tab-pane>
<!-- 第五部分 -->
<a-tab-pane key="5" tab="信息设置">
<div class="datum">
<div class="datumtop">
@ -304,8 +481,33 @@ const activeKey = ref('1')
信息设置
</p>
</div>
<div class="inform">
<div
v-for="(item, index) in 5"
:key="index" class="informbox"
>
<div class="informleft">
<div class="informicon">
<WindowsFilled />
</div>
<div class="informmessage">
<div class="informId">
{{ `未读日报` }}
</div>
{{ `未读日报将以站内信的形式通知` }}
</div>
</div>
<div class="informright">
<a-space direction="vertical">
<a-switch v-model:checked="state.checked1" checked-children="" un-checked-children="" />
</a-space>
</div>
</div>
</div>
</div>
</a-tab-pane>
<!-- 第六部分 -->
<a-tab-pane key="6" tab="公司列表">
<div class="datum">
<div class="datumtop">
@ -314,6 +516,48 @@ const activeKey = ref('1')
公司列表
</p>
</div>
<div class="listmainbox">
<div class="listmain">
<div v-for="(item, index) in 4" :key="index" class="list">
<div class="firm">
<div class="firmtop">
<div class="firmtopleft">
<img src="https://files.axshare.com/gsc/F4557Q/03/bb/8b/03bb8b5afc694032b44452387757f019/images/%E5%85%AC%E5%8F%B8%E5%88%97%E8%A1%A8/u30.png?pageId=125c1eb4-7fa5-4390-86d9-40ffd2c7d87c" alt="">
</div>
<div class="firmtopright">
<p>{{ `济钢城市矿产科技有限公司` }}</p>
<p class="fontcss">
职务{{ `产品经理` }}
</p>
</div>
</div>
<div class="firmtopbot">
<p class="fontcss">
部门{{ `再生资源事业部<采购部` }}
</p>
<p class="fontcss">
业务线{{ `废铁、废铝` }}
</p>
</div>
</div>
<div class="default">
<p class="fontcss">
默认登录:
<span style="margin-left: 15px;">
<a-switch v-model:checked="state.checked1" checked-children="" un-checked-children="" /></span>
</p>
<a href="http://www.hao123.com/" class="fontcss">
<span><RightCircleFilled /></span>
进入
</a>
</div>
</div>
</div>
<div class="sorter">
<a-pagination v-model:current="current" :total="50" show-less-items />
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
@ -322,6 +566,130 @@ const activeKey = ref('1')
<style scoped lang="less">
.details{
height: 1200px;
padding: 20px;
.detailstop{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
p{
font-size: 20px;
font-weight: 800;
color: #666;
}
}
.nav{
height: 30px;
padding: 0 0 0 10px;
line-height: 30px;
background-color: rgb(249 249 249);
border: 1px solid #999;
border-color: rgb(228 228 228 / 100%);
p{
font-size: 12px;
color: #999;
span{
margin: 0 10px;
color: #666;
}
}
}
}
.main{
padding: 20px 0;
p{
font-size: 16px;
font-weight: 700;
line-height: 28px;
color: #666;
text-align: left;
}
}
.listmainbox{
display: flex;
flex-direction: column;
width:100%;
padding: 20px ;
margin-top: 30px;
border-radius: 10px;
box-shadow: 0 0 0 0.2px #8f8c8c;
}
.listmain{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.list{
width: 30%;
height: 215px;
margin-bottom: 20px;
overflow: hidden;
border-radius: 10px;
box-shadow: 0 0 0 0.2px #8f8c8c;
.fontcss{
font-size:14px;
color:#999;
}
.firm{
display:flex;
flex-direction:column;
justify-content:space-between;
height: 165px;
padding: 10px;
background-color: rgb(227 240 252 );
.firmtop{
display: flex;
.firmtopleft{
width: 70px;
height: 70px;
margin-right:15px;
img{
width: 100%;
}
}
}
}
.default{
display:flex;
align-items: flex-end;
justify-content: space-between;
height:50px;
padding: 0 10px;
a{
line-height: 50px;
}
a:hover{
color:#333;
}
}
}
}
.ant-tabs-nav-list{
width: 300px !important;
}
@ -333,7 +701,7 @@ const activeKey = ref('1')
}
.datum{
//
//
width: 100%;
margin-left: 20px;
color: #666;
@ -394,22 +762,102 @@ const activeKey = ref('1')
}
}
.messagetitle{
display: flex;
justify-content: space-between;
width: 100%;
margin: 20px 0;
font-size: 12px;
.messagetitleright{
width: 100px;
margin-right: 15px;
}
}
.dialog{
height: 400px;
margin-top: 30px;
}
.table{
width: 100%;
text-align: center;
}
.date{
padding: 20px;
font-weight: 700;
}
.sorter{
display: flex;
flex-direction: row-reverse;
}
.informbox{
display: flex;
align-items: center;
justify-content: space-between;
height: 90px;
padding:0 20px 0 0;
margin-bottom: 15px;
box-shadow:0 0.3px 0 0 ;
.informleft{
display: flex;
.informId{
font-weight: 600;
}
.informicon{
width: 50px ;
height: 50px;
margin-right: 20px;
font-size: 30px;
line-height: 50px;
color: #6666;
text-align: center;
border: 1px solid #6666;
border-radius: 50%;
}}}
.recordbox{
display: flex;
align-items: center;
justify-content: space-between;
height: 90px;
padding: 0 20px;
border: 1px solid #a1a0a0;
margin-bottom: 15px;
border: 1px solid #6666;
.recordleft{
display: flex;
.recordicon{
width: 50px ;
height: 50px;
font-size: 30px;
line-height: 50px;
color: #6666;
text-align: center;
border: 1px solid #6666;
border-radius: 50%;
}
.recordmessage{
display: flex;
flex-direction: column;
width: 300px;
margin-left: 20px;
.usersId{
font-size:20px ;
font-weight: 700;
}
}
}
}
@ -432,6 +880,10 @@ justify-content: space-between;
:where(.css-dev-only-do-not-override-176pxz6).ant-radio-button-wrapper:not(:first-child)::before {
display: none;
}
:where(.css-dev-only-do-not-override-176pxz6).ant-radio-button-wrapper:first-child{
border-inline-start: 1px solid #d9d9d9;
}
</style>

@ -247,4 +247,4 @@ export const updateFormSchema: FormSchema[] = [
options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number')
}
},
]
]

@ -0,0 +1,57 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="isUpdate ? t('action.edit') : t('action.create')" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { BasicForm, useForm } from '@/components/Form'
import { BasicModal, useModalInner } from '@/components/Modal'
import { createFormSchema, updateFormSchema } from './customer.data'
import { createCustomer, getCustomer, updateCustomer } from '@/api/xxjj/customer'
defineOptions({ name: 'CustomerModal' })
const { t } = useI18n()
const { createMessage } = useMessage()
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
labelWidth: 120,
baseColProps: { span: 24 },
schemas: createFormSchema,
showActionButtonGroup: false,
actionColOptions: { span: 23 }
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
resetSchema(updateFormSchema)
const res = await getCustomer(data.record.id)
setFieldsValue({ ...res })
}
})
async function handleSubmit() {
try {
const values = await validate()
setModalProps({ confirmLoading: true })
if (unref(isUpdate)) {
await updateCustomer(values)
} else {
await createCustomer(values)
}
closeModal()
emit('success')
createMessage.success(t('common.saveSuccessText'))
} finally {
setModalProps({ confirmLoading: false })
}
}
</script>

@ -0,0 +1,659 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '编号',
dataIndex: 'id',
width: 160
},
{
title: '客户分类(0一级客户 1二级客户)',
dataIndex: 'customerCalssify',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.CUSTOMER_CALSSIFY)
}
},
{
title: '客户名称',
dataIndex: 'customerName',
width: 160
},
{
title: '公司logo',
dataIndex: 'customerLogo',
width: 160
},
{
title: '企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)',
dataIndex: 'enterpriseNature',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.ENTERPRISE_NATURE)
}
},
{
title: '客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)',
dataIndex: 'customerSource',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.PRODUCT_CLASS)
}
},
{
title: '客户星级(0一星 1二星 2三星 3四星 4五星)',
dataIndex: 'customerStarrating',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.CUSTOMER_STARRATING)
}
},
{
title: '业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)',
dataIndex: 'industrySchedule',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.INDUSTRY_SCHEDULE)
}
},
{
title: '归属人员',
dataIndex: 'belongingPeople',
width: 160
},
{
title: '所在城市',
dataIndex: 'city',
width: 160
},
{
title: '国家',
dataIndex: 'country',
width: 160
},
{
title: '详细地址',
dataIndex: 'address',
width: 160
},
{
title: '公司电话',
dataIndex: 'phone',
width: 160
},
{
title: '公司传真',
dataIndex: 'companyFax',
width: 160
},
{
title: '公司网址',
dataIndex: 'companyHttp',
width: 160
},
{
title: '公司介绍',
dataIndex: 'companyProfile',
width: 160
},
{
title: '客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)',
dataIndex: 'customerStatus',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.CUSTOMER_STATUS1)
}
},
{
title: '社会信息代码证(营业执照)',
dataIndex: 'socialInformationCodeCertificate',
width: 160
},
{
title: '法定代表人证件照',
dataIndex: 'legalRepresentativesPhoto',
width: 160
},
{
title: '实缴资金证明',
dataIndex: 'proofPaidCapital',
width: 160
},
{
title: '资产证明',
dataIndex: 'assetCertificate',
width: 160
},
{
title: '资产抵押证明',
dataIndex: 'assetCertificateMortgage',
width: 160
},
{
title: '担保人证明',
dataIndex: 'guarantorCertificate',
width: 160
},
{
title: '经营范围',
dataIndex: 'businessScope',
width: 160
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)',
dataIndex: 'industryClassify',
width: 160
},
{
title: '其他资质文件',
dataIndex: 'otherQualifications',
width: 160
},
]
export const searchFormSchema: FormSchema[] = [
{
label: '客户分类(0一级客户 1二级客户)',
field: 'customerCalssify',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_CALSSIFY)
},
colProps: { span: 8 }
},
{
label: '客户名称',
field: 'customerName',
component: 'Input',
colProps: { span: 8 }
},
{
label: '公司logo',
field: 'customerLogo',
component: 'Input',
colProps: { span: 8 }
},
{
label: '企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)',
field: 'enterpriseNature',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.ENTERPRISE_NATURE)
},
colProps: { span: 8 }
},
{
label: '客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)',
field: 'customerSource',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.PRODUCT_CLASS)
},
colProps: { span: 8 }
},
{
label: '客户星级(0一星 1二星 2三星 3四星 4五星)',
field: 'customerStarrating',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STARRATING)
},
colProps: { span: 8 }
},
{
label: '业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)',
field: 'industrySchedule',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.INDUSTRY_SCHEDULE)
},
colProps: { span: 8 }
},
{
label: '归属人员',
field: 'belongingPeople',
component: 'Input',
colProps: { span: 8 }
},
{
label: '所在城市',
field: 'city',
component: 'Input',
colProps: { span: 8 }
},
{
label: '国家',
field: 'country',
component: 'Input',
colProps: { span: 8 }
},
{
label: '详细地址',
field: 'address',
component: 'Input',
colProps: { span: 8 }
},
{
label: '公司电话',
field: 'phone',
component: 'Input',
colProps: { span: 8 }
},
{
label: '公司传真',
field: 'companyFax',
component: 'Input',
colProps: { span: 8 }
},
{
label: '公司网址',
field: 'companyHttp',
component: 'Input',
colProps: { span: 8 }
},
{
label: '公司介绍',
field: 'companyProfile',
colProps: { span: 8 }
},
{
label: '客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)',
field: 'customerStatus',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STATUS1)
},
colProps: { span: 8 }
},
{
label: '社会信息代码证(营业执照)',
field: 'socialInformationCodeCertificate',
component: 'RangePicker',
colProps: { span: 8 }
},
{
label: '法定代表人证件照',
field: 'legalRepresentativesPhoto',
colProps: { span: 8 }
},
{
label: '实缴资金证明',
field: 'proofPaidCapital',
colProps: { span: 8 }
},
{
label: '资产证明',
field: 'assetCertificate',
colProps: { span: 8 }
},
{
label: '资产抵押证明',
field: 'assetCertificateMortgage',
colProps: { span: 8 }
},
{
label: '担保人证明',
field: 'guarantorCertificate',
colProps: { span: 8 }
},
{
label: '经营范围',
field: 'businessScope',
colProps: { span: 8 }
},
{
label: '创建时间',
field: 'createTime',
component: 'RangePicker',
colProps: { span: 8 }
},
{
label: '行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)',
field: 'industryClassify',
component: 'Input',
colProps: { span: 8 }
},
{
label: '其他资质文件',
field: 'otherQualifications',
component: 'Input',
colProps: { span: 8 }
},
]
export const createFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '客户分类(0一级客户 1二级客户)',
field: 'customerCalssify',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_CALSSIFY, 'number')
}
},
{
label: '客户名称',
field: 'customerName',
component: 'Input'
},
{
label: '公司logo',
field: 'customerLogo',
component: 'Input'
},
{
label: '企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)',
field: 'enterpriseNature',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.ENTERPRISE_NATURE, 'number')
}
},
{
label: '客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)',
field: 'customerSource',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.PRODUCT_CLASS, 'number')
}
},
{
label: '客户星级(0一星 1二星 2三星 3四星 4五星)',
field: 'customerStarrating',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STARRATING, 'number')
}
},
{
label: '业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)',
field: 'industrySchedule',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.INDUSTRY_SCHEDULE, 'number')
}
},
{
label: '归属人员',
field: 'belongingPeople',
component: 'Input'
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '国家',
field: 'country',
component: 'Input'
},
{
label: '详细地址',
field: 'address',
component: 'Input'
},
{
label: '公司电话',
field: 'phone',
component: 'Input'
},
{
label: '公司传真',
field: 'companyFax',
component: 'Input'
},
{
label: '公司网址',
field: 'companyHttp',
component: 'Input'
},
{
label: '公司介绍',
field: 'companyProfile',
component: 'InputTextArea'
},
{
label: '客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)',
field: 'customerStatus',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STATUS1, 'number')
}
},
{
label: '社会信息代码证(营业执照)',
field: 'socialInformationCodeCertificate',
component: 'DatePicker'
},
{
label: '法定代表人证件照',
field: 'legalRepresentativesPhoto',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '实缴资金证明',
field: 'proofPaidCapital',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '资产证明',
field: 'assetCertificate',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '资产抵押证明',
field: 'assetCertificateMortgage',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '担保人证明',
field: 'guarantorCertificate',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '经营范围',
field: 'businessScope',
component: 'InputTextArea'
},
{
label: '行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)',
field: 'industryClassify',
component: 'Input'
},
{
label: '其他资质文件',
field: 'otherQualifications',
component: 'Input'
},
]
export const updateFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '客户分类(0一级客户 1二级客户)',
field: 'customerCalssify',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_CALSSIFY, 'number')
}
},
{
label: '客户名称',
field: 'customerName',
component: 'Input'
},
{
label: '公司logo',
field: 'customerLogo',
component: 'Input'
},
{
label: '企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)',
field: 'enterpriseNature',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.ENTERPRISE_NATURE, 'number')
}
},
{
label: '客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)',
field: 'customerSource',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.PRODUCT_CLASS, 'number')
}
},
{
label: '客户星级(0一星 1二星 2三星 3四星 4五星)',
field: 'customerStarrating',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STARRATING, 'number')
}
},
{
label: '业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)',
field: 'industrySchedule',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.INDUSTRY_SCHEDULE, 'number')
}
},
{
label: '归属人员',
field: 'belongingPeople',
component: 'Input'
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '国家',
field: 'country',
component: 'Input'
},
{
label: '详细地址',
field: 'address',
component: 'Input'
},
{
label: '公司电话',
field: 'phone',
component: 'Input'
},
{
label: '公司传真',
field: 'companyFax',
component: 'Input'
},
{
label: '公司网址',
field: 'companyHttp',
component: 'Input'
},
{
label: '公司介绍',
field: 'companyProfile',
component: 'InputTextArea'
},
{
label: '客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)',
field: 'customerStatus',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_STATUS1, 'number')
}
},
{
label: '社会信息代码证(营业执照)',
field: 'socialInformationCodeCertificate',
component: 'DatePicker'
},
{
label: '法定代表人证件照',
field: 'legalRepresentativesPhoto',
component: 'Upload'
},
{
label: '实缴资金证明',
field: 'proofPaidCapital',
component: 'Upload'
},
{
label: '资产证明',
field: 'assetCertificate',
component: 'Upload'
},
{
label: '资产抵押证明',
field: 'assetCertificateMortgage',
component: 'Upload'
},
{
label: '担保人证明',
field: 'guarantorCertificate',
component: 'Upload'
},
{
label: '经营范围',
field: 'businessScope',
component: 'InputTextArea'
},
{
label: '行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)',
field: 'industryClassify',
component: 'Input'
},
{
label: '其他资质文件',
field: 'otherQualifications',
component: 'Input'
},
]

@ -0,0 +1,92 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" v-auth="['xxjj:customer:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }}
</a-button>
<a-button type="warning" v-auth="['xxjj:customer:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
{{ t('action.export') }}
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'xxjj:customer:update', onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'error',
label: t('action.delete'),
auth: 'xxjj:customer:delete',
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<CustomerModal @register="registerModal" @success="reload()" />
</div>
</template>
<script lang="ts" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import CustomerModal from './CustomerModal.vue'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteCustomer, exportCustomer, getCustomerPage } from '@/api/xxjj/customer'
import { columns, searchFormSchema } from './customer.data'
defineOptions({ name: 'Customer' })
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '客户信息列表',
api: getCustomerPage,
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true,
showTableSetting: true,
actionColumn: {
width: 140,
title: t('common.action'),
dataIndex: 'action',
fixed: 'right'
}
})
function handleCreate() {
openModal(true, { isUpdate: false })
}
function handleEdit(record: Recordable) {
openModal(true, { record, isUpdate: true })
}
async function handleExport() {
createConfirm({
title: t('common.exportTitle'),
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await exportCustomer(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
}
})
}
async function handleDelete(record: Recordable) {
await deleteCustomer(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
</script>

@ -1,5 +1,6 @@
package com.yunxi.scm.module.system.controller.admin.enterprise;
import com.yunxi.scm.module.system.controller.admin.user.vo.user.UserUpdateStatusReqVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -52,6 +53,16 @@ public class EnterpriseController {
return success(true);
}
@PutMapping("/updateStatus")
@Operation(summary = "更新企业状态")
@PreAuthorize("@ss.hasPermission('system:enterprise:updateStatus')")
public CommonResult<Boolean> updateEnterpriseStatus(@Valid @RequestBody EnterpriseUpdateReqVO updateReqVO) {
updateReqVO.setEnterpriseStatus("1");
enterpriseService.updateEnterprise(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除企业信息")
@Parameter(name = "id", description = "编号", required = true)

@ -76,4 +76,7 @@ public class EnterpriseBaseVO {
@Schema(description = "描述")
private String description;
@Schema(description = "企业状态")
private String enterpriseStatus;
}

@ -145,4 +145,6 @@ public class EnterpriseCreateReqVO extends EnterpriseBaseVO {
@Schema(description = "描述", example = "你猜")
private String description;
@Schema(description = "企业状态")
private String enterpriseStatus;
}

@ -62,4 +62,7 @@ public class EnterpriseExportReqVO {
@Schema(description = "描述")
private String description;
@Schema(description = "企业状态")
private String enterpriseStatus;
}

@ -64,4 +64,7 @@ public class EnterprisePageReqVO extends PageParam {
@Schema(description = "描述")
private String description;
@Schema(description = "企业状态")
private String enterpriseStatus;
}

@ -149,4 +149,6 @@ public class EnterpriseUpdateReqVO extends EnterpriseBaseVO {
@Schema(description = "描述", example = "你猜")
private String description;
@Schema(description = "企业状态")
private String enterpriseStatus;
}

@ -255,5 +255,9 @@ public class EnterpriseDO extends BaseDO {
* id
*/
private Long parentId;
/**
*
*/
private String enterpriseStatus;
}

@ -1,8 +1,5 @@
package com.yunxi.scm.module.xxjj.controller.admin.customer;
import com.yunxi.scm.framework.common.enums.CommonStatusEnum;
import com.yunxi.scm.module.xxjj.controller.admin.workorder.vo.WorkOrderCreateReqVO;
import com.yunxi.scm.module.xxjj.service.workorder.WorkOrderService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -39,26 +36,14 @@ public class CustomerController {
@Resource
private CustomerService customerService;
@Resource
private WorkOrderService workOrderService;
@PostMapping("/create")
@Operation(summary = "创建客户信息")
@PreAuthorize("@ss.hasPermission('xxjj:customer:create')")
public CommonResult<Long> createCustomerwork(@Valid @RequestBody CustomerCreateReqVO createReqVO) {
public CommonResult<Long> createCustomer(@Valid @RequestBody CustomerCreateReqVO createReqVO) {
return success(customerService.createCustomer(createReqVO));
}
@PostMapping("/creatework")
@Operation(summary = "创建工单")
@PreAuthorize("@ss.hasPermission('xxjj:customer:creatework')")
public CommonResult<Long> createCustomer(@Valid @RequestBody WorkOrderCreateReqVO workOrderCreateReqVO) {
return success(workOrderService.createWorkOrder(workOrderCreateReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新客户信息")
@PreAuthorize("@ss.hasPermission('xxjj:customer:update')")
@ -114,18 +99,4 @@ public class CustomerController {
ExcelUtils.write(response, "客户信息.xls", "数据", CustomerExcelVO.class, datas);
}
@GetMapping("/list-all-simplecustomer")
@Operation(summary = "获取客户", description = "只包含被开启的客户,主要用于前端的下拉选项")
public CommonResult<List<CustomerRespVO>> getCustomerId() {
CustomerRespVO customerRespVO=new CustomerRespVO();
String status=Integer.toString(CommonStatusEnum.ENABLE.getStatus());
customerRespVO.setStatus(status);
List<CustomerDO> list = customerService.getCustomerstaus(customerRespVO);
return success(CustomerConvert.INSTANCE.convertList(list));
}
}

@ -14,34 +14,81 @@ import javax.validation.constraints.*;
@Data
public class CustomerBaseVO {
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotNull(message = "客户名称不能为空")
@Schema(description = "客户分类(0一级客户 1二级客户)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "客户分类(0一级客户 1二级客户)不能为空")
private String customerCalssify;
@Schema(description = "客户名称", example = "王五")
private String customerName;
@Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "客户类型不能为空")
private String customerType;
@Schema(description = "公司logo")
private String customerLogo;
@Schema(description = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)")
private String enterpriseNature;
@Schema(description = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)")
private String customerSource;
@Schema(description = "客户星级(0一星 1二星 2三星 3四星 4五星)")
private String customerStarrating;
@Schema(description = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)")
private String industrySchedule;
@Schema(description = "归属人员")
private String belongingPeople;
@Schema(description = "所在城市")
private Long city;
@Schema(description = "国家")
private String country;
@Schema(description = "详细地址")
private String address;
@Schema(description = "公司电话")
private String phone;
@Schema(description = "公司传真")
private String companyFax;
@Schema(description = "公司网址")
private String companyHttp;
@Schema(description = "公司介绍")
private String companyProfile;
@Schema(description = "客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)不能为空")
private String customerStatus;
@Schema(description = "社会信息代码证(营业执照)")
private String socialInformationCodeCertificate;
@Schema(description = "法定代表人证件照")
private String legalRepresentativesPhoto;
@Schema(description = "实缴资金证明")
private String proofPaidCapital;
@Schema(description = "统一结算主体")
private String unifiedSettlement;
@Schema(description = "资产证明")
private String assetCertificate;
@Schema(description = "客户性质", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "客户性质不能为空")
private String customerNature;
@Schema(description = "资产抵押证明")
private String assetCertificateMortgage;
@Schema(description = "合作模式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "合作模式不能为空")
private String cooperationMode;
@Schema(description = "担保人证明")
private String guarantorCertificate;
@Schema(description = "隶属业务线", example = "22944")
private Long linebusinessId;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态不能为空")
private String status;
@Schema(description = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "归属人员",requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
@NotNull(message = "成员编号数组不能为空")
private Set<Long> belongingPeople;
@Schema(description = "其他资质文件")
private String otherQualifications;
}

@ -7,11 +7,14 @@ import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yunxi.scm.framework.excel.core.annotations.DictFormat;
import com.yunxi.scm.framework.excel.core.convert.DictConvert;
/**
* Excel VO
*
* @author
* @author
*/
@Data
public class CustomerExcelVO {
@ -19,34 +22,88 @@ public class CustomerExcelVO {
@ExcelProperty("编号")
private Long id;
@ExcelProperty(value = "客户分类(0一级客户 1二级客户)", converter = DictConvert.class)
@DictFormat("customer_calssify") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerCalssify;
@ExcelProperty("客户名称")
private String customerName;
@ExcelProperty("客户类型")
private String customerType;
@ExcelProperty("统一结算主体")
private String unifiedSettlement;
@ExcelProperty("公司logo")
private String customerLogo;
@ExcelProperty("客户性质")
private String customerNature;
@ExcelProperty(value = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)", converter = DictConvert.class)
@DictFormat("enterprise_nature") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String enterpriseNature;
@ExcelProperty("合作模式")
private String cooperationMode;
@ExcelProperty(value = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)", converter = DictConvert.class)
@DictFormat("product_class") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerSource;
@ExcelProperty("隶属业务线")
private Long linebusinessId;
@ExcelProperty(value = "客户星级(0一星 1二星 2三星 3四星 4五星)", converter = DictConvert.class)
@DictFormat("customer_starrating") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerStarrating;
@ExcelProperty("状态")
private String status;
@ExcelProperty(value = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)", converter = DictConvert.class)
@DictFormat("industry_schedule") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String industrySchedule;
@ExcelProperty("归属人员")
private Set<Long> belongingPeople;
private String belongingPeople;
@ExcelProperty("所在城市")
private Long city;
@ExcelProperty("国家")
private String country;
@ExcelProperty("详细地址")
private String address;
@ExcelProperty("公司电话")
private String phone;
@ExcelProperty("公司传真")
private String companyFax;
@ExcelProperty("公司网址")
private String companyHttp;
@ExcelProperty("公司介绍")
private String companyProfile;
@ExcelProperty(value = "客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)", converter = DictConvert.class)
@DictFormat("customer_status1") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerStatus;
@ExcelProperty("社会信息代码证(营业执照)")
private String socialInformationCodeCertificate;
@ExcelProperty("法定代表人证件照")
private String legalRepresentativesPhoto;
@ExcelProperty("实缴资金证明")
private String proofPaidCapital;
@ExcelProperty("资产证明")
private String assetCertificate;
@ExcelProperty("资产抵押证明")
private String assetCertificateMortgage;
@ExcelProperty("担保人证明")
private String guarantorCertificate;
@ExcelProperty("经营范围")
private String businessScope;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
@ExcelProperty("行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@ExcelProperty("其他资质文件")
private String otherQualifications;
}

@ -13,36 +13,83 @@ import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MON
@Data
public class CustomerExportReqVO {
@Schema(description = "客户名称", example = "赵六")
private String customerName;
@Schema(description = "客户分类(0一级客户 1二级客户)")
private String customerCalssify;
@Schema(description = "客户类型", example = "2")
private String customerType;
@Schema(description = "客户名称", example = "王五")
private String customerName;
@Schema(description = "统一结算主体")
private String unifiedSettlement;
@Schema(description = "公司logo")
private String customerLogo;
@Schema(description = "客户性质")
private String customerNature;
@Schema(description = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)")
private String enterpriseNature;
@Schema(description = "合作模式")
private String cooperationMode;
@Schema(description = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)")
private String customerSource;
@Schema(description = "隶属业务线", example = "22944")
private Long linebusinessId;
@Schema(description = "客户星级(0一星 1二星 2三星 3四星 4五星)")
private String customerStarrating;
@Schema(description = "状态", example = "2")
private String status;
@Schema(description = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)")
private String industrySchedule;
@Schema(description = "归属人员")
private String belongingPeople;
@Schema(description = "所在城市")
private Long city;
@Schema(description = "国家")
private String country;
@Schema(description = "详细地址")
private String address;
@Schema(description = "公司电话")
private String phone;
@Schema(description = "公司传真")
private String companyFax;
@Schema(description = "公司网址")
private String companyHttp;
@Schema(description = "公司介绍")
private String companyProfile;
@Schema(description = "客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)", example = "1")
private String customerStatus;
@Schema(description = "社会信息代码证(营业执照)")
private String socialInformationCodeCertificate;
@Schema(description = "法定代表人证件照")
private String legalRepresentativesPhoto;
@Schema(description = "实缴资金证明")
private String proofPaidCapital;
@Schema(description = "资产证明")
private String assetCertificate;
@Schema(description = "资产抵押证明")
private String assetCertificateMortgage;
@Schema(description = "担保人证明")
private String guarantorCertificate;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] updateTime;
@Schema(description = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "其他资质文件")
private String otherQualifications;
}

@ -15,36 +15,83 @@ import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MON
@ToString(callSuper = true)
public class CustomerPageReqVO extends PageParam {
@Schema(description = "客户名称", example = "赵六")
private String customerName;
@Schema(description = "客户分类(0一级客户 1二级客户)")
private String customerCalssify;
@Schema(description = "客户类型", example = "2")
private String customerType;
@Schema(description = "客户名称", example = "王五")
private String customerName;
@Schema(description = "统一结算主体")
private String unifiedSettlement;
@Schema(description = "公司logo")
private String customerLogo;
@Schema(description = "客户性质")
private String customerNature;
@Schema(description = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)")
private String enterpriseNature;
@Schema(description = "合作模式")
private String cooperationMode;
@Schema(description = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)")
private String customerSource;
@Schema(description = "隶属业务线", example = "22944")
private Long linebusinessId;
@Schema(description = "客户星级(0一星 1二星 2三星 3四星 4五星)")
private String customerStarrating;
@Schema(description = "状态", example = "2")
private String status;
@Schema(description = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)")
private String industrySchedule;
@Schema(description = "归属人员")
private Set<Long> belongingPeople;
private String belongingPeople;
@Schema(description = "所在城市")
private Long city;
@Schema(description = "国家")
private String country;
@Schema(description = "详细地址")
private String address;
@Schema(description = "公司电话")
private String phone;
@Schema(description = "公司传真")
private String companyFax;
@Schema(description = "公司网址")
private String companyHttp;
@Schema(description = "公司介绍")
private String companyProfile;
@Schema(description = "客户状态(0待提交 1待审核 2待核准 3带启用 4已启用 5已禁用 6已关闭)", example = "1")
private String customerStatus;
@Schema(description = "社会信息代码证(营业执照)")
private String socialInformationCodeCertificate;
@Schema(description = "法定代表人证件照")
private String legalRepresentativesPhoto;
@Schema(description = "实缴资金证明")
private String proofPaidCapital;
@Schema(description = "资产证明")
private String assetCertificate;
@Schema(description = "资产抵押证明")
private String assetCertificateMortgage;
@Schema(description = "担保人证明")
private String guarantorCertificate;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] updateTime;
@Schema(description = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "其他资质文件")
private String otherQualifications;
}

@ -10,13 +10,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class CustomerRespVO extends CustomerBaseVO {
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7245")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9751")
private Long id;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime;
}

@ -11,7 +11,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true)
public class CustomerUpdateReqVO extends CustomerBaseVO {
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7245")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9751")
@NotNull(message = "编号不能为空")
private Long id;

@ -12,7 +12,7 @@ import com.yunxi.scm.module.xxjj.dal.dataobject.customer.CustomerDO;
/**
* Convert
*
* @author
* @author
*/
@Mapper
public interface CustomerConvert {

@ -1,7 +1,5 @@
package com.yunxi.scm.module.xxjj.dal.dataobject.customer;
import com.yunxi.scm.framework.common.enums.CommonStatusEnum;
import com.yunxi.scm.framework.mybatis.core.type.JsonLongSetTypeHandler;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
@ -12,9 +10,9 @@ import com.yunxi.scm.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
* @author
*/
@TableName(value = "xxjj_customer", autoResultMap = true)
@TableName("xxjj_customer")
@KeySequence("xxjj_customer_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ -29,40 +27,117 @@ public class CustomerDO extends BaseDO {
*/
@TableId
private Long id;
/**
* (0 1)
*
* {@link TODO customer_calssify }
*/
private String customerCalssify;
/**
*
*/
private String customerName;
/**
*
* logo
*/
private String customerType;
private String customerLogo;
/**
*
* (0 1 2 3 4 5)
*
* {@link TODO enterprise_nature }
*/
private String unifiedSettlement;
private String enterpriseNature;
/**
*
* (0 1 2 3 4 5 6广 7 8)
*
* {@link TODO product_class }
*/
private String customerNature;
private String customerSource;
/**
*
* (0 1 2 3 4)
*
* {@link TODO customer_starrating }
*/
private String cooperationMode;
private String customerStarrating;
/**
* 线
* (0 1 2 3 4 5 6 7 8)
*
* {@link TODO industry_schedule }
*/
private Long linebusinessId;
private String industrySchedule;
/**
*
*
*/
private String belongingPeople;
/**
*
*/
private Long city;
/**
*
*/
private String country;
/**
*
*/
private String address;
/**
*
*/
private String phone;
/**
*
*/
private String companyFax;
/**
*
*/
private String companyHttp;
/**
*
*/
private String companyProfile;
/**
* (0 1 2 3 4 5 6)
*
* {@link CommonStatusEnum}
* {@link TODO customer_status1 }
*/
private String status;
private String customerStatus;
/**
*
*
*/
private String socialInformationCodeCertificate;
/**
*
*/
private String legalRepresentativesPhoto;
/**
*
*/
private String proofPaidCapital;
/**
*
*/
private String assetCertificate;
/**
*
*/
private String assetCertificateMortgage;
/**
*
*/
private String guarantorCertificate;
/**
*
*/
private String businessScope;
/**
* (0 1 2 3 4 5 6 7 8广)
*/
private String industryClassify;
/**
*
*/
@TableField(typeHandler = JsonLongSetTypeHandler.class)
private Set<Long> belongingPeople;
private String otherQualifications;
}

@ -12,43 +12,71 @@ import com.yunxi.scm.module.xxjj.controller.admin.customer.vo.*;
/**
* Mapper
*
* @author
* @author
*/
@Mapper
public interface CustomerMapper extends BaseMapperX<CustomerDO> {
default PageResult<CustomerDO> selectPage(CustomerPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<CustomerDO>()
.eqIfPresent(CustomerDO::getCustomerCalssify, reqVO.getCustomerCalssify())
.likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType())
.eqIfPresent(CustomerDO::getUnifiedSettlement, reqVO.getUnifiedSettlement())
.eqIfPresent(CustomerDO::getCustomerNature, reqVO.getCustomerNature())
.eqIfPresent(CustomerDO::getCooperationMode, reqVO.getCooperationMode())
.eqIfPresent(CustomerDO::getLinebusinessId, reqVO.getLinebusinessId())
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus())
.eqIfPresent(CustomerDO::getCustomerLogo, reqVO.getCustomerLogo())
.eqIfPresent(CustomerDO::getEnterpriseNature, reqVO.getEnterpriseNature())
.eqIfPresent(CustomerDO::getCustomerSource, reqVO.getCustomerSource())
.eqIfPresent(CustomerDO::getCustomerStarrating, reqVO.getCustomerStarrating())
.eqIfPresent(CustomerDO::getIndustrySchedule, reqVO.getIndustrySchedule())
.eqIfPresent(CustomerDO::getBelongingPeople, reqVO.getBelongingPeople())
.eqIfPresent(CustomerDO::getCity, reqVO.getCity())
.eqIfPresent(CustomerDO::getCountry, reqVO.getCountry())
.eqIfPresent(CustomerDO::getAddress, reqVO.getAddress())
.eqIfPresent(CustomerDO::getPhone, reqVO.getPhone())
.eqIfPresent(CustomerDO::getCompanyFax, reqVO.getCompanyFax())
.eqIfPresent(CustomerDO::getCompanyHttp, reqVO.getCompanyHttp())
.eqIfPresent(CustomerDO::getCompanyProfile, reqVO.getCompanyProfile())
.eqIfPresent(CustomerDO::getCustomerStatus, reqVO.getCustomerStatus())
.eqIfPresent(CustomerDO::getSocialInformationCodeCertificate, reqVO.getSocialInformationCodeCertificate())
.eqIfPresent(CustomerDO::getLegalRepresentativesPhoto, reqVO.getLegalRepresentativesPhoto())
.eqIfPresent(CustomerDO::getProofPaidCapital, reqVO.getProofPaidCapital())
.eqIfPresent(CustomerDO::getAssetCertificate, reqVO.getAssetCertificate())
.eqIfPresent(CustomerDO::getAssetCertificateMortgage, reqVO.getAssetCertificateMortgage())
.eqIfPresent(CustomerDO::getGuarantorCertificate, reqVO.getGuarantorCertificate())
.eqIfPresent(CustomerDO::getBusinessScope, reqVO.getBusinessScope())
.betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(CustomerDO::getUpdateTime, reqVO.getUpdateTime())
.eqIfPresent(CustomerDO::getIndustryClassify, reqVO.getIndustryClassify())
.eqIfPresent(CustomerDO::getOtherQualifications, reqVO.getOtherQualifications())
.orderByDesc(CustomerDO::getId));
}
default List<CustomerDO> selectList(CustomerExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<CustomerDO>()
.eqIfPresent(CustomerDO::getCustomerCalssify, reqVO.getCustomerCalssify())
.likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType())
.eqIfPresent(CustomerDO::getUnifiedSettlement, reqVO.getUnifiedSettlement())
.eqIfPresent(CustomerDO::getCustomerNature, reqVO.getCustomerNature())
.eqIfPresent(CustomerDO::getCooperationMode, reqVO.getCooperationMode())
.eqIfPresent(CustomerDO::getLinebusinessId, reqVO.getLinebusinessId())
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus())
.eqIfPresent(CustomerDO::getCustomerLogo, reqVO.getCustomerLogo())
.eqIfPresent(CustomerDO::getEnterpriseNature, reqVO.getEnterpriseNature())
.eqIfPresent(CustomerDO::getCustomerSource, reqVO.getCustomerSource())
.eqIfPresent(CustomerDO::getCustomerStarrating, reqVO.getCustomerStarrating())
.eqIfPresent(CustomerDO::getIndustrySchedule, reqVO.getIndustrySchedule())
.eqIfPresent(CustomerDO::getBelongingPeople, reqVO.getBelongingPeople())
.eqIfPresent(CustomerDO::getCity, reqVO.getCity())
.eqIfPresent(CustomerDO::getCountry, reqVO.getCountry())
.eqIfPresent(CustomerDO::getAddress, reqVO.getAddress())
.eqIfPresent(CustomerDO::getPhone, reqVO.getPhone())
.eqIfPresent(CustomerDO::getCompanyFax, reqVO.getCompanyFax())
.eqIfPresent(CustomerDO::getCompanyHttp, reqVO.getCompanyHttp())
.eqIfPresent(CustomerDO::getCompanyProfile, reqVO.getCompanyProfile())
.eqIfPresent(CustomerDO::getCustomerStatus, reqVO.getCustomerStatus())
.eqIfPresent(CustomerDO::getSocialInformationCodeCertificate, reqVO.getSocialInformationCodeCertificate())
.eqIfPresent(CustomerDO::getLegalRepresentativesPhoto, reqVO.getLegalRepresentativesPhoto())
.eqIfPresent(CustomerDO::getProofPaidCapital, reqVO.getProofPaidCapital())
.eqIfPresent(CustomerDO::getAssetCertificate, reqVO.getAssetCertificate())
.eqIfPresent(CustomerDO::getAssetCertificateMortgage, reqVO.getAssetCertificateMortgage())
.eqIfPresent(CustomerDO::getGuarantorCertificate, reqVO.getGuarantorCertificate())
.eqIfPresent(CustomerDO::getBusinessScope, reqVO.getBusinessScope())
.betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(CustomerDO::getUpdateTime, reqVO.getUpdateTime())
.eqIfPresent(CustomerDO::getIndustryClassify, reqVO.getIndustryClassify())
.eqIfPresent(CustomerDO::getOtherQualifications, reqVO.getOtherQualifications())
.orderByDesc(CustomerDO::getId));
}
default List<CustomerDO> selectcustomerList(CustomerRespVO reqVO) {
return selectList(new LambdaQueryWrapperX<CustomerDO>()
.likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus()));
}
}

@ -9,7 +9,7 @@ import com.yunxi.scm.framework.common.pojo.PageResult;
/**
* Service
*
* @author
* @author
*/
public interface CustomerService {
@ -67,11 +67,4 @@ public interface CustomerService {
*/
List<CustomerDO> getCustomerList(CustomerExportReqVO exportReqVO);
/**
*
*
*
* @return
*/
List<CustomerDO> getCustomerstaus(CustomerRespVO customerRespVO);
}

@ -18,7 +18,7 @@ import static com.yunxi.scm.module.xxjj.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
* @author
*/
@Service
@Validated
@ -79,9 +79,4 @@ public class CustomerServiceImpl implements CustomerService {
return customerMapper.selectList(exportReqVO);
}
@Override
public List<CustomerDO> getCustomerstaus(CustomerRespVO customerRespVO) {
return customerMapper.selectcustomerList(customerRespVO);
}
}

@ -2,9 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yunxi.scm.module.xxjj.dal.mysql.customer.CustomerMapper">
<select id="queryCustomerTree" resultType="com.yunxi.scm.module.xxjj.dal.dataobject.customer.CustomerDO">
select id,customer_name as name from xxjj_customer
where linebusiness_id = #{id}
</select>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -31,7 +31,7 @@ import static org.mockito.Mockito.*;
/**
* {@link CustomerServiceImpl}
*
* @author
* @author
*/
@Import(CustomerServiceImpl.class)
public class CustomerServiceImplTest extends BaseDbUnitTest {
@ -110,50 +110,114 @@ public class CustomerServiceImplTest extends BaseDbUnitTest {
public void testGetCustomerPage() {
// mock 数据
CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到
o.setCustomerCalssify(null);
o.setCustomerName(null);
o.setCustomerType(null);
o.setUnifiedSettlement(null);
o.setCustomerNature(null);
o.setCooperationMode(null);
o.setLinebusinessId(null);
o.setStatus(null);
o.setCustomerLogo(null);
o.setEnterpriseNature(null);
o.setCustomerSource(null);
o.setCustomerStarrating(null);
o.setIndustrySchedule(null);
o.setBelongingPeople(null);
o.setCity(null);
o.setCountry(null);
o.setAddress(null);
o.setPhone(null);
o.setCompanyFax(null);
o.setCompanyHttp(null);
o.setCompanyProfile(null);
o.setCustomerStatus(null);
o.setSocialInformationCodeCertificate(null);
o.setLegalRepresentativesPhoto(null);
o.setProofPaidCapital(null);
o.setAssetCertificate(null);
o.setAssetCertificateMortgage(null);
o.setGuarantorCertificate(null);
o.setBusinessScope(null);
o.setCreateTime(null);
o.setUpdateTime(null);
o.setIndustryClassify(null);
o.setOtherQualifications(null);
});
customerMapper.insert(dbCustomer);
// 测试 customerCalssify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerCalssify(null)));
// 测试 customerName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null)));
// 测试 customerType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null)));
// 测试 unifiedSettlement 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnifiedSettlement(null)));
// 测试 customerNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerNature(null)));
// 测试 cooperationMode 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCooperationMode(null)));
// 测试 linebusinessId 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLinebusinessId(null)));
// 测试 status 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setStatus(null)));
// 测试 customerLogo 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerLogo(null)));
// 测试 enterpriseNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseNature(null)));
// 测试 customerSource 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerSource(null)));
// 测试 customerStarrating 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStarrating(null)));
// 测试 industrySchedule 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustrySchedule(null)));
// 测试 belongingPeople 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(null)));
// 测试 city 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCity(null)));
// 测试 country 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCountry(null)));
// 测试 address 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAddress(null)));
// 测试 phone 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setPhone(null)));
// 测试 companyFax 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyFax(null)));
// 测试 companyHttp 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyHttp(null)));
// 测试 companyProfile 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyProfile(null)));
// 测试 customerStatus 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStatus(null)));
// 测试 socialInformationCodeCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSocialInformationCodeCertificate(null)));
// 测试 legalRepresentativesPhoto 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLegalRepresentativesPhoto(null)));
// 测试 proofPaidCapital 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setProofPaidCapital(null)));
// 测试 assetCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAssetCertificate(null)));
// 测试 assetCertificateMortgage 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAssetCertificateMortgage(null)));
// 测试 guarantorCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setGuarantorCertificate(null)));
// 测试 businessScope 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessScope(null)));
// 测试 createTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null)));
// 测试 updateTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUpdateTime(null)));
// 测试 industryClassify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustryClassify(null)));
// 测试 otherQualifications 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOtherQualifications(null)));
// 准备参数
CustomerPageReqVO reqVO = new CustomerPageReqVO();
reqVO.setCustomerCalssify(null);
reqVO.setCustomerName(null);
reqVO.setCustomerType(null);
reqVO.setUnifiedSettlement(null);
reqVO.setCustomerNature(null);
reqVO.setCooperationMode(null);
reqVO.setLinebusinessId(null);
reqVO.setStatus(null);
// reqVO.setBelongingPeople(null);
reqVO.setCustomerLogo(null);
reqVO.setEnterpriseNature(null);
reqVO.setCustomerSource(null);
reqVO.setCustomerStarrating(null);
reqVO.setIndustrySchedule(null);
reqVO.setBelongingPeople(null);
reqVO.setCity(null);
reqVO.setCountry(null);
reqVO.setAddress(null);
reqVO.setPhone(null);
reqVO.setCompanyFax(null);
reqVO.setCompanyHttp(null);
reqVO.setCompanyProfile(null);
reqVO.setCustomerStatus(null);
reqVO.setSocialInformationCodeCertificate(null);
reqVO.setLegalRepresentativesPhoto(null);
reqVO.setProofPaidCapital(null);
reqVO.setAssetCertificate(null);
reqVO.setAssetCertificateMortgage(null);
reqVO.setGuarantorCertificate(null);
reqVO.setBusinessScope(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUpdateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setIndustryClassify(null);
reqVO.setOtherQualifications(null);
// 调用
PageResult<CustomerDO> pageResult = customerService.getCustomerPage(reqVO);
@ -168,50 +232,114 @@ public class CustomerServiceImplTest extends BaseDbUnitTest {
public void testGetCustomerList() {
// mock 数据
CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到
o.setCustomerCalssify(null);
o.setCustomerName(null);
o.setCustomerType(null);
o.setUnifiedSettlement(null);
o.setCustomerNature(null);
o.setCooperationMode(null);
o.setLinebusinessId(null);
o.setStatus(null);
o.setCustomerLogo(null);
o.setEnterpriseNature(null);
o.setCustomerSource(null);
o.setCustomerStarrating(null);
o.setIndustrySchedule(null);
o.setBelongingPeople(null);
o.setCity(null);
o.setCountry(null);
o.setAddress(null);
o.setPhone(null);
o.setCompanyFax(null);
o.setCompanyHttp(null);
o.setCompanyProfile(null);
o.setCustomerStatus(null);
o.setSocialInformationCodeCertificate(null);
o.setLegalRepresentativesPhoto(null);
o.setProofPaidCapital(null);
o.setAssetCertificate(null);
o.setAssetCertificateMortgage(null);
o.setGuarantorCertificate(null);
o.setBusinessScope(null);
o.setCreateTime(null);
o.setUpdateTime(null);
o.setIndustryClassify(null);
o.setOtherQualifications(null);
});
customerMapper.insert(dbCustomer);
// 测试 customerCalssify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerCalssify(null)));
// 测试 customerName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null)));
// 测试 customerType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null)));
// 测试 unifiedSettlement 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnifiedSettlement(null)));
// 测试 customerNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerNature(null)));
// 测试 cooperationMode 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCooperationMode(null)));
// 测试 linebusinessId 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLinebusinessId(null)));
// 测试 status 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setStatus(null)));
// 测试 customerLogo 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerLogo(null)));
// 测试 enterpriseNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseNature(null)));
// 测试 customerSource 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerSource(null)));
// 测试 customerStarrating 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStarrating(null)));
// 测试 industrySchedule 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustrySchedule(null)));
// 测试 belongingPeople 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(null)));
// 测试 city 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCity(null)));
// 测试 country 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCountry(null)));
// 测试 address 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAddress(null)));
// 测试 phone 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setPhone(null)));
// 测试 companyFax 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyFax(null)));
// 测试 companyHttp 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyHttp(null)));
// 测试 companyProfile 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyProfile(null)));
// 测试 customerStatus 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStatus(null)));
// 测试 socialInformationCodeCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSocialInformationCodeCertificate(null)));
// 测试 legalRepresentativesPhoto 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLegalRepresentativesPhoto(null)));
// 测试 proofPaidCapital 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setProofPaidCapital(null)));
// 测试 assetCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAssetCertificate(null)));
// 测试 assetCertificateMortgage 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAssetCertificateMortgage(null)));
// 测试 guarantorCertificate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setGuarantorCertificate(null)));
// 测试 businessScope 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessScope(null)));
// 测试 createTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null)));
// 测试 updateTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUpdateTime(null)));
// 测试 industryClassify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustryClassify(null)));
// 测试 otherQualifications 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOtherQualifications(null)));
// 准备参数
CustomerExportReqVO reqVO = new CustomerExportReqVO();
reqVO.setCustomerCalssify(null);
reqVO.setCustomerName(null);
reqVO.setCustomerType(null);
reqVO.setUnifiedSettlement(null);
reqVO.setCustomerNature(null);
reqVO.setCooperationMode(null);
reqVO.setLinebusinessId(null);
reqVO.setStatus(null);
reqVO.setCustomerLogo(null);
reqVO.setEnterpriseNature(null);
reqVO.setCustomerSource(null);
reqVO.setCustomerStarrating(null);
reqVO.setIndustrySchedule(null);
reqVO.setBelongingPeople(null);
reqVO.setCity(null);
reqVO.setCountry(null);
reqVO.setAddress(null);
reqVO.setPhone(null);
reqVO.setCompanyFax(null);
reqVO.setCompanyHttp(null);
reqVO.setCompanyProfile(null);
reqVO.setCustomerStatus(null);
reqVO.setSocialInformationCodeCertificate(null);
reqVO.setLegalRepresentativesPhoto(null);
reqVO.setProofPaidCapital(null);
reqVO.setAssetCertificate(null);
reqVO.setAssetCertificateMortgage(null);
reqVO.setGuarantorCertificate(null);
reqVO.setBusinessScope(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUpdateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setIndustryClassify(null);
reqVO.setOtherQualifications(null);
// 调用
List<CustomerDO> list = customerService.getCustomerList(reqVO);

@ -1,5 +1,5 @@
server:
port: 48080
port: 8091
--- #################### 数据库相关配置 ####################
@ -37,38 +37,48 @@ spring:
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 # 配置检测连接是否有效
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
name: yxsass
url: jdbc:mysql://112.124.64.122:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.jdbc.Driver
username: yxsass
password: jxjitjjxJFNM5YNW
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
name: yxsass
url: jdbc:mysql://112.124.64.122:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.jdbc.Driver
username: yxsass
password: jxjitjjxJFNM5YNW
name: yxscm
url: jdbc:mysql://222.71.165.188:3309/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例
username: root
password: linus,.123
# username: sa
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
slave: # 模拟从库,可根据自己需要修改
name: yxscm
url: jdbc:mysql://222.71.165.188:3309/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例
username: root
password: linus,.123
# username: sa
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
database: 0 # 数据库索引
password: 'qweasd,.123' # 密码,建议生产环境开启
--- #################### 定时任务相关配置 ####################
# Quartz 配置项,对应 QuartzProperties 配置类
spring:
quartz:
auto-startup: true # 测试环境,需要开启 Job
auto-startup: false # 本地开发环境,尽量不要开启 Job
scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
@ -127,7 +137,7 @@ spring:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
url: http://222.71.165.187:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# Spring Boot Admin Server 服务端的相关配置
@ -137,11 +147,25 @@ spring:
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
--- #################### 微信公众号相关配置 ####################
wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
mp:
# 公众号配置(必填)
level:
# 配置自己写的 MyBatis Mapper 打印日志
com.yunxi.scm.module.bpm.dal.mysql: debug
com.yunxi.scm.module.infra.dal.mysql: debug
com.yunxi.scm.module.infra.dal.mysql.job.JobLogMapper: INFO # 配置 JobLogMapper 的日志级别为 info
com.yunxi.scm.module.pay.dal.mysql: debug
com.yunxi.scm.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 JobLogMapper 的日志级别为 info
com.yunxi.scm.module.system.dal.mysql: debug
com.yunxi.scm.module.tool.dal.mysql: debug
com.yunxi.scm.module.member.dal.mysql: debug
com.yunxi.scm.module.trade.dal.mysql: debug
com.yunxi.scm.module.promotion.dal.mysql: debug
com.yunxi.scm.module.demo.dal.mysql: debug # demo模块 MyBatis 操作日志
debug: false
--- #################### 微信公众号、小程序相关配置 ####################
wx:
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
app-id: wx041349c6f39b268b
secret: 5abee519483bc9f8cb37ce280e814bd0
# 存储配置,解决 AccessToken 的跨节点的共享
@ -150,8 +174,8 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
key-prefix: wx # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
appid: wx63c280fe3248a3e7
secret: 6f270509224a7ae1296bbf1c8cb97aed
appid: wx62056c0d5e8db250
secret: 333ae72f41552af1e998fe1f54e1584a
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis会自动从 Spring 中获取
key-prefix: wa # Redis Key 的前缀
@ -161,6 +185,10 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
# 芋道配置项,设置当前项目所有自定义的配置
yunxi:
captcha:
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试;
security:
mock-enable: true
xss:
enable: false
exclude-urls: # 如下两个 url仅仅是为了演示去掉配置也没关系
@ -169,7 +197,11 @@ yunxi:
pay:
order-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
demo: true # 开启演示模式
access-log: # 访问日志的配置项
enable: false
error-code: # 错误码相关配置项
enable: false
demo: false # 关闭演示模式
justauth:
enabled: true
@ -183,15 +215,14 @@ justauth:
client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
agent-id: 1000004
ignore-check-redirect-uri: true
WECHAT_MINI_APP: # 微信小程序
client-id: ${wx.miniapp.appid}
client-secret: ${wx.miniapp.secret}
ignore-check-redirect-uri: true
ignore-check-state: true # 微信小程序,不会使用到 state所以不进行校验
cache:
type: REDIS
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
wx:
mp:
useRedis: false
defaultContent: \u60A8\u597D\uFF0C\u6709\u4EC0\u4E48\u95EE\u9898\uFF1F
redisConfig:
host: 127.0.0.1
port: 6379
password:

Loading…
Cancel
Save