tx
tengxi 1 year ago
commit 5bb22e3c7a

@ -7,14 +7,14 @@ VITE_PUBLIC_PATH = /
# 本地开发代理,可以解决跨域及多地址代理 # 本地开发代理,可以解决跨域及多地址代理
# 如果接口地址匹配到则会转发到http://localhost:3000防止本地出现跨域问题 # 如果接口地址匹配到则会转发到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"]] # VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
# 是否删除Console.log # 是否删除Console.log
VITE_DROP_CONSOLE = false VITE_DROP_CONSOLE = false
# 基础页面地址,例如 swagger 等页面 # 基础页面地址,例如 swagger 等页面
VITE_GLOB_BASE_URL = "http://localhost:8091" VITE_GLOB_BASE_URL = "http://192.168.0.162:8091"
# 接口地址,如果没有跨域问题,直接在这里配置即可 # 接口地址,如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL = /dev-api VITE_GLOB_API_URL = /dev-api

@ -20,6 +20,12 @@ export function updateEnterprise(data) {
return defHttp.put({ url: '/system/enterprise/update', data }) return defHttp.put({ url: '/system/enterprise/update', data })
} }
// 修改企业状态
export function updateEnterpriseStatus(data) {
return defHttp.put({ url: '/system/enterprise/updateStatus', data })
}
// 删除企业信息 // 删除企业信息
export function deleteEnterprise(id: number) { export function deleteEnterprise(id: number) {
return defHttp.delete({ url: '/system/enterprise/delete?id=' + id }) return defHttp.delete({ url: '/system/enterprise/delete?id=' + id })

@ -25,7 +25,12 @@ export function deleteBusinessWarehouse(id: number) {
return defHttp.delete({ url: '/system/business-warehouse/delete?id=' + id }) return defHttp.delete({ url: '/system/business-warehouse/delete?id=' + id })
} }
// 导出业务线/仓库 Excel // 导出业务线 Excel
export function exportBusinessWarehouse(params) { export function exportBusinessWarehouse(params) {
return defHttp.download({ url: '/xxjj/business-warehouse/export-excel', params }, '业务线/仓库.xls') return defHttp.download({ url: '/system/business-warehouse/export-excel', params }, '业务线.xls')
}
// 查询业务线(精简)列表
export function listSimpleBusiness() {
return defHttp.get({ url: '/system/business-warehouse/list-all-simple' })
} }

@ -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')
}

@ -5,6 +5,7 @@ import './design/index.less'
// Register icon sprite // Register icon sprite
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'
import { createApp } from 'vue' import { createApp } from 'vue'
import Antd from 'ant-design-vue'
import App from './App.vue' import App from './App.vue'
import { initAppConfigStore } from '@/logics/initAppConfig' import { initAppConfigStore } from '@/logics/initAppConfig'
import { setupErrorHandle } from '@/logics/error-handle' import { setupErrorHandle } from '@/logics/error-handle'
@ -17,6 +18,7 @@ import { registerGlobComp } from '@/components/registerGlobComp'
import '@/utils/tongji' import '@/utils/tongji'
async function bootstrap() { async function bootstrap() {
const app = createApp(App) const app = createApp(App)
@ -57,7 +59,7 @@ async function bootstrap() {
// https://next.router.vuejs.org/api/#isready // https://next.router.vuejs.org/api/#isready
// await router.isReady(); // await router.isReady();
app.mount('#app') app.use(Antd).mount('#app')
} }
bootstrap() bootstrap()

@ -156,9 +156,11 @@ export enum DICT_TYPE {
// ============= BUSINESSLINE 模块================= // ============= BUSINESSLINE 模块=================
BUSINESS_TYPE = 'business_type', //业务线类型 BUSINESS_TYPE = 'business_type', //业务线类型
DIFF_FLAG = 'diff_flag', DIFF_FLAG = 'diff_flag',
CLASS_STATUS = 'class_status', //类别状态
DUTY_TYPE = 'duty_type', //业务线的所属分类
BUSINESS_ORGANIZATION_TYPE = 'business_organization_type', //业务组织类型
// ============= ENTERPRISEBRANCHING 模块================= // ============= ENTERPRISEBRANCHING 模块=================
ENTERPRISE_TYPE = 'enterprise_type', //业务线类型 ENTERPRISE_TYPE = 'enterprise_type', //业务线类型
CLASS_STATUS = 'class_status',
} }

@ -34,6 +34,7 @@ export const settingList = [
name: '新消息通知', name: '新消息通知',
component: 'MsgNotify', component: 'MsgNotify',
}, },
] ]
// 基础设置 form // 基础设置 form

@ -6,6 +6,7 @@ import BaseSetting from './BaseSetting.vue'
import SecureSetting from './SecureSetting.vue' import SecureSetting from './SecureSetting.vue'
import AccountBind from './AccountBind.vue' import AccountBind from './AccountBind.vue'
import MsgNotify from './MsgNotify.vue' import MsgNotify from './MsgNotify.vue'
import { ScrollContainer } from '@/components/Container/index' import { ScrollContainer } from '@/components/Container/index'
const wrapperRef = ref(null) const wrapperRef = ref(null)

@ -0,0 +1,890 @@
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import type { UnwrapRef } from 'vue'
import {
FieldTimeOutlined,
LeftOutlined, ManOutlined,
RightCircleFilled,
UserOutlined, WindowsFilled,
WomanOutlined,
} from '@ant-design/icons-vue'
//
const sex = ref<string>('保密')//
const message = ref<string>('全部信息')//
interface FormState {
name: string
delivery: boolean
type: string[]
resource: string
desc: string
}
const formState: UnwrapRef<FormState> = reactive({
name: '',
delivery: false,
type: [],
resource: '',
desc: '',
})
//
const open = ref<boolean>(false)
const confirmLoading = ref<boolean>(false)
function showModal() {
open.value = true
}
function handleOk() {
confirmLoading.value = true
setTimeout(() => {
open.value = false
confirmLoading.value = false
}, 2000)
}
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',
color:'#409EFF',
}]
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>
<a-card
style="width: 80%; padding: 20px;margin: 20px auto;"
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">
<p>
<span></span>
基本资料
</p>
</div>
<p class="pleft">
基本信息
</p>
<div class="datumbox">
<div class="form">
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<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>
<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>
<a-form-item label="员工工号:">
<a-input v-model:value="value" placeholder="输入内容" />
</a-form-item>
<a-form-item label="手机号码:">
<div class="phonecss">
<a-input v-model:value="value" placeholder="输入内容" :style="phoneStyle" />
<div>
<a-button :style="changeStyle" @click="showModal">
修改手机号
</a-button>
<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="输入内容" />
</a-form-item>
<a-form-item label="验证码:">
<div class="phonecss">
<a-input v-model:value="value" placeholder="输入验证码" :style="phoneStyle" />
<a-button :style="changeStyle">
获取验证码
</a-button>
</div>
</a-form-item>
<a-form-item label="新手机号码:">
<a-input v-model:value="value" placeholder="输入新手机号" />
</a-form-item>
</a-form>
</div>
</a-modal>
</div>
</div>
</a-form-item>
<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>
<a-form-item name="出生日期" label="DatePicker" v-bind="config">
<a-date-picker v-model:value="formState['date-picker']" value-format="YYYY-MM-DD" />
</a-form-item>
<a-form-item label="性别:">
<div>
<div>
<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>
<p class="pleft">
更多信息
</p>
<a-form label-width="100px" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="籍贯:">
<a-input v-model:value="value" placeholder="输入内容" />
</a-form-item>
<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="输入内容" />
</a-form-item>
<a-form-item label="毕业院校:">
<a-input v-model:value="value" placeholder="输入内容" />
</a-form-item>
<a-form-item name="毕业时间:" label="DatePicker" v-bind="config">
<a-date-picker v-model:value="formState['date-picker']" value-format="YYYY-MM-DD" />
</a-form-item>
<a-form-item label="个人简介:" placeholder="输入内容" name="desc">
<a-textarea v-model:value="formState.desc" />
</a-form-item>
<a-form-item label="">
<button class="save">
保存
</button>
</a-form-item>
</a-form>
</a-form>
</div>
<div class="usepic">
<div class="idpic">
<a-avatar :size="{ xs: 24, sm: 32, md: 40, lg: 64, xl: 80, xxl: 100 }">
<template #icon>
<UserOutlined />
</template>
</a-avatar>
</div>
<div class="change">
<a-upload
v-model:file-list="fileList"
list-type="picture"
:max-count="1"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button>
<upload-outlined />
修改头像
</a-button>
</a-upload>
</div>
</div>
</div>
</div>
</a-tab-pane>
<!-- 第二部分 -->
<a-tab-pane key="2" tab="修改密码">
<div class="datum">
<div class="datumtop">
<p>
<span></span>
修改密码
</p>
</div>
<div class="datumbox">
<div class="form">
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="验证码:">
<div class="phonecss">
<a-input v-model:value="value" placeholder="输入内容" :style="phoneStyle" />
<a-button :style="changeStyle">
获取验证码
</a-button>
</div>
</a-form-item>
<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>
<a-form-item label="新密码:">
<a-input v-model:value="value" placeholder="输入确认新密码" />
</a-form-item>
<button class="save">
保存
</button>
</a-form>
</div>
</div>
</div>
</a-tab-pane>
<!-- 第三部分 -->
<a-tab-pane key="3" tab="登录记录">
<div class="datum">
<div class="datumtop">
<p>
<span></span>
登录记录
</p>
</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 class="recordright">
<span><FieldTimeOutlined /></span>{{ `2023-08-22 12:00` }}
</div>
</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 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">
<p>
<span></span>
信息设置
</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">
<p>
<span></span>
公司列表
</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>
</a-card>
</template>
<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;
}
.ant-tabs-tab .ant-tabs-tab-active{
padding: 8px 24px;
text-align: center;
}
.datum{
//
width: 100%;
margin-left: 20px;
color: #666;
.datumtop{
p{
margin-bottom: 15px;
font-size:18px;
font-weight:700;
span{
font-size:14px;
color:#409EFF;
}
}
}
.datumbox{
display: flex;
.form{
width: 40%;
.save{
width: 160px;
height: 40px;
margin-left: 100px;
color: aliceblue;
background-color: #409EFF;
border: none;
border-radius: 5px;
}
}
.phonecss{
display: flex;
justify-content: space-between;
}
.usepic{
display: flex;
flex-direction: column;
align-items: center;
margin-left: 150px;
.change{
margin-top: 20px;
}
}
}
.pleft{
margin: 20px ;
}
}
.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;
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;
}
}
}
}
:where(.css-dev-only-do-not-override-176pxz6).ant-picker{
width: 100%;
height: 40px;
}
:where(.css-dev-only-do-not-override-176pxz6).ant-input {
height: 40px;
}
:where(.css-dev-only-do-not-override-176pxz6).ant-input .phone{
width: 50%;
}
: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>

@ -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 './businessOrganization.data'
import { createBusinessWarehouse, getBusinessWarehouse, updateBusinessWarehouse } from '@/api/xxjj/businessWarehouse'
defineOptions({ name: 'BusinessOrganizationModal' })
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 getBusinessWarehouse(data.record.id)
setFieldsValue({ ...res })
}
})
async function handleSubmit() {
try {
const values = await validate()
setModalProps({ confirmLoading: true })
if (unref(isUpdate)) {
await updateBusinessWarehouse(values)
} else {
await createBusinessWarehouse(values)
}
closeModal()
emit('success')
createMessage.success(t('common.saveSuccessText'))
} finally {
setModalProps({ confirmLoading: false })
}
}
</script>

@ -0,0 +1,258 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { listSimpleBusiness } from '@/api/xxjj/businessWarehouse'
export const columns: BasicColumn[] = [
{
title: '业务线名称',
dataIndex: 'name',
width: 160
},
{
title: '类型',
dataIndex: 'type',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.BUSINESS_ORGANIZATION_TYPE)
}
},
{
title: '状态',
dataIndex: 'type',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.CLASS_STATUS)
}
},
{
title: '成员数量',
dataIndex: 'employeeNum',
width: 160
},
{
title: '主管人员',
dataIndex: 'belongUserId',
width: 160
},
{
title: '描述',
dataIndex: 'description',
width: 160
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
]
export const searchFormSchema: FormSchema[] = [
{
label: '业务线名称',
field: 'name',
component: 'Input',
colProps: { span: 8 }
},
// {
// label: '类型',
// field: 'type',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE)
// },
// colProps: { span: 8 }
// },
// {
// label: '所属行业',
// field: 'industry',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.DUTY_TYPE)
// },
// colProps: { span: 8 }
// },
// {
// label: '成立时间',
// field: 'establishDate',
// component: 'RangePicker',
// colProps: { span: 8 }
// },
// {
// label: '归属人员',
// field: 'belongUserId',
// component: 'Input',
// colProps: { span: 8 }
// },
// {
// label: '品牌/业务线/事业群名称',
// field: 'brandName',
// component: 'Input',
// colProps: { span: 8 }
// },
// {
// label: '业务线仓库区分(0业务线,1仓库)',
// field: 'diffFlag',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.DIFF_FLAG)
// },
// colProps: { span: 8 }
// },
]
export const createFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '业务组织编号',
field: 'businessCode',
required: true,
component: 'Input'
},
{
label: '业务组织名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '业务组织简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '业务组织简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '隶属业务线',
field: 'parentId',
required: true,
component: 'ApiTreeSelect',
componentProps: {
api: () => listSimpleBusiness(),
fieldNames: {
label: 'name',
key: 'id',
value: 'id',
},
handleTree: 'id',
},
},
{
label: '类型',
field: 'type',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE, 'number')
}
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '成立时间',
field: 'establishDate',
component: 'DatePicker'
},
{
label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '介绍',
field: 'description',
component: 'InputTextArea'
},
{
label: '区分标志',
field: 'diffFlag',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number')
}
},
]
export const updateFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '业务线编号',
field: 'businessCode',
required: true,
component: 'Input'
},
{
label: '业务线名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '业务线简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '类型',
field: 'type',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.BUSINESS_ORGANIZATION_TYPE, 'number')
}
},
{
label: '所属行业',
field: 'industry',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number')
}
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '成立时间',
field: 'establishDate',
component: 'DatePicker'
},
{
label: '介绍',
field: 'description',
component: 'InputTextArea'
},
{
label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '区分标志',
field: 'diffFlag',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number')
}
},
]

@ -0,0 +1,92 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" v-auth="['system:business-warehouse:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }}
</a-button>
<a-button type="warning" v-auth="['system:business-warehouse: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: 'system:business-warehouse:update', onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'error',
label: t('action.delete'),
auth: 'system:business-warehouse:delete',
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<BusinessOrganizationModal @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 BusinessOrganizationModal from './BusinessOrganizationModal.vue'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteBusinessWarehouse, exportBusinessWarehouse, getBusinessWarehousePage } from '@/api/xxjj/businessWarehouse'
import { columns, searchFormSchema } from './businessOrganization.data'
defineOptions({ name: 'BusinessOrganization' })
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '业务线列表',
api: getBusinessWarehousePage,
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 exportBusinessWarehouse(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
}
})
}
async function handleDelete(record: Recordable) {
await deleteBusinessWarehouse(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
</script>

@ -0,0 +1,42 @@
<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import type { TreeItem } from '@/components/Tree'
import { BasicTree } from '@/components/Tree'
import { listSimpleDept } from '@/api/system/dept'
import { listSimpleBusiness } from '@/api/xxjj/businessWarehouse'
import { handleTree } from '@/utils/tree'
defineOptions({ name: 'SystemDeptTree' })
const emit = defineEmits(['select'])
const treeData = ref<TreeItem[]>([])
async function fetch() {
const res = await listSimpleBusiness()
treeData.value = handleTree(res, 'id')
}
function handleSelect(keys) {
emit('select', keys[0])
}
onMounted(() => {
fetch()
})
</script>
<template>
<div class="m-4 mr-0 overflow-hidden">
<BasicTree
title="业务线列表"
toolbar
search
tree-wrapper-class-name="h-[calc(100%-35px)] overflow-auto"
:click-row-to-expand="false"
:tree-data="treeData"
:field-names="{ key: 'id', title: 'name' }"
@select="handleSelect"
/>
</div>
</template>

@ -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 './businessWarehouse.data'
import { createBusinessWarehouse, getBusinessWarehouse, updateBusinessWarehouse } from '@/api/xxjj/businessWarehouse'
defineOptions({ name: 'BusinessWarehouseModal' })
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 getBusinessWarehouse(data.record.id)
setFieldsValue({ ...res })
}
})
async function handleSubmit() {
try {
const values = await validate()
setModalProps({ confirmLoading: true })
if (unref(isUpdate)) {
await updateBusinessWarehouse(values)
} else {
await createBusinessWarehouse(values)
}
closeModal()
emit('success')
createMessage.success(t('common.saveSuccessText'))
} finally {
setModalProps({ confirmLoading: false })
}
}
</script>

@ -0,0 +1,250 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '业务线名称',
dataIndex: 'name',
width: 160
},
{
title: '类型',
dataIndex: 'type',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.BUSINESS_TYPE)
}
},
{
title: '状态',
dataIndex: 'type',
width: 180,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.CLASS_STATUS)
}
},
{
title: '关联机构',
dataIndex: 'institutionNum',
width: 160
},
{
title: '成员数量',
dataIndex: 'employeeNum',
width: 160
},
{
title: '主管人员',
dataIndex: 'belongUserId',
width: 160
},
{
title: '介绍',
dataIndex: 'description',
width: 160
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
]
export const searchFormSchema: FormSchema[] = [
{
label: '业务线名称',
field: 'name',
component: 'Input',
colProps: { span: 8 }
},
// {
// label: '类型',
// field: 'type',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.BUSINESS_TYPE)
// },
// colProps: { span: 8 }
// },
// {
// label: '所属行业',
// field: 'industry',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.DUTY_TYPE)
// },
// colProps: { span: 8 }
// },
// {
// label: '成立时间',
// field: 'establishDate',
// component: 'RangePicker',
// colProps: { span: 8 }
// },
// {
// label: '归属人员',
// field: 'belongUserId',
// component: 'Input',
// colProps: { span: 8 }
// },
// {
// label: '品牌/业务线/事业群名称',
// field: 'brandName',
// component: 'Input',
// colProps: { span: 8 }
// },
// {
// label: '业务线仓库区分(0业务线,1仓库)',
// field: 'diffFlag',
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.DIFF_FLAG)
// },
// colProps: { span: 8 }
// },
]
export const createFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '业务线编号',
field: 'businessCode',
required: true,
component: 'Input'
},
{
label: '业务线名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '业务线简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '类型',
field: 'type',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.BUSINESS_TYPE, 'number')
}
},
{
label: '所属行业',
field: 'industry',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number')
}
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '成立时间',
field: 'establishDate',
component: 'DatePicker'
},
{
label: '介绍',
field: 'description',
component: 'InputTextArea'
},
{
label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '区分标志',
field: 'diffFlag',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number')
}
},
]
export const updateFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '业务线编号',
field: 'businessCode',
required: true,
component: 'Input'
},
{
label: '业务线名称',
field: 'name',
required: true,
component: 'Input'
},
{
label: '业务线简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '类型',
field: 'type',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.BUSINESS_TYPE, 'number')
}
},
{
label: '所属行业',
field: 'industry',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DUTY_TYPE, 'number')
}
},
{
label: '所在城市',
field: 'city',
component: 'Input'
},
{
label: '成立时间',
field: 'establishDate',
component: 'DatePicker'
},
{
label: '介绍',
field: 'description',
component: 'InputTextArea'
},
{
label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '区分标志',
field: 'diffFlag',
required: true,
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.DIFF_FLAG, 'number')
}
},
]

@ -0,0 +1,102 @@
<template>
<div class="flex">
<BusinessTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<BasicTable class="w-3/4 xl:w-4/5" :search-info="searchInfo" @register="registerTable">
<template #toolbar>
<a-button type="primary" v-auth="['system:business-warehouse:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }}
</a-button>
<a-button type="warning" v-auth="['system:business-warehouse: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: 'system:business-warehouse:update', onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'error',
label: t('action.delete'),
auth: 'system:business-warehouse:delete',
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<BusinessWarehouseModal @register="registerModal" @success="reload()" />
</div>
</template>
<script lang="ts" setup>
import { reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import BusinessWarehouseModal from './BusinessWarehouseModal.vue'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteBusinessWarehouse, exportBusinessWarehouse, getBusinessWarehousePage } from '@/api/xxjj/businessWarehouse'
import { columns, searchFormSchema } from './businessWarehouse.data'
import BusinessTree from './BusinessTree.vue'
defineOptions({ name: 'BusinessWarehouse' })
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const searchInfo = reactive<Recordable>({})
const [registerTable, { getForm, reload }] = useTable({
title: '业务线/仓库列表',
api: getBusinessWarehousePage,
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 exportBusinessWarehouse(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
}
})
}
async function handleDelete(record: Recordable) {
await deleteBusinessWarehouse(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
/** 点击部门操作 */
function handleSelect(deptId = '') {
searchInfo.deptId = deptId
reload()
}
</script>

@ -21,7 +21,7 @@ const isUpdate = ref(true)
const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({ const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
labelWidth: 120, labelWidth: 120,
baseColProps: { span: 24 }, baseColProps: { span: 12 },
schemas: createFormSchema, schemas: createFormSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
actionColOptions: { span: 23 } actionColOptions: { span: 23 }

@ -120,26 +120,6 @@ export const createFormSchema: FormSchema[] = [
required: true, required: true,
component: 'Input' component: 'Input'
}, },
{
label: '业务线简称',
field: 'businessSimple',
component: 'Input'
},
{
label: '传真',
field: 'fax',
component: 'Input'
},
{
label: '网址',
field: 'url',
component: 'Input'
},
{
label: '介绍',
field: 'description',
component: 'InputTextArea'
},
{ {
label: '业务线名称', label: '业务线名称',
field: 'name', field: 'name',
@ -147,17 +127,8 @@ export const createFormSchema: FormSchema[] = [
component: 'Input' component: 'Input'
}, },
{ {
label: '业务线LOGO', label: '业务线简称',
field: 'businessLogo', field: 'businessSimple',
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1
}
},
{
label: '父id',
field: 'parentId',
component: 'Input' component: 'Input'
}, },
{ {
@ -187,22 +158,17 @@ export const createFormSchema: FormSchema[] = [
component: 'DatePicker' component: 'DatePicker'
}, },
{ {
label: '归属人员', label: '介绍',
field: 'belongUserId', field: 'description',
component: 'Input' component: 'InputTextArea'
},
{
label: '品牌/业务线/事业群名称',
field: 'brandName',
component: 'Input'
}, },
{ {
label: '电话', label: '归属人员',
field: 'phone', field: 'belongUserId',
component: 'Input' component: 'Input'
}, },
{ {
label: '业务线仓库区分(0业务线,1仓库)', label: '区分标志',
field: 'diffFlag', field: 'diffFlag',
required: true, required: true,
component: 'Select', component: 'Select',
@ -225,11 +191,6 @@ export const updateFormSchema: FormSchema[] = [
required: true, required: true,
component: 'Input' component: 'Input'
}, },
{
label: '业务线简称',
field: 'businessSimple',
component: 'Input'
},
{ {
label: '业务线名称', label: '业务线名称',
field: 'name', field: 'name',
@ -237,13 +198,8 @@ export const updateFormSchema: FormSchema[] = [
component: 'Input' component: 'Input'
}, },
{ {
label: '业务线LOGO', label: '业务线简称',
field: 'businessLogo', field: 'businessSimple',
component: 'Upload'
},
{
label: '父id',
field: 'parentId',
component: 'Input' component: 'Input'
}, },
{ {
@ -272,38 +228,18 @@ export const updateFormSchema: FormSchema[] = [
field: 'establishDate', field: 'establishDate',
component: 'DatePicker' component: 'DatePicker'
}, },
{
label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '品牌/业务线/事业群名称',
field: 'brandName',
component: 'Input'
},
{
label: '电话',
field: 'phone',
component: 'Input'
},
{
label: '传真',
field: 'fax',
component: 'Input'
},
{
label: '网址',
field: 'url',
component: 'Input'
},
{ {
label: '介绍', label: '介绍',
field: 'description', field: 'description',
component: 'InputTextArea' component: 'InputTextArea'
}, },
{ {
label: '业务线仓库区分(0业务线,1仓库)', label: '归属人员',
field: 'belongUserId',
component: 'Input'
},
{
label: '区分标志',
field: 'diffFlag', field: 'diffFlag',
required: true, required: true,
component: 'Select', component: 'Select',

@ -2,10 +2,10 @@
<div> <div>
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #toolbar> <template #toolbar>
<a-button type="primary" v-auth="['xxjj:business-warehouse:create']" :preIcon="IconEnum.ADD" @click="handleCreate"> <a-button type="primary" v-auth="['system:business-warehouse:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }} {{ t('action.create') }}
</a-button> </a-button>
<a-button type="warning" v-auth="['xxjj:business-warehouse:export']" :preIcon="IconEnum.EXPORT" @click="handleExport"> <a-button type="warning" v-auth="['system:business-warehouse:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
{{ t('action.export') }} {{ t('action.export') }}
</a-button> </a-button>
</template> </template>
@ -13,12 +13,12 @@
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
:actions="[ :actions="[
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'xxjj:business-warehouse:update', onClick: handleEdit.bind(null, record) }, { icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:business-warehouse:update', onClick: handleEdit.bind(null, record) },
{ {
icon: IconEnum.DELETE, icon: IconEnum.DELETE,
color: 'error', color: 'error',
label: t('action.delete'), label: t('action.delete'),
auth: 'xxjj:business-warehouse:delete', auth: 'system:business-warehouse:delete',
popConfirm: { popConfirm: {
title: t('common.delMessage'), title: t('common.delMessage'),
placement: 'left', placement: 'left',

@ -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,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,9 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import {h} from "vue";
import {Switch} from "ant-design-vue";
import {useMessage} from "@/hooks/web/useMessage";
import {updateEnterpriseStatus} from "@/api/system/enterprise";
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
// { // {
@ -53,6 +57,39 @@ export const columns: BasicColumn[] = [
return useRender.renderDate(text) return useRender.renderDate(text)
} }
}, },
{
title: '状态',
dataIndex: 'enterpriseStatus',
width: 180,
customRender: ({ record }) => {
if (!Reflect.has(record, 'pendingStatus'))
record.pendingStatus = false
return h(Switch, {
checked: record.status === 0,
checkedChildren: '已启用',
unCheckedChildren: '已禁用',
loading: record.pendingStatus,
onChange(checked: boolean) {
record.pendingStatus = true
const newStatus = checked ? 0 : 1
const { createMessage } = useMessage()
updateEnterpriseStatus(record.id, newStatus)
.then(() => {
record.status = newStatus
createMessage.success('已成功修改用户状态')
})
.catch(() => {
createMessage.error('修改用户状态失败')
})
.finally(() => {
record.pendingStatus = false
})
},
})
},
},
// { // {
// title: '企业简称', // title: '企业简称',
// dataIndex: 'shortName', // dataIndex: 'shortName',

@ -6,7 +6,7 @@
<!-- {{ t('action.create') }}--> <!-- {{ t('action.create') }}-->
<!-- </a-button>--> <!-- </a-button>-->
<a-button type="primary" v-auth="['system:enterprise:create']" :preIcon="IconEnum.ADD" @click="handleCreate"> <a-button type="primary" v-auth="['system:enterprise:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
新增机构 {{ '新增机构' }}
</a-button> </a-button>
<a-button type="warning" v-auth="['system:enterprise:export']" :preIcon="IconEnum.EXPORT" @click="handleExport"> <a-button type="warning" v-auth="['system:enterprise:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
{{ t('action.export') }} {{ t('action.export') }}
@ -16,10 +16,24 @@
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
:actions="[ :actions="[
{ icon: IconEnum.EDIT, label: '设置状态', auth: 'system:enterprise:update', onClick: handleEdit.bind(null, record) }, { icon: IconEnum.EDIT, label: '设置状态', auth: 'system:enterprise:update', onClick: handleEdit.bind(null, record) },
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:enterprise:update', onClick: handleEdit1.bind(null, record) }, { icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:enterprise:update', onClick: handleEdit1.bind(null, record) },
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:enterprise:update', onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'warrning',
label: '状态',
auth: 'system:enterprise:delete',
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete1.bind(null, record)
}
},
{ {
icon: IconEnum.DELETE, icon: IconEnum.DELETE,
color: 'error', color: 'error',
@ -46,7 +60,12 @@ import { useModal } from '@/components/Modal'
import EnterpriseModal from './EnterpriseModal.vue' import EnterpriseModal from './EnterpriseModal.vue'
import { IconEnum } from '@/enums/appEnum' import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table' import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteEnterprise, exportEnterprise, getEnterprisePage } from '@/api/system/enterprise' import {
deleteEnterprise,
exportEnterprise,
getEnterprisePage,
updateEnterpriseStatus
} from '@/api/system/enterprise'
import { columns, searchFormSchema } from './enterprise.data' import { columns, searchFormSchema } from './enterprise.data'
defineOptions({ name: 'Enterprise' }) defineOptions({ name: 'Enterprise' })
@ -63,7 +82,7 @@ const [registerTable, { getForm, reload }] = useTable({
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
actionColumn: { actionColumn: {
width: 250,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
fixed: 'right' fixed: 'right'
@ -78,10 +97,12 @@ function handleEdit(record: Recordable) {
openModal(true, { record, isUpdate: true }) openModal(true, { record, isUpdate: true })
} }
function handleEdit1(record: Recordable) { function handleEdit1(record: Recordable) {
openModal(true, { record, isUpdate: true }) openModal(true, { record, isUpdate: true })
} }
async function handleExport() { async function handleExport() {
createConfirm({ createConfirm({
title: t('common.exportTitle'), title: t('common.exportTitle'),
@ -99,4 +120,10 @@ async function handleDelete(record: Recordable) {
createMessage.success(t('common.delSuccessText')) createMessage.success(t('common.delSuccessText'))
reload() reload()
} }
async function handleDelete1(record: Recordable) {
await updateEnterpriseStatus(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
</script> </script>

@ -22,7 +22,7 @@
"strict": true, "strict": true,
"strictFunctionTypes": false, "strictFunctionTypes": false,
"noImplicitAny": false, "noImplicitAny": false,
"noUnusedLocals": true, "noUnusedLocals": false,
"noUnusedParameters": true, "noUnusedParameters": true,
"skipLibCheck": true "skipLibCheck": true
}, },

@ -0,0 +1,18 @@
package com.yunxi.scm.module.system.enums.business;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum BusinessEnum {
ENABLE("0"), // 启用
DISABLE("1"); // 禁用
/**
*
*/
private final String status;
}

@ -1,5 +1,11 @@
package com.yunxi.scm.module.system.controller.admin.businesswarehouse; package com.yunxi.scm.module.system.controller.admin.businesswarehouse;
import com.yunxi.scm.framework.common.enums.CommonStatusEnum;
import com.yunxi.scm.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
import com.yunxi.scm.module.system.controller.admin.dept.vo.dept.DeptSimpleRespVO;
import com.yunxi.scm.module.system.convert.dept.DeptConvert;
import com.yunxi.scm.module.system.dal.dataobject.dept.DeptDO;
import com.yunxi.scm.module.system.enums.business.BusinessEnum;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -99,4 +105,17 @@ public class BusinessWarehouseController {
ExcelUtils.write(response, "业务线表.xls", "数据", BusinessWarehouseExcelVO.class, datas); ExcelUtils.write(response, "业务线表.xls", "数据", BusinessWarehouseExcelVO.class, datas);
} }
@GetMapping("/list-all-simple")
@Operation(summary = "获取业务线精简信息列表", description = "只包含被开启的业务线,主要用于前端的下拉选项")
@PreAuthorize("@ss.hasPermission('system:business-warehouse:list-all-simple')")
public CommonResult<List<BusinessSimpleRespVo>> getSimpleBusinessList() {
// 获得业务线列表,只要开启状态的
BusinessWarehousePageReqVO pageReqVO = new BusinessWarehousePageReqVO();
// pageReqVO.setStatus(BusinessEnum.ENABLE.getStatus());
// pageReqVO.setDiffFlag("0");
List<BusinessWarehouseDO> list = businessWarehouseService.getBusinessSimpleList(pageReqVO);
return success(BusinessWarehouseConvert.INSTANCE.convertList03(list));
}
} }

@ -0,0 +1,21 @@
package com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Schema(description = "管理后台 - 业务线表精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BusinessSimpleRespVo {
@Schema(description = "业务线编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "业务线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
@Schema(description = "父部门 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long parentId;
}

@ -16,4 +16,7 @@ public class BusinessWarehouseRespVO extends BusinessWarehouseBaseVO {
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime;
} }

@ -1,5 +1,6 @@
package com.yunxi.scm.module.system.controller.admin.enterprise; 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 org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -52,6 +53,16 @@ public class EnterpriseController {
return success(true); 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") @DeleteMapping("/delete")
@Operation(summary = "删除企业信息") @Operation(summary = "删除企业信息")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)

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

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

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

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

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

@ -25,8 +25,12 @@ public interface BusinessWarehouseConvert {
BusinessWarehouseRespVO convert(BusinessWarehouseDO bean); BusinessWarehouseRespVO convert(BusinessWarehouseDO bean);
BusinessSimpleRespVo convert03(BusinessWarehouseDO bean);
List<BusinessWarehouseRespVO> convertList(List<BusinessWarehouseDO> list); List<BusinessWarehouseRespVO> convertList(List<BusinessWarehouseDO> list);
List<BusinessSimpleRespVo> convertList03(List<BusinessWarehouseDO> list);
PageResult<BusinessWarehouseRespVO> convertPage(PageResult<BusinessWarehouseDO> page); PageResult<BusinessWarehouseRespVO> convertPage(PageResult<BusinessWarehouseDO> page);
List<BusinessWarehouseExcelVO> convertList02(List<BusinessWarehouseDO> list); List<BusinessWarehouseExcelVO> convertList02(List<BusinessWarehouseDO> list);

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

@ -5,7 +5,9 @@ import java.util.*;
import com.yunxi.scm.framework.common.pojo.PageResult; import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX; import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX; import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX;
import com.yunxi.scm.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
import com.yunxi.scm.module.system.dal.dataobject.businesswarehouse.BusinessWarehouseDO; import com.yunxi.scm.module.system.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
import com.yunxi.scm.module.system.dal.dataobject.dept.DeptDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.*; import com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.*;
@ -67,4 +69,10 @@ public interface BusinessWarehouseMapper extends BaseMapperX<BusinessWarehouseDO
.orderByDesc(BusinessWarehouseDO::getId)); .orderByDesc(BusinessWarehouseDO::getId));
} }
default List<BusinessWarehouseDO> simpleBusiness(BusinessWarehousePageReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<BusinessWarehouseDO>()
.eqIfPresent(BusinessWarehouseDO::getStatus, reqVO.getStatus())
.eqIfPresent(BusinessWarehouseDO::getDiffFlag, reqVO.getDiffFlag()));
}
} }

@ -67,4 +67,9 @@ public interface BusinessWarehouseService {
*/ */
List<BusinessWarehouseDO> getBusinessWarehouseList(BusinessWarehouseExportReqVO exportReqVO); List<BusinessWarehouseDO> getBusinessWarehouseList(BusinessWarehouseExportReqVO exportReqVO);
/**
* 线
* */
List<BusinessWarehouseDO> getBusinessSimpleList(BusinessWarehousePageReqVO pageReqVO);
} }

@ -79,4 +79,9 @@ public class BusinessWarehouseServiceImpl implements BusinessWarehouseService {
return businessWarehouseMapper.selectList(exportReqVO); return businessWarehouseMapper.selectList(exportReqVO);
} }
@Override
public List<BusinessWarehouseDO> getBusinessSimpleList(BusinessWarehousePageReqVO pageReqVO) {
return businessWarehouseMapper.simpleBusiness(pageReqVO);
}
} }

@ -1,8 +1,5 @@
package com.yunxi.scm.module.xxjj.controller.admin.customer; 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 org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -39,26 +36,14 @@ public class CustomerController {
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@Resource
private WorkOrderService workOrderService;
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建客户信息") @Operation(summary = "创建客户信息")
@PreAuthorize("@ss.hasPermission('xxjj:customer:create')") @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)); 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") @PutMapping("/update")
@Operation(summary = "更新客户信息") @Operation(summary = "更新客户信息")
@PreAuthorize("@ss.hasPermission('xxjj:customer:update')") @PreAuthorize("@ss.hasPermission('xxjj:customer:update')")
@ -114,18 +99,4 @@ public class CustomerController {
ExcelUtils.write(response, "客户信息.xls", "数据", CustomerExcelVO.class, datas); 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));
}
} }

@ -5,7 +5,13 @@ import lombok.*;
import java.util.*; import java.util.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/** /**
* Base VO VO 使 * Base VO VO 使
@ -14,34 +20,192 @@ import javax.validation.constraints.*;
@Data @Data
public class CustomerBaseVO { public class CustomerBaseVO {
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") @Schema(description = "客户分类(0一级客户 1二级客户)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "客户名称不能为空") @NotNull(message = "客户分类(0一级客户 1二级客户)不能为空")
private String customerCalssify;
@Schema(description = "客户名称", example = "王五")
private String customerName; private String customerName;
@Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "公司logo")
@NotNull(message = "客户类型不能为空") private String customerLogo;
private String customerType;
@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 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 = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "所在城市")
private String city;
@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 otherQualifications;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "合作范围(关联业务线)")
private Integer collaborationScopeNum;
@Schema(description = "合作起始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime collaborationTime;
@Schema(description = "统一结算主体") @Schema(description = "供货量(每月下限)")
private String unifiedSettlement; private Long supplyVolumeDown;
@Schema(description = "客户性质", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "供货量(每月下限)")
@NotNull(message = "客户性质不能为空") private Long supplyVolumeUpper;
private String customerNature;
@Schema(description = "合作模式", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "资金额度")
@NotNull(message = "合作模式不能为空") private Long fundLimit;
private String cooperationMode;
@Schema(description = "营业时间")
private String businessHours;
@Schema(description = "允许卸货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime allowableUnloadingTime;
@Schema(description = "卸货效率")
private String unloadingEfficiency;
@Schema(description = "允许装货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime allowableShipmentTime;
@Schema(description = "装货效果")
private String shipmentEffciency;
@Schema(description = "付款方式(0无 1现金 2银行转账 3承兑汇票 4有赞代收 5支付宝 6微信 7国家列表)")
private String paymentMethod;
@Schema(description = "账户名称", example = "王五")
private String accountName;
@Schema(description = "银行账号", example = "18155")
private String bankAccount;
@Schema(description = "开户银行")
private String bankDeposit;
@Schema(description = "开户地区")
private String depositArea;
@Schema(description = "支行名称")
private String bankBranch;
@Schema(description = "公司税号")
private String companyTaxNumber;
@Schema(description = "企业名称", example = "芋艿")
private String enterpriseName;
@Schema(description = "单位地址")
private String workAddress;
@Schema(description = "合作方式(0买断 1联营)")
private String collaborationMethod;
@Schema(description = "结算方式(0:先货后款 1先款后货)")
private String settlementMethod;
@Schema(description = "账期")
private String accountPeriod;
@Schema(description = "压款方式(0无 1按金额 2按比例)")
private String underpaymentMethod;
@Schema(description = "默认压款比例")
private String defaultUnderpaymentRatio;
@Schema(description = "申请压款比例")
private String applyForUnderpaymentRatio;
@Schema(description = "保证金方式(0无 1按金额 2按比例)")
private String marginMethod;
@Schema(description = "默认保证金比例")
private String defaultMarginRatio;
@Schema(description = "申请保证金比例")
private String applyForMarginRatio;
@Schema(description = "逾期利率(0按年化1按月化)")
private String overdueInterestRate;
@Schema(description = "默认逾期利率")
private String defaultOverdueRatio;
@Schema(description = "申请逾期利率")
private String applyForOverdueRatio;
@Schema(description = "客户联系人id", example = "6351")
private Long contactsId;
@Schema(description = "客户类型", example = "1")
private String customerType;
@Schema(description = "隶属业务线", example = "22944") @Schema(description = "账户类型", example = "2")
private Long linebusinessId; private String accountType;
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "卸货时长")
@NotNull(message = "状态不能为空") private String unloading;
private String status;
@Schema(description = "归属人员",requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") @Schema(description = "装货时长")
@NotNull(message = "成员编号数组不能为空") private String shipment;
private Set<Long> belongingPeople;
} }

@ -5,13 +5,19 @@ import lombok.*;
import java.util.*; import java.util.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty; 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 * Excel VO
* *
* @author * @author
*/ */
@Data @Data
public class CustomerExcelVO { public class CustomerExcelVO {
@ -19,34 +25,202 @@ public class CustomerExcelVO {
@ExcelProperty("编号") @ExcelProperty("编号")
private Long id; private Long id;
@ExcelProperty(value = "客户分类(0一级客户 1二级客户)", converter = DictConvert.class)
@DictFormat("customer_calssify") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerCalssify;
@ExcelProperty("客户名称") @ExcelProperty("客户名称")
private String customerName; private String customerName;
@ExcelProperty("客户类型") @ExcelProperty("公司logo")
private String customerType; private String customerLogo;
@ExcelProperty("统一结算主体")
private String unifiedSettlement;
@ExcelProperty("客户性质") @ExcelProperty(value = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)", converter = DictConvert.class)
private String customerNature; @DictFormat("enterprise_nature") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String enterpriseNature;
@ExcelProperty("合作模式") @ExcelProperty(value = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)", converter = DictConvert.class)
private String cooperationMode; @DictFormat("product_class") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerSource;
@ExcelProperty("隶属业务线") @ExcelProperty(value = "客户星级(0一星 1二星 2三星 3四星 4五星)", converter = DictConvert.class)
private Long linebusinessId; @DictFormat("customer_starrating") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String customerStarrating;
@ExcelProperty("状态") @ExcelProperty(value = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)", converter = DictConvert.class)
private String status; @DictFormat("industry_schedule") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String industrySchedule;
@ExcelProperty("归属人员") @ExcelProperty("归属人员")
private Set<Long> belongingPeople; private String belongingPeople;
@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("创建时间") @ExcelProperty("创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;
@ExcelProperty("更新时间") @ExcelProperty("行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private LocalDateTime updateTime; private String industryClassify;
@ExcelProperty("所在城市")
private String city;
@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 otherQualifications;
@ExcelProperty("经营范围")
private String businessScope;
@ExcelProperty("合作范围(关联业务线)")
private Integer collaborationScopeNum;
@ExcelProperty("合作起始时间")
private LocalDateTime collaborationTime;
@ExcelProperty("供货量(每月下限)")
private Long supplyVolumeDown;
@ExcelProperty("供货量(每月下限)")
private Long supplyVolumeUpper;
@ExcelProperty("资金额度")
private Long fundLimit;
@ExcelProperty("营业时间")
private String businessHours;
@ExcelProperty("允许卸货时间")
private LocalDateTime allowableUnloadingTime;
@ExcelProperty("卸货效率")
private String unloadingEfficiency;
@ExcelProperty("允许装货时间")
private LocalDateTime allowableShipmentTime;
@ExcelProperty("装货效果")
private String shipmentEffciency;
@ExcelProperty(value = "付款方式(0无 1现金 2银行转账 3承兑汇票 4有赞代收 5支付宝 6微信 7国家列表)", converter = DictConvert.class)
@DictFormat("payment_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String paymentMethod;
@ExcelProperty("账户名称")
private String accountName;
@ExcelProperty("银行账号")
private String bankAccount;
@ExcelProperty("开户银行")
private String bankDeposit;
@ExcelProperty("开户地区")
private String depositArea;
@ExcelProperty("支行名称")
private String bankBranch;
@ExcelProperty("公司税号")
private String companyTaxNumber;
@ExcelProperty("企业名称")
private String enterpriseName;
@ExcelProperty("单位地址")
private String workAddress;
@ExcelProperty(value = "合作方式(0买断 1联营)", converter = DictConvert.class)
@DictFormat("collaboration_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String collaborationMethod;
@ExcelProperty(value = "结算方式(0:先货后款 1先款后货)", converter = DictConvert.class)
@DictFormat("settlement_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String settlementMethod;
@ExcelProperty("账期")
private String accountPeriod;
@ExcelProperty(value = "压款方式(0无 1按金额 2按比例)", converter = DictConvert.class)
@DictFormat("underpayment_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String underpaymentMethod;
@ExcelProperty("默认压款比例")
private String defaultUnderpaymentRatio;
@ExcelProperty("申请压款比例")
private String applyForUnderpaymentRatio;
@ExcelProperty(value = "保证金方式(0无 1按金额 2按比例)", converter = DictConvert.class)
@DictFormat("margin_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String marginMethod;
@ExcelProperty("默认保证金比例")
private String defaultMarginRatio;
@ExcelProperty("申请保证金比例")
private String applyForMarginRatio;
@ExcelProperty(value = "逾期利率(0按年化1按月化)", converter = DictConvert.class)
@DictFormat("overdue_interest_rate") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String overdueInterestRate;
@ExcelProperty("默认逾期利率")
private String defaultOverdueRatio;
@ExcelProperty("申请逾期利率")
private String applyForOverdueRatio;
@ExcelProperty("客户联系人id")
private Long contactsId;
@ExcelProperty("客户类型")
private String customerType;
@ExcelProperty("账户类型")
private String accountType;
@ExcelProperty("卸货时长")
private String unloading;
@ExcelProperty("装货时长")
private String shipment;
} }

@ -13,36 +13,194 @@ import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MON
@Data @Data
public class CustomerExportReqVO { public class CustomerExportReqVO {
@Schema(description = "客户名称", example = "赵六") @Schema(description = "客户分类(0一级客户 1二级客户)")
private String customerName; private String customerCalssify;
@Schema(description = "客户类型", example = "2") @Schema(description = "客户名称", example = "王五")
private String customerType; private String customerName;
@Schema(description = "统一结算主体") @Schema(description = "公司logo")
private String unifiedSettlement; private String customerLogo;
@Schema(description = "客户性质") @Schema(description = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)")
private String customerNature; private String enterpriseNature;
@Schema(description = "合作模式") @Schema(description = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)")
private String cooperationMode; private String customerSource;
@Schema(description = "隶属业务线", example = "22944") @Schema(description = "客户星级(0一星 1二星 2三星 3四星 4五星)")
private Long linebusinessId; private String customerStarrating;
@Schema(description = "状态", example = "2") @Schema(description = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)")
private String status; private String industrySchedule;
@Schema(description = "归属人员") @Schema(description = "归属人员")
private String belongingPeople; private String belongingPeople;
@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 = "创建时间") @Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime; private LocalDateTime[] createTime;
@Schema(description = "更新时间") @Schema(description = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "所在城市")
private String city;
@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 otherQualifications;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "合作范围(关联业务线)")
private Integer collaborationScopeNum;
@Schema(description = "合作起始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] collaborationTime;
@Schema(description = "供货量(每月下限)")
private Long supplyVolumeDown;
@Schema(description = "供货量(每月下限)")
private Long supplyVolumeUpper;
@Schema(description = "资金额度")
private Long fundLimit;
@Schema(description = "营业时间")
private String businessHours;
@Schema(description = "允许卸货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] allowableUnloadingTime;
@Schema(description = "卸货效率")
private String unloadingEfficiency;
@Schema(description = "允许装货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] updateTime; private LocalDateTime[] allowableShipmentTime;
@Schema(description = "装货效果")
private String shipmentEffciency;
@Schema(description = "付款方式(0无 1现金 2银行转账 3承兑汇票 4有赞代收 5支付宝 6微信 7国家列表)")
private String paymentMethod;
@Schema(description = "账户名称", example = "王五")
private String accountName;
@Schema(description = "银行账号", example = "18155")
private String bankAccount;
@Schema(description = "开户银行")
private String bankDeposit;
@Schema(description = "开户地区")
private String depositArea;
@Schema(description = "支行名称")
private String bankBranch;
@Schema(description = "公司税号")
private String companyTaxNumber;
@Schema(description = "企业名称", example = "芋艿")
private String enterpriseName;
@Schema(description = "单位地址")
private String workAddress;
@Schema(description = "合作方式(0买断 1联营)")
private String collaborationMethod;
@Schema(description = "结算方式(0:先货后款 1先款后货)")
private String settlementMethod;
@Schema(description = "账期")
private String accountPeriod;
@Schema(description = "压款方式(0无 1按金额 2按比例)")
private String underpaymentMethod;
@Schema(description = "默认压款比例")
private String defaultUnderpaymentRatio;
@Schema(description = "申请压款比例")
private String applyForUnderpaymentRatio;
@Schema(description = "保证金方式(0无 1按金额 2按比例)")
private String marginMethod;
@Schema(description = "默认保证金比例")
private String defaultMarginRatio;
@Schema(description = "申请保证金比例")
private String applyForMarginRatio;
@Schema(description = "逾期利率(0按年化1按月化)")
private String overdueInterestRate;
@Schema(description = "默认逾期利率")
private String defaultOverdueRatio;
@Schema(description = "申请逾期利率")
private String applyForOverdueRatio;
@Schema(description = "客户联系人id", example = "6351")
private Long contactsId;
@Schema(description = "客户类型", example = "1")
private String customerType;
@Schema(description = "账户类型", example = "2")
private String accountType;
@Schema(description = "卸货时长")
private String unloading;
@Schema(description = "装货时长")
private String shipment;
} }

@ -15,36 +15,194 @@ import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MON
@ToString(callSuper = true) @ToString(callSuper = true)
public class CustomerPageReqVO extends PageParam { public class CustomerPageReqVO extends PageParam {
@Schema(description = "客户名称", example = "赵六") @Schema(description = "客户分类(0一级客户 1二级客户)")
private String customerName; private String customerCalssify;
@Schema(description = "客户类型", example = "2") @Schema(description = "客户名称", example = "王五")
private String customerType; private String customerName;
@Schema(description = "统一结算主体") @Schema(description = "公司logo")
private String unifiedSettlement; private String customerLogo;
@Schema(description = "客户性质") @Schema(description = "企业性质(0国有企业 1集体企业 2私营企业 3股份制企业 4外资企业 5合资企业)")
private String customerNature; private String enterpriseNature;
@Schema(description = "合作模式") @Schema(description = "客户来源(0电话营销 1主动来电 2客户介绍 3朋友介绍 4独立开发 5网络搜索 6广告杂志 7展会促销 8其他途径)")
private String cooperationMode; private String customerSource;
@Schema(description = "隶属业务线", example = "22944") @Schema(description = "客户星级(0一星 1二星 2三星 3四星 4五星)")
private Long linebusinessId; private String customerStarrating;
@Schema(description = "状态", example = "2") @Schema(description = "业务进度(0了解跟进 1资料收集 2客户评审 3风控核准 4合作洽谈 5准备签约 6已经签约 7合作叫停 8暂时搁置)")
private String status; private String industrySchedule;
@Schema(description = "归属人员") @Schema(description = "归属人员")
private Set<Long> belongingPeople; private String belongingPeople;
@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 = "创建时间") @Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime; private LocalDateTime[] createTime;
@Schema(description = "更新时间") @Schema(description = "行业分类(0家用电器 1交通运输 2商务服务 3家具用品 4电工电气 5通信产品 6办公文教 7运动休闲 8传媒广电)")
private String industryClassify;
@Schema(description = "所在城市")
private String city;
@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 otherQualifications;
@Schema(description = "经营范围")
private String businessScope;
@Schema(description = "合作范围(关联业务线)")
private Integer collaborationScopeNum;
@Schema(description = "合作起始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] collaborationTime;
@Schema(description = "供货量(每月下限)")
private Long supplyVolumeDown;
@Schema(description = "供货量(每月下限)")
private Long supplyVolumeUpper;
@Schema(description = "资金额度")
private Long fundLimit;
@Schema(description = "营业时间")
private String businessHours;
@Schema(description = "允许卸货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] allowableUnloadingTime;
@Schema(description = "卸货效率")
private String unloadingEfficiency;
@Schema(description = "允许装货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] updateTime; private LocalDateTime[] allowableShipmentTime;
@Schema(description = "装货效果")
private String shipmentEffciency;
@Schema(description = "付款方式(0无 1现金 2银行转账 3承兑汇票 4有赞代收 5支付宝 6微信 7国家列表)")
private String paymentMethod;
@Schema(description = "账户名称", example = "王五")
private String accountName;
@Schema(description = "银行账号", example = "18155")
private String bankAccount;
@Schema(description = "开户银行")
private String bankDeposit;
@Schema(description = "开户地区")
private String depositArea;
@Schema(description = "支行名称")
private String bankBranch;
@Schema(description = "公司税号")
private String companyTaxNumber;
@Schema(description = "企业名称", example = "芋艿")
private String enterpriseName;
@Schema(description = "单位地址")
private String workAddress;
@Schema(description = "合作方式(0买断 1联营)")
private String collaborationMethod;
@Schema(description = "结算方式(0:先货后款 1先款后货)")
private String settlementMethod;
@Schema(description = "账期")
private String accountPeriod;
@Schema(description = "压款方式(0无 1按金额 2按比例)")
private String underpaymentMethod;
@Schema(description = "默认压款比例")
private String defaultUnderpaymentRatio;
@Schema(description = "申请压款比例")
private String applyForUnderpaymentRatio;
@Schema(description = "保证金方式(0无 1按金额 2按比例)")
private String marginMethod;
@Schema(description = "默认保证金比例")
private String defaultMarginRatio;
@Schema(description = "申请保证金比例")
private String applyForMarginRatio;
@Schema(description = "逾期利率(0按年化1按月化)")
private String overdueInterestRate;
@Schema(description = "默认逾期利率")
private String defaultOverdueRatio;
@Schema(description = "申请逾期利率")
private String applyForOverdueRatio;
@Schema(description = "客户联系人id", example = "6351")
private Long contactsId;
@Schema(description = "客户类型", example = "1")
private String customerType;
@Schema(description = "账户类型", example = "2")
private String accountType;
@Schema(description = "卸货时长")
private String unloading;
@Schema(description = "装货时长")
private String shipment;
} }

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

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

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

@ -1,20 +1,21 @@
package com.yunxi.scm.module.xxjj.dal.dataobject.customer; 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 lombok.*;
import java.util.*; import java.util.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.yunxi.scm.framework.mybatis.core.dataobject.BaseDO; import com.yunxi.scm.framework.mybatis.core.dataobject.BaseDO;
/** /**
* DO * DO
* *
* @author * @author
*/ */
@TableName(value = "xxjj_customer", autoResultMap = true) @TableName("xxjj_customer")
@KeySequence("xxjj_customer_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @KeySequence("xxjj_customer_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ -29,40 +30,273 @@ public class CustomerDO extends BaseDO {
*/ */
@TableId @TableId
private Long id; private Long id;
/**
* (0 1)
*
* {@link TODO customer_calssify }
*/
private String customerCalssify;
/** /**
* *
*/ */
private String customerName; private String customerName;
/** /**
* * logo
*/ */
private String customerType; private String customerLogo;
/**
* (0 1 2 3 4 5)
*
* {@link TODO enterprise_nature }
*/
private String enterpriseNature;
/**
* (0 1 2 3 4 5 6广 7 8)
*
* {@link TODO product_class }
*/
private String customerSource;
/**
* (0 1 2 3 4)
*
* {@link TODO customer_starrating }
*/
private String customerStarrating;
/**
* (0 1 2 3 4 5 6 7 8)
*
* {@link TODO industry_schedule }
*/
private String industrySchedule;
/**
*
*/
private String belongingPeople;
/**
*
*/
private String country;
/**
*
*/
private String address;
/** /**
* *
*/ */
private String unifiedSettlement; private String phone;
/** /**
* *
*/ */
private String customerNature; private String companyFax;
/** /**
* *
*/ */
private String cooperationMode; private String companyHttp;
/** /**
* 线 *
*/ */
private Long linebusinessId; private String companyProfile;
/** /**
* * (0 1 2 3 4 5 6)
* *
* {@link CommonStatusEnum} * {@link TODO customer_status1 }
*/ */
private String status; private String customerStatus;
/** /**
* * (0 1 2 3 4 5 6 7 8广)
*/
private String industryClassify;
/**
*
*/
private String city;
/**
*
*/
private String socialInformationCodeCertificate;
/**
*
*/
private String legalRepresentativesPhoto;
/**
*
*/
private String proofPaidCapital;
/**
*
*/
private String assetCertificate;
/**
*
*/
private String assetCertificateMortgage;
/**
*
*/
private String guarantorCertificate;
/**
*
*/
private String otherQualifications;
/**
*
*/
private String businessScope;
/**
* (线)
*/
private Integer collaborationScopeNum;
/**
*
*/
private LocalDateTime collaborationTime;
/**
*
*/
private Long supplyVolumeDown;
/**
*
*/
private Long supplyVolumeUpper;
/**
*
*/
private Long fundLimit;
/**
*
*/
private String businessHours;
/**
*
*/
private LocalDateTime allowableUnloadingTime;
/**
*
*/
private String unloadingEfficiency;
/**
*
*/
private LocalDateTime allowableShipmentTime;
/**
*
*/
private String shipmentEffciency;
/**
* (0 1 2 3 4 5 6 7)
*
* {@link TODO payment_method }
*/
private String paymentMethod;
/**
*
*/
private String accountName;
/**
*
*/
private String bankAccount;
/**
*
*/
private String bankDeposit;
/**
*
*/
private String depositArea;
/**
*
*/
private String bankBranch;
/**
*
*/
private String companyTaxNumber;
/**
*
*/
private String enterpriseName;
/**
*
*/
private String workAddress;
/**
* (0 1)
*
* {@link TODO collaboration_method }
*/
private String collaborationMethod;
/**
* (0: 1)
*
* {@link TODO settlement_method }
*/
private String settlementMethod;
/**
*
*/
private String accountPeriod;
/**
* (0 1 2)
*
* {@link TODO underpayment_method }
*/
private String underpaymentMethod;
/**
*
*/
private String defaultUnderpaymentRatio;
/**
*
*/
private String applyForUnderpaymentRatio;
/**
* (0 1 2)
*
* {@link TODO margin_method }
*/
private String marginMethod;
/**
*
*/
private String defaultMarginRatio;
/**
*
*/
private String applyForMarginRatio;
/**
* (01)
*
* {@link TODO overdue_interest_rate }
*/
private String overdueInterestRate;
/**
*
*/
private String defaultOverdueRatio;
/**
*
*/
private String applyForOverdueRatio;
/**
* id
*/
private Long contactsId;
/**
*
*/
private String customerType;
/**
*
*/
private String accountType;
/**
*
*/
private String unloading;
/**
*
*/ */
@TableField(typeHandler = JsonLongSetTypeHandler.class) private String shipment;
private Set<Long> belongingPeople;
} }

@ -12,43 +12,143 @@ import com.yunxi.scm.module.xxjj.controller.admin.customer.vo.*;
/** /**
* Mapper * Mapper
* *
* @author * @author
*/ */
@Mapper @Mapper
public interface CustomerMapper extends BaseMapperX<CustomerDO> { public interface CustomerMapper extends BaseMapperX<CustomerDO> {
default PageResult<CustomerDO> selectPage(CustomerPageReqVO reqVO) { default PageResult<CustomerDO> selectPage(CustomerPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<CustomerDO>() return selectPage(reqVO, new LambdaQueryWrapperX<CustomerDO>()
.eqIfPresent(CustomerDO::getCustomerCalssify, reqVO.getCustomerCalssify())
.likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName()) .likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType()) .eqIfPresent(CustomerDO::getCustomerLogo, reqVO.getCustomerLogo())
.eqIfPresent(CustomerDO::getUnifiedSettlement, reqVO.getUnifiedSettlement()) .eqIfPresent(CustomerDO::getEnterpriseNature, reqVO.getEnterpriseNature())
.eqIfPresent(CustomerDO::getCustomerNature, reqVO.getCustomerNature()) .eqIfPresent(CustomerDO::getCustomerSource, reqVO.getCustomerSource())
.eqIfPresent(CustomerDO::getCooperationMode, reqVO.getCooperationMode()) .eqIfPresent(CustomerDO::getCustomerStarrating, reqVO.getCustomerStarrating())
.eqIfPresent(CustomerDO::getLinebusinessId, reqVO.getLinebusinessId()) .eqIfPresent(CustomerDO::getIndustrySchedule, reqVO.getIndustrySchedule())
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus()) .eqIfPresent(CustomerDO::getBelongingPeople, reqVO.getBelongingPeople())
.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())
.betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(CustomerDO::getUpdateTime, reqVO.getUpdateTime()) .eqIfPresent(CustomerDO::getIndustryClassify, reqVO.getIndustryClassify())
.eqIfPresent(CustomerDO::getCity, reqVO.getCity())
.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::getOtherQualifications, reqVO.getOtherQualifications())
.eqIfPresent(CustomerDO::getBusinessScope, reqVO.getBusinessScope())
.eqIfPresent(CustomerDO::getCollaborationScopeNum, reqVO.getCollaborationScopeNum())
.betweenIfPresent(CustomerDO::getCollaborationTime, reqVO.getCollaborationTime())
.eqIfPresent(CustomerDO::getSupplyVolumeDown, reqVO.getSupplyVolumeDown())
.eqIfPresent(CustomerDO::getSupplyVolumeUpper, reqVO.getSupplyVolumeUpper())
.eqIfPresent(CustomerDO::getFundLimit, reqVO.getFundLimit())
.eqIfPresent(CustomerDO::getBusinessHours, reqVO.getBusinessHours())
.betweenIfPresent(CustomerDO::getAllowableUnloadingTime, reqVO.getAllowableUnloadingTime())
.eqIfPresent(CustomerDO::getUnloadingEfficiency, reqVO.getUnloadingEfficiency())
.betweenIfPresent(CustomerDO::getAllowableShipmentTime, reqVO.getAllowableShipmentTime())
.eqIfPresent(CustomerDO::getShipmentEffciency, reqVO.getShipmentEffciency())
.eqIfPresent(CustomerDO::getPaymentMethod, reqVO.getPaymentMethod())
.likeIfPresent(CustomerDO::getAccountName, reqVO.getAccountName())
.eqIfPresent(CustomerDO::getBankAccount, reqVO.getBankAccount())
.eqIfPresent(CustomerDO::getBankDeposit, reqVO.getBankDeposit())
.eqIfPresent(CustomerDO::getDepositArea, reqVO.getDepositArea())
.eqIfPresent(CustomerDO::getBankBranch, reqVO.getBankBranch())
.eqIfPresent(CustomerDO::getCompanyTaxNumber, reqVO.getCompanyTaxNumber())
.likeIfPresent(CustomerDO::getEnterpriseName, reqVO.getEnterpriseName())
.eqIfPresent(CustomerDO::getWorkAddress, reqVO.getWorkAddress())
.eqIfPresent(CustomerDO::getCollaborationMethod, reqVO.getCollaborationMethod())
.eqIfPresent(CustomerDO::getSettlementMethod, reqVO.getSettlementMethod())
.eqIfPresent(CustomerDO::getAccountPeriod, reqVO.getAccountPeriod())
.eqIfPresent(CustomerDO::getUnderpaymentMethod, reqVO.getUnderpaymentMethod())
.eqIfPresent(CustomerDO::getDefaultUnderpaymentRatio, reqVO.getDefaultUnderpaymentRatio())
.eqIfPresent(CustomerDO::getApplyForUnderpaymentRatio, reqVO.getApplyForUnderpaymentRatio())
.eqIfPresent(CustomerDO::getMarginMethod, reqVO.getMarginMethod())
.eqIfPresent(CustomerDO::getDefaultMarginRatio, reqVO.getDefaultMarginRatio())
.eqIfPresent(CustomerDO::getApplyForMarginRatio, reqVO.getApplyForMarginRatio())
.eqIfPresent(CustomerDO::getOverdueInterestRate, reqVO.getOverdueInterestRate())
.eqIfPresent(CustomerDO::getDefaultOverdueRatio, reqVO.getDefaultOverdueRatio())
.eqIfPresent(CustomerDO::getApplyForOverdueRatio, reqVO.getApplyForOverdueRatio())
.eqIfPresent(CustomerDO::getContactsId, reqVO.getContactsId())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType())
.eqIfPresent(CustomerDO::getAccountType, reqVO.getAccountType())
.eqIfPresent(CustomerDO::getUnloading, reqVO.getUnloading())
.eqIfPresent(CustomerDO::getShipment, reqVO.getShipment())
.orderByDesc(CustomerDO::getId)); .orderByDesc(CustomerDO::getId));
} }
default List<CustomerDO> selectList(CustomerExportReqVO reqVO) { default List<CustomerDO> selectList(CustomerExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<CustomerDO>() return selectList(new LambdaQueryWrapperX<CustomerDO>()
.eqIfPresent(CustomerDO::getCustomerCalssify, reqVO.getCustomerCalssify())
.likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName()) .likeIfPresent(CustomerDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType()) .eqIfPresent(CustomerDO::getCustomerLogo, reqVO.getCustomerLogo())
.eqIfPresent(CustomerDO::getUnifiedSettlement, reqVO.getUnifiedSettlement()) .eqIfPresent(CustomerDO::getEnterpriseNature, reqVO.getEnterpriseNature())
.eqIfPresent(CustomerDO::getCustomerNature, reqVO.getCustomerNature()) .eqIfPresent(CustomerDO::getCustomerSource, reqVO.getCustomerSource())
.eqIfPresent(CustomerDO::getCooperationMode, reqVO.getCooperationMode()) .eqIfPresent(CustomerDO::getCustomerStarrating, reqVO.getCustomerStarrating())
.eqIfPresent(CustomerDO::getLinebusinessId, reqVO.getLinebusinessId()) .eqIfPresent(CustomerDO::getIndustrySchedule, reqVO.getIndustrySchedule())
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus()) .eqIfPresent(CustomerDO::getBelongingPeople, reqVO.getBelongingPeople())
.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())
.betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(CustomerDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(CustomerDO::getUpdateTime, reqVO.getUpdateTime()) .eqIfPresent(CustomerDO::getIndustryClassify, reqVO.getIndustryClassify())
.eqIfPresent(CustomerDO::getCity, reqVO.getCity())
.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::getOtherQualifications, reqVO.getOtherQualifications())
.eqIfPresent(CustomerDO::getBusinessScope, reqVO.getBusinessScope())
.eqIfPresent(CustomerDO::getCollaborationScopeNum, reqVO.getCollaborationScopeNum())
.betweenIfPresent(CustomerDO::getCollaborationTime, reqVO.getCollaborationTime())
.eqIfPresent(CustomerDO::getSupplyVolumeDown, reqVO.getSupplyVolumeDown())
.eqIfPresent(CustomerDO::getSupplyVolumeUpper, reqVO.getSupplyVolumeUpper())
.eqIfPresent(CustomerDO::getFundLimit, reqVO.getFundLimit())
.eqIfPresent(CustomerDO::getBusinessHours, reqVO.getBusinessHours())
.betweenIfPresent(CustomerDO::getAllowableUnloadingTime, reqVO.getAllowableUnloadingTime())
.eqIfPresent(CustomerDO::getUnloadingEfficiency, reqVO.getUnloadingEfficiency())
.betweenIfPresent(CustomerDO::getAllowableShipmentTime, reqVO.getAllowableShipmentTime())
.eqIfPresent(CustomerDO::getShipmentEffciency, reqVO.getShipmentEffciency())
.eqIfPresent(CustomerDO::getPaymentMethod, reqVO.getPaymentMethod())
.likeIfPresent(CustomerDO::getAccountName, reqVO.getAccountName())
.eqIfPresent(CustomerDO::getBankAccount, reqVO.getBankAccount())
.eqIfPresent(CustomerDO::getBankDeposit, reqVO.getBankDeposit())
.eqIfPresent(CustomerDO::getDepositArea, reqVO.getDepositArea())
.eqIfPresent(CustomerDO::getBankBranch, reqVO.getBankBranch())
.eqIfPresent(CustomerDO::getCompanyTaxNumber, reqVO.getCompanyTaxNumber())
.likeIfPresent(CustomerDO::getEnterpriseName, reqVO.getEnterpriseName())
.eqIfPresent(CustomerDO::getWorkAddress, reqVO.getWorkAddress())
.eqIfPresent(CustomerDO::getCollaborationMethod, reqVO.getCollaborationMethod())
.eqIfPresent(CustomerDO::getSettlementMethod, reqVO.getSettlementMethod())
.eqIfPresent(CustomerDO::getAccountPeriod, reqVO.getAccountPeriod())
.eqIfPresent(CustomerDO::getUnderpaymentMethod, reqVO.getUnderpaymentMethod())
.eqIfPresent(CustomerDO::getDefaultUnderpaymentRatio, reqVO.getDefaultUnderpaymentRatio())
.eqIfPresent(CustomerDO::getApplyForUnderpaymentRatio, reqVO.getApplyForUnderpaymentRatio())
.eqIfPresent(CustomerDO::getMarginMethod, reqVO.getMarginMethod())
.eqIfPresent(CustomerDO::getDefaultMarginRatio, reqVO.getDefaultMarginRatio())
.eqIfPresent(CustomerDO::getApplyForMarginRatio, reqVO.getApplyForMarginRatio())
.eqIfPresent(CustomerDO::getOverdueInterestRate, reqVO.getOverdueInterestRate())
.eqIfPresent(CustomerDO::getDefaultOverdueRatio, reqVO.getDefaultOverdueRatio())
.eqIfPresent(CustomerDO::getApplyForOverdueRatio, reqVO.getApplyForOverdueRatio())
.eqIfPresent(CustomerDO::getContactsId, reqVO.getContactsId())
.eqIfPresent(CustomerDO::getCustomerType, reqVO.getCustomerType())
.eqIfPresent(CustomerDO::getAccountType, reqVO.getAccountType())
.eqIfPresent(CustomerDO::getUnloading, reqVO.getUnloading())
.eqIfPresent(CustomerDO::getShipment, reqVO.getShipment())
.orderByDesc(CustomerDO::getId)); .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 * Service
* *
* @author * @author
*/ */
public interface CustomerService { public interface CustomerService {
@ -67,11 +67,4 @@ public interface CustomerService {
*/ */
List<CustomerDO> getCustomerList(CustomerExportReqVO exportReqVO); 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 * Service
* *
* @author * @author
*/ */
@Service @Service
@Validated @Validated
@ -79,9 +79,4 @@ public class CustomerServiceImpl implements CustomerService {
return customerMapper.selectList(exportReqVO); 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"> <!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"> <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 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
where linebusiness_id = #{id} 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
</select> 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper> </mapper>

@ -31,7 +31,7 @@ import static org.mockito.Mockito.*;
/** /**
* {@link CustomerServiceImpl} * {@link CustomerServiceImpl}
* *
* @author * @author
*/ */
@Import(CustomerServiceImpl.class) @Import(CustomerServiceImpl.class)
public class CustomerServiceImplTest extends BaseDbUnitTest { public class CustomerServiceImplTest extends BaseDbUnitTest {
@ -110,50 +110,258 @@ public class CustomerServiceImplTest extends BaseDbUnitTest {
public void testGetCustomerPage() { public void testGetCustomerPage() {
// mock 数据 // mock 数据
CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到 CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到
o.setCustomerCalssify(null);
o.setCustomerName(null); o.setCustomerName(null);
o.setCustomerType(null); o.setCustomerLogo(null);
o.setUnifiedSettlement(null); o.setEnterpriseNature(null);
o.setCustomerNature(null); o.setCustomerSource(null);
o.setCooperationMode(null); o.setCustomerStarrating(null);
o.setLinebusinessId(null); o.setIndustrySchedule(null);
o.setStatus(null);
o.setBelongingPeople(null); o.setBelongingPeople(null);
o.setCountry(null);
o.setAddress(null);
o.setPhone(null);
o.setCompanyFax(null);
o.setCompanyHttp(null);
o.setCompanyProfile(null);
o.setCustomerStatus(null);
o.setCreateTime(null); o.setCreateTime(null);
o.setUpdateTime(null); o.setIndustryClassify(null);
o.setCity(null);
o.setSocialInformationCodeCertificate(null);
o.setLegalRepresentativesPhoto(null);
o.setProofPaidCapital(null);
o.setAssetCertificate(null);
o.setAssetCertificateMortgage(null);
o.setGuarantorCertificate(null);
o.setOtherQualifications(null);
o.setBusinessScope(null);
o.setCollaborationScopeNum(null);
o.setCollaborationTime(null);
o.setSupplyVolumeDown(null);
o.setSupplyVolumeUpper(null);
o.setFundLimit(null);
o.setBusinessHours(null);
o.setAllowableUnloadingTime(null);
o.setUnloadingEfficiency(null);
o.setAllowableShipmentTime(null);
o.setShipmentEffciency(null);
o.setPaymentMethod(null);
o.setAccountName(null);
o.setBankAccount(null);
o.setBankDeposit(null);
o.setDepositArea(null);
o.setBankBranch(null);
o.setCompanyTaxNumber(null);
o.setEnterpriseName(null);
o.setWorkAddress(null);
o.setCollaborationMethod(null);
o.setSettlementMethod(null);
o.setAccountPeriod(null);
o.setUnderpaymentMethod(null);
o.setDefaultUnderpaymentRatio(null);
o.setApplyForUnderpaymentRatio(null);
o.setMarginMethod(null);
o.setDefaultMarginRatio(null);
o.setApplyForMarginRatio(null);
o.setOverdueInterestRate(null);
o.setDefaultOverdueRatio(null);
o.setApplyForOverdueRatio(null);
o.setContactsId(null);
o.setCustomerType(null);
o.setAccountType(null);
o.setUnloading(null);
o.setShipment(null);
}); });
customerMapper.insert(dbCustomer); customerMapper.insert(dbCustomer);
// 测试 customerCalssify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerCalssify(null)));
// 测试 customerName 不匹配 // 测试 customerName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null)));
// 测试 customerType 不匹配 // 测试 customerLogo 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerLogo(null)));
// 测试 unifiedSettlement 不匹配 // 测试 enterpriseNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnifiedSettlement(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseNature(null)));
// 测试 customerNature 不匹配 // 测试 customerSource 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerNature(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerSource(null)));
// 测试 cooperationMode 不匹配 // 测试 customerStarrating 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCooperationMode(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStarrating(null)));
// 测试 linebusinessId 不匹配 // 测试 industrySchedule 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLinebusinessId(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustrySchedule(null)));
// 测试 status 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setStatus(null)));
// 测试 belongingPeople 不匹配 // 测试 belongingPeople 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(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)));
// 测试 createTime 不匹配 // 测试 createTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null)));
// 测试 updateTime 不匹配 // 测试 industryClassify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUpdateTime(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustryClassify(null)));
// 测试 city 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCity(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)));
// 测试 otherQualifications 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOtherQualifications(null)));
// 测试 businessScope 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessScope(null)));
// 测试 collaborationScopeNum 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationScopeNum(null)));
// 测试 collaborationTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationTime(null)));
// 测试 supplyVolumeDown 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSupplyVolumeDown(null)));
// 测试 supplyVolumeUpper 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSupplyVolumeUpper(null)));
// 测试 fundLimit 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setFundLimit(null)));
// 测试 businessHours 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessHours(null)));
// 测试 allowableUnloadingTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAllowableUnloadingTime(null)));
// 测试 unloadingEfficiency 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnloadingEfficiency(null)));
// 测试 allowableShipmentTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAllowableShipmentTime(null)));
// 测试 shipmentEffciency 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setShipmentEffciency(null)));
// 测试 paymentMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setPaymentMethod(null)));
// 测试 accountName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountName(null)));
// 测试 bankAccount 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankAccount(null)));
// 测试 bankDeposit 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankDeposit(null)));
// 测试 depositArea 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDepositArea(null)));
// 测试 bankBranch 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankBranch(null)));
// 测试 companyTaxNumber 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyTaxNumber(null)));
// 测试 enterpriseName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseName(null)));
// 测试 workAddress 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setWorkAddress(null)));
// 测试 collaborationMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationMethod(null)));
// 测试 settlementMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSettlementMethod(null)));
// 测试 accountPeriod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountPeriod(null)));
// 测试 underpaymentMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnderpaymentMethod(null)));
// 测试 defaultUnderpaymentRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultUnderpaymentRatio(null)));
// 测试 applyForUnderpaymentRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForUnderpaymentRatio(null)));
// 测试 marginMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setMarginMethod(null)));
// 测试 defaultMarginRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultMarginRatio(null)));
// 测试 applyForMarginRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForMarginRatio(null)));
// 测试 overdueInterestRate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOverdueInterestRate(null)));
// 测试 defaultOverdueRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultOverdueRatio(null)));
// 测试 applyForOverdueRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForOverdueRatio(null)));
// 测试 contactsId 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setContactsId(null)));
// 测试 customerType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null)));
// 测试 accountType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountType(null)));
// 测试 unloading 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnloading(null)));
// 测试 shipment 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setShipment(null)));
// 准备参数 // 准备参数
CustomerPageReqVO reqVO = new CustomerPageReqVO(); CustomerPageReqVO reqVO = new CustomerPageReqVO();
reqVO.setCustomerCalssify(null);
reqVO.setCustomerName(null); reqVO.setCustomerName(null);
reqVO.setCustomerType(null); reqVO.setCustomerLogo(null);
reqVO.setUnifiedSettlement(null); reqVO.setEnterpriseNature(null);
reqVO.setCustomerNature(null); reqVO.setCustomerSource(null);
reqVO.setCooperationMode(null); reqVO.setCustomerStarrating(null);
reqVO.setLinebusinessId(null); reqVO.setIndustrySchedule(null);
reqVO.setStatus(null); reqVO.setBelongingPeople(null);
// reqVO.setBelongingPeople(null); reqVO.setCountry(null);
reqVO.setAddress(null);
reqVO.setPhone(null);
reqVO.setCompanyFax(null);
reqVO.setCompanyHttp(null);
reqVO.setCompanyProfile(null);
reqVO.setCustomerStatus(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUpdateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); reqVO.setIndustryClassify(null);
reqVO.setCity(null);
reqVO.setSocialInformationCodeCertificate(null);
reqVO.setLegalRepresentativesPhoto(null);
reqVO.setProofPaidCapital(null);
reqVO.setAssetCertificate(null);
reqVO.setAssetCertificateMortgage(null);
reqVO.setGuarantorCertificate(null);
reqVO.setOtherQualifications(null);
reqVO.setBusinessScope(null);
reqVO.setCollaborationScopeNum(null);
reqVO.setCollaborationTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setSupplyVolumeDown(null);
reqVO.setSupplyVolumeUpper(null);
reqVO.setFundLimit(null);
reqVO.setBusinessHours(null);
reqVO.setAllowableUnloadingTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUnloadingEfficiency(null);
reqVO.setAllowableShipmentTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setShipmentEffciency(null);
reqVO.setPaymentMethod(null);
reqVO.setAccountName(null);
reqVO.setBankAccount(null);
reqVO.setBankDeposit(null);
reqVO.setDepositArea(null);
reqVO.setBankBranch(null);
reqVO.setCompanyTaxNumber(null);
reqVO.setEnterpriseName(null);
reqVO.setWorkAddress(null);
reqVO.setCollaborationMethod(null);
reqVO.setSettlementMethod(null);
reqVO.setAccountPeriod(null);
reqVO.setUnderpaymentMethod(null);
reqVO.setDefaultUnderpaymentRatio(null);
reqVO.setApplyForUnderpaymentRatio(null);
reqVO.setMarginMethod(null);
reqVO.setDefaultMarginRatio(null);
reqVO.setApplyForMarginRatio(null);
reqVO.setOverdueInterestRate(null);
reqVO.setDefaultOverdueRatio(null);
reqVO.setApplyForOverdueRatio(null);
reqVO.setContactsId(null);
reqVO.setCustomerType(null);
reqVO.setAccountType(null);
reqVO.setUnloading(null);
reqVO.setShipment(null);
// 调用 // 调用
PageResult<CustomerDO> pageResult = customerService.getCustomerPage(reqVO); PageResult<CustomerDO> pageResult = customerService.getCustomerPage(reqVO);
@ -168,50 +376,258 @@ public class CustomerServiceImplTest extends BaseDbUnitTest {
public void testGetCustomerList() { public void testGetCustomerList() {
// mock 数据 // mock 数据
CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到 CustomerDO dbCustomer = randomPojo(CustomerDO.class, o -> { // 等会查询到
o.setCustomerCalssify(null);
o.setCustomerName(null); o.setCustomerName(null);
o.setCustomerType(null); o.setCustomerLogo(null);
o.setUnifiedSettlement(null); o.setEnterpriseNature(null);
o.setCustomerNature(null); o.setCustomerSource(null);
o.setCooperationMode(null); o.setCustomerStarrating(null);
o.setLinebusinessId(null); o.setIndustrySchedule(null);
o.setStatus(null);
o.setBelongingPeople(null); o.setBelongingPeople(null);
o.setCountry(null);
o.setAddress(null);
o.setPhone(null);
o.setCompanyFax(null);
o.setCompanyHttp(null);
o.setCompanyProfile(null);
o.setCustomerStatus(null);
o.setCreateTime(null); o.setCreateTime(null);
o.setUpdateTime(null); o.setIndustryClassify(null);
o.setCity(null);
o.setSocialInformationCodeCertificate(null);
o.setLegalRepresentativesPhoto(null);
o.setProofPaidCapital(null);
o.setAssetCertificate(null);
o.setAssetCertificateMortgage(null);
o.setGuarantorCertificate(null);
o.setOtherQualifications(null);
o.setBusinessScope(null);
o.setCollaborationScopeNum(null);
o.setCollaborationTime(null);
o.setSupplyVolumeDown(null);
o.setSupplyVolumeUpper(null);
o.setFundLimit(null);
o.setBusinessHours(null);
o.setAllowableUnloadingTime(null);
o.setUnloadingEfficiency(null);
o.setAllowableShipmentTime(null);
o.setShipmentEffciency(null);
o.setPaymentMethod(null);
o.setAccountName(null);
o.setBankAccount(null);
o.setBankDeposit(null);
o.setDepositArea(null);
o.setBankBranch(null);
o.setCompanyTaxNumber(null);
o.setEnterpriseName(null);
o.setWorkAddress(null);
o.setCollaborationMethod(null);
o.setSettlementMethod(null);
o.setAccountPeriod(null);
o.setUnderpaymentMethod(null);
o.setDefaultUnderpaymentRatio(null);
o.setApplyForUnderpaymentRatio(null);
o.setMarginMethod(null);
o.setDefaultMarginRatio(null);
o.setApplyForMarginRatio(null);
o.setOverdueInterestRate(null);
o.setDefaultOverdueRatio(null);
o.setApplyForOverdueRatio(null);
o.setContactsId(null);
o.setCustomerType(null);
o.setAccountType(null);
o.setUnloading(null);
o.setShipment(null);
}); });
customerMapper.insert(dbCustomer); customerMapper.insert(dbCustomer);
// 测试 customerCalssify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerCalssify(null)));
// 测试 customerName 不匹配 // 测试 customerName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerName(null)));
// 测试 customerType 不匹配 // 测试 customerLogo 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerLogo(null)));
// 测试 unifiedSettlement 不匹配 // 测试 enterpriseNature 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnifiedSettlement(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseNature(null)));
// 测试 customerNature 不匹配 // 测试 customerSource 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerNature(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerSource(null)));
// 测试 cooperationMode 不匹配 // 测试 customerStarrating 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCooperationMode(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerStarrating(null)));
// 测试 linebusinessId 不匹配 // 测试 industrySchedule 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setLinebusinessId(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustrySchedule(null)));
// 测试 status 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setStatus(null)));
// 测试 belongingPeople 不匹配 // 测试 belongingPeople 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBelongingPeople(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)));
// 测试 createTime 不匹配 // 测试 createTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCreateTime(null)));
// 测试 updateTime 不匹配 // 测试 industryClassify 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUpdateTime(null))); customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setIndustryClassify(null)));
// 测试 city 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCity(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)));
// 测试 otherQualifications 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOtherQualifications(null)));
// 测试 businessScope 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessScope(null)));
// 测试 collaborationScopeNum 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationScopeNum(null)));
// 测试 collaborationTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationTime(null)));
// 测试 supplyVolumeDown 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSupplyVolumeDown(null)));
// 测试 supplyVolumeUpper 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSupplyVolumeUpper(null)));
// 测试 fundLimit 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setFundLimit(null)));
// 测试 businessHours 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBusinessHours(null)));
// 测试 allowableUnloadingTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAllowableUnloadingTime(null)));
// 测试 unloadingEfficiency 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnloadingEfficiency(null)));
// 测试 allowableShipmentTime 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAllowableShipmentTime(null)));
// 测试 shipmentEffciency 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setShipmentEffciency(null)));
// 测试 paymentMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setPaymentMethod(null)));
// 测试 accountName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountName(null)));
// 测试 bankAccount 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankAccount(null)));
// 测试 bankDeposit 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankDeposit(null)));
// 测试 depositArea 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDepositArea(null)));
// 测试 bankBranch 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setBankBranch(null)));
// 测试 companyTaxNumber 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCompanyTaxNumber(null)));
// 测试 enterpriseName 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setEnterpriseName(null)));
// 测试 workAddress 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setWorkAddress(null)));
// 测试 collaborationMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCollaborationMethod(null)));
// 测试 settlementMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setSettlementMethod(null)));
// 测试 accountPeriod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountPeriod(null)));
// 测试 underpaymentMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnderpaymentMethod(null)));
// 测试 defaultUnderpaymentRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultUnderpaymentRatio(null)));
// 测试 applyForUnderpaymentRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForUnderpaymentRatio(null)));
// 测试 marginMethod 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setMarginMethod(null)));
// 测试 defaultMarginRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultMarginRatio(null)));
// 测试 applyForMarginRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForMarginRatio(null)));
// 测试 overdueInterestRate 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setOverdueInterestRate(null)));
// 测试 defaultOverdueRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setDefaultOverdueRatio(null)));
// 测试 applyForOverdueRatio 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setApplyForOverdueRatio(null)));
// 测试 contactsId 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setContactsId(null)));
// 测试 customerType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setCustomerType(null)));
// 测试 accountType 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setAccountType(null)));
// 测试 unloading 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setUnloading(null)));
// 测试 shipment 不匹配
customerMapper.insert(cloneIgnoreId(dbCustomer, o -> o.setShipment(null)));
// 准备参数 // 准备参数
CustomerExportReqVO reqVO = new CustomerExportReqVO(); CustomerExportReqVO reqVO = new CustomerExportReqVO();
reqVO.setCustomerCalssify(null);
reqVO.setCustomerName(null); reqVO.setCustomerName(null);
reqVO.setCustomerType(null); reqVO.setCustomerLogo(null);
reqVO.setUnifiedSettlement(null); reqVO.setEnterpriseNature(null);
reqVO.setCustomerNature(null); reqVO.setCustomerSource(null);
reqVO.setCooperationMode(null); reqVO.setCustomerStarrating(null);
reqVO.setLinebusinessId(null); reqVO.setIndustrySchedule(null);
reqVO.setStatus(null);
reqVO.setBelongingPeople(null); reqVO.setBelongingPeople(null);
reqVO.setCountry(null);
reqVO.setAddress(null);
reqVO.setPhone(null);
reqVO.setCompanyFax(null);
reqVO.setCompanyHttp(null);
reqVO.setCompanyProfile(null);
reqVO.setCustomerStatus(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUpdateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); reqVO.setIndustryClassify(null);
reqVO.setCity(null);
reqVO.setSocialInformationCodeCertificate(null);
reqVO.setLegalRepresentativesPhoto(null);
reqVO.setProofPaidCapital(null);
reqVO.setAssetCertificate(null);
reqVO.setAssetCertificateMortgage(null);
reqVO.setGuarantorCertificate(null);
reqVO.setOtherQualifications(null);
reqVO.setBusinessScope(null);
reqVO.setCollaborationScopeNum(null);
reqVO.setCollaborationTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setSupplyVolumeDown(null);
reqVO.setSupplyVolumeUpper(null);
reqVO.setFundLimit(null);
reqVO.setBusinessHours(null);
reqVO.setAllowableUnloadingTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setUnloadingEfficiency(null);
reqVO.setAllowableShipmentTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setShipmentEffciency(null);
reqVO.setPaymentMethod(null);
reqVO.setAccountName(null);
reqVO.setBankAccount(null);
reqVO.setBankDeposit(null);
reqVO.setDepositArea(null);
reqVO.setBankBranch(null);
reqVO.setCompanyTaxNumber(null);
reqVO.setEnterpriseName(null);
reqVO.setWorkAddress(null);
reqVO.setCollaborationMethod(null);
reqVO.setSettlementMethod(null);
reqVO.setAccountPeriod(null);
reqVO.setUnderpaymentMethod(null);
reqVO.setDefaultUnderpaymentRatio(null);
reqVO.setApplyForUnderpaymentRatio(null);
reqVO.setMarginMethod(null);
reqVO.setDefaultMarginRatio(null);
reqVO.setApplyForMarginRatio(null);
reqVO.setOverdueInterestRate(null);
reqVO.setDefaultOverdueRatio(null);
reqVO.setApplyForOverdueRatio(null);
reqVO.setContactsId(null);
reqVO.setCustomerType(null);
reqVO.setAccountType(null);
reqVO.setUnloading(null);
reqVO.setShipment(null);
// 调用 // 调用
List<CustomerDO> list = customerService.getCustomerList(reqVO); List<CustomerDO> list = customerService.getCustomerList(reqVO);

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