Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
214a0d72
Commit
214a0d72
authored
Sep 07, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 客户合并部分更新
parent
867e988b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
36 deletions
+55
-36
CustomerMerge.java
...r/yudao/module/customer/vo/customer/vo/CustomerMerge.java
+8
-4
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+9
-20
ErrorCodeConstants.java
...cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
+11
-0
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+5
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+5
-0
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+17
-12
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerMerge.java
View file @
214a0d72
...
@@ -3,16 +3,20 @@ package cn.iocoder.yudao.module.customer.vo.customer.vo;
...
@@ -3,16 +3,20 @@ package cn.iocoder.yudao.module.customer.vo.customer.vo;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.ToString
;
@ApiModel
(
"管理后台 - 客户 Response VO"
)
import
javax.validation.constraints.NotNull
;
@ApiModel
(
"管理后台 - 客户合并 Req VO"
)
@Data
@Data
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
CustomerMerge
{
public
class
CustomerMerge
{
@ApiModelProperty
(
value
=
"id1"
)
@ApiModelProperty
(
value
=
"被保留的客户id"
)
@NotNull
(
message
=
"被保留的客户id不能为空"
)
private
Long
id1
;
private
Long
id1
;
@ApiModelProperty
(
value
=
"id2"
)
@ApiModelProperty
(
value
=
"被删除的客户id"
)
@NotNull
(
message
=
"被删除的客户id不能为空"
)
private
Long
id2
;
private
Long
id2
;
}
}
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
214a0d72
...
@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.customer.controller.admin.customer;
...
@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.customer.controller.admin.customer;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.common.exception.ErrorCode
;
import
cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil
;
import
cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
...
@@ -25,7 +24,6 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.Custom
...
@@ -25,7 +24,6 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.Custom
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerBank.CustomerBankDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerBank.CustomerBankDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerLevelLog.CustomerLevelLogDO
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerDetail.CustomerDetailMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerDetail.CustomerDetailMapper
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
...
@@ -372,33 +370,22 @@ public class CustomerController {
...
@@ -372,33 +370,22 @@ public class CustomerController {
// 客户投诉,品牌授权都迁移到保留客户中,其他信息不会迁移,
// 客户投诉,品牌授权都迁移到保留客户中,其他信息不会迁移,
// 如需要维护非主客户的客户档案信息到保留客户中,请先维护好再操作
// 如需要维护非主客户的客户档案信息到保留客户中,请先维护好再操作
if
(
par
.
getId1
()
==
null
)
{
CustomerDO
customerDO1
=
customerService
.
getById
(
par
.
getId1
());
return
success
(
false
);
}
if
(
par
.
getId2
()
==
null
)
{
return
success
(
false
);
}
CustomerDO
customerDO1
=
customerService
.
getById
(
par
.
getId1
());
if
(
customerDO1
==
null
)
{
if
(
customerDO1
==
null
)
{
throw
exception
(
new
ErrorCode
(
0
,
"保留客户未查询到"
));
throw
exception
(
ErrorCodeConstants
.
CUSTOMER_SAVED_NOT_EXISTS
);
}
}
if
(
customerDO1
.
getCustomerService
()
==
null
)
{
if
(
customerDO1
.
getCustomerService
()
==
null
)
{
throw
exception
(
new
ErrorCode
(
0
,
"保留客户的客户经理为空"
)
);
throw
exception
(
ErrorCodeConstants
.
CUSTOMER_SAVED_CUSTOMER_SERVICE_IS_NULL
);
}
}
CustomerDO
customerDO2
=
CustomerDO
customerDO2
=
customerService
.
getById
(
par
.
getId2
());
customerService
.
getById
(
par
.
getId2
());
if
(
customerDO2
==
null
)
{
if
(
customerDO2
==
null
)
{
throw
exception
(
new
ErrorCode
(
0
,
"被合并客户未查询到"
)
);
throw
exception
(
ErrorCodeConstants
.
CUSTOMER_DELETED_NOT_EXISTS
);
}
}
if
(
customerDO2
.
getCustomerService
()
==
null
)
{
if
(
customerDO2
.
getCustomerService
()
==
null
)
{
throw
exception
(
new
ErrorCode
(
0
,
"被合并客户客户经理为空"
)
);
throw
exception
(
ErrorCodeConstants
.
CUSTOMER_DELETED_CUSTOMER_SERVICE_IS_NULL
);
}
}
if
(
customerDO1
.
getCustomerService
()
!=
customerDO2
.
getCustomerService
())
{
if
(
customerDO1
.
getCustomerService
()
!=
customerDO2
.
getCustomerService
())
{
throw
exception
(
new
ErrorCode
(
0
,
throw
exception
(
ErrorCodeConstants
.
CUSTOMER_MERGE_CUSTOMER_SERVICE_NOT_SAME
);
"保留客户和被合并客户客户经理不相同"
));
}
}
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
...
@@ -571,6 +558,8 @@ public class CustomerController {
...
@@ -571,6 +558,8 @@ public class CustomerController {
for
(
CustomerContactsDO
d
:
cuscontactList2
for
(
CustomerContactsDO
d
:
cuscontactList2
)
{
)
{
d
.
setCustomerId
(
customerDO1
.
getId
());
d
.
setCustomerId
(
customerDO1
.
getId
());
//被合并的客户联系人,默认为非默认
d
.
setIsDefault
(
0
);
d
.
setUpdateTime
(
new
Date
());
d
.
setUpdateTime
(
new
Date
());
d
.
setUpdater
(
String
.
valueOf
(
loginUserId
));
d
.
setUpdater
(
String
.
valueOf
(
loginUserId
));
customerContactsService
.
updateById
(
d
);
customerContactsService
.
updateById
(
d
);
...
...
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
View file @
214a0d72
...
@@ -177,5 +177,16 @@ public interface ErrorCodeConstants {
...
@@ -177,5 +177,16 @@ public interface ErrorCodeConstants {
ErrorCode
CUSTOMER_DELAY_APPROVAL_MORE_THEN_ONE
=
new
ErrorCode
(
1004006037
,
"customer.delay.approval.times.more.then.one"
)
;
ErrorCode
CUSTOMER_DELAY_APPROVAL_MORE_THEN_ONE
=
new
ErrorCode
(
1004006037
,
"customer.delay.approval.times.more.then.one"
)
;
ErrorCode
CUSTOMER_SAVED_NOT_EXISTS
=
new
ErrorCode
(
1004006038
,
"customer.saved.not.exists"
);
ErrorCode
CUSTOMER_DELETED_NOT_EXISTS
=
new
ErrorCode
(
1004006039
,
"customer.deleted.not.exists"
);
ErrorCode
CUSTOMER_SAVED_CUSTOMER_SERVICE_IS_NULL
=
new
ErrorCode
(
1004006040
,
"customer.saved.customer.service.is.null"
);
ErrorCode
CUSTOMER_DELETED_CUSTOMER_SERVICE_IS_NULL
=
new
ErrorCode
(
1004006041
,
"customer.deleted.customer.service.is.null"
);
ErrorCode
CUSTOMER_MERGE_CUSTOMER_SERVICE_NOT_SAME
=
new
ErrorCode
(
1004006042
,
"customer.merge.customer.service.not.same"
);
}
}
yudao-server/src/main/resources/i18n/messages.properties
View file @
214a0d72
...
@@ -274,3 +274,8 @@ order.cargo.control.limit.update.consignee.error=
...
@@ -274,3 +274,8 @@ order.cargo.control.limit.update.consignee.error=
order.cargo.control.limit.update.consignee.info
=
order.cargo.control.limit.update.consignee.info
=
order.cargo.control.consignee.limit.update.applying
=
order.cargo.control.consignee.limit.update.applying
=
order.cargo.control.overseas.warehouse.update.applying
=
order.cargo.control.overseas.warehouse.update.applying
=
customer.saved.not.exists
=
customer.deleted.not.exists
=
customer.saved.customer.service.is.null
=
customer.deleted.customer.service.is.null
=
customer.merge.customer.service.not.same
=
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
214a0d72
...
@@ -1081,3 +1081,8 @@ overseas.warehouse.update.processing=Overseas warehouse modification application
...
@@ -1081,3 +1081,8 @@ overseas.warehouse.update.processing=Overseas warehouse modification application
overseas.warehouse.update.pass
=
Overseas warehouse modification approval passed
overseas.warehouse.update.pass
=
Overseas warehouse modification approval passed
overseas.warehouse.update.reject
=
Overseas warehouse modification approval rejected
overseas.warehouse.update.reject
=
Overseas warehouse modification approval rejected
overseas.warehouse.update.cancel
=
Overseas warehouse modification approval cancelled
overseas.warehouse.update.cancel
=
Overseas warehouse modification approval cancelled
customer.saved.not.exists
=
customer saved not exists
customer.deleted.not.exists
=
customer deleted not exists
customer.saved.customer.service.is.null
=
customer saved customer service is null
customer.deleted.customer.service.is.null
=
customer merged customer service is null
customer.merge.customer.service.not.same
=
tow customer's customer serivce not same
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
214a0d72
...
@@ -1031,10 +1031,10 @@ reward.redeem.allow.count.error = \u5DF2\u8D85\u51FA\u4E2A\u4EBA\u5141\u8BB8\u51
...
@@ -1031,10 +1031,10 @@ reward.redeem.allow.count.error = \u5DF2\u8D85\u51FA\u4E2A\u4EBA\u5141\u8BB8\u51
reward.node.and.points.list.error
=
\u
521B
\u
5EFA
\u
793C
\u
54C1
\u
7F51
\u
70B9
\u6216\u6240\u9700\u
79EF
\u5206\u9519\u
8BEF
reward.node.and.points.list.error
=
\u
521B
\u
5EFA
\u
793C
\u
54C1
\u
7F51
\u
70B9
\u6216\u6240\u9700\u
79EF
\u5206\u9519\u
8BEF
reward.redeem.recipient.error
=
\u
793C
\u
54C1
\u6536\u
8D27
\u
4EBA
\u
4FE1
\u
606F
\u
4E0D
\u5168
reward.redeem.recipient.error
=
\u
793C
\u
54C1
\u6536\u
8D27
\u
4EBA
\u
4FE1
\u
606F
\u
4E0D
\u5168
redeem.import.no.record
=
\u8868\u
683C
\u
4E2D
\u
65E0
\u
8BB0
\u
5F55
redeem.import.no.record
=
\u8868\u
683C
\u
4E2D
\u
65E0
\u
8BB0
\u
5F55
order.cargo.control.limit.update.consignee.error
=
\u
5
f53
\u
524d
\u
63a7
\u
8d27
\u
8ba2
\u5355\u9650\u5236\u
4fee
\u6539\u6536\u
8d27
\u
4eba
\u
ff0c
\u
672a
\u
67e5
\u
8be2
\u5230\u9650\u5236\u
65f6
\u
95f
4
order.cargo.control.limit.update.consignee.error
=
\u
5
F53
\u
524D
\u
63A7
\u
8D27
\u
8BA2
\u5355\u9650\u5236\u
4FEE
\u6539\u6536\u
8D27
\u
4EBA
\u
FF0C
\u
672A
\u
67E5
\u
8BE2
\u5230\u9650\u5236\u
65F6
\u
95F
4
order.cargo.control.limit.update.consignee.info
=
\u
63
a7
\u
8d27
\u
8ba2
\u5355\u6536\u
8d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u
65f6
\u
95f4
\u
672a
\u5230\u
671f
\u
ff0c
\u
4e0d
\u
80fd
\u
4fee
\u6539\u
8ba2
\u5355\u6536\u
8d27
\u
4eba
\u
4fe1
\u
606f
order.cargo.control.limit.update.consignee.info
=
\u
63
A7
\u
8D27
\u
8BA2
\u5355\u6536\u
8D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u
65F6
\u
95F4
\u
672A
\u5230\u
671F
\u
FF0C
\u
4E0D
\u
80FD
\u
4FEE
\u6539\u
8BA2
\u5355\u6536\u
8D27
\u
4EBA
\u
4FE1
\u
606F
order.cargo.control.consignee.limit.update.applying
=
\u6536\u
8
d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u7533\u
8bf7
\u
4e2d
\u
ff0c
\u
4e0d
\u
80fd
\u
8fdb
\u
884c
\u
653e
\u
8d27
\u
ff
01
order.cargo.control.consignee.limit.update.applying
=
\u6536\u
8
D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u7533\u
8BF7
\u
4E2D
\u
FF0C
\u
4E0D
\u
80FD
\u
8FDB
\u
884C
\u
653E
\u
8D27
\u
FF
01
order.cargo.control.overseas.warehouse.update.applying
=
\u
6
d77
\u5916\u
4ed3
\u
4fee
\u6539\u7533\u
8bf7
\u
4e2d
\u
ff0c
\u
4e0d
\u
80fd
\u
8fdb
\u
884c
\u
653e
\u
8d27
\u
ff
01
order.cargo.control.overseas.warehouse.update.applying
=
\u
6
D77
\u5916\u
4ED3
\u
4FEE
\u6539\u7533\u
8BF7
\u
4E2D
\u
FF0C
\u
4E0D
\u
80FD
\u
8FDB
\u
884C
\u
653E
\u
8D27
\u
FF
01
get.lock.failed
=
\u
670D
\u
52A1
\u
7E41
\u
5FD9
\u
FF0C
\u
8BF7
\u
7A0D
\u
540E
\u
91CD
\u
8BD5
get.lock.failed
=
\u
670D
\u
52A1
\u
7E41
\u
5FD9
\u
FF0C
\u
8BF7
\u
7A0D
\u
540E
\u
91CD
\u
8BD5
reward.redeem.not.exist
=
\u
793C
\u
54C1
\u5151\u6362\u
8BB0
\u
5F55
\u
4E0D
\u
5B58
\u5728
reward.redeem.not.exist
=
\u
793C
\u
54C1
\u5151\u6362\u
8BB0
\u
5F55
\u
4E0D
\u
5B58
\u5728
...
@@ -1072,12 +1072,17 @@ score.rule.first.order.error = \u662F\u5426\u9996\u5355\u5FC5\u987B\u4E3A\u662F\
...
@@ -1072,12 +1072,17 @@ score.rule.first.order.error = \u662F\u5426\u9996\u5355\u5FC5\u987B\u4E3A\u662F\
user.address.not.exists
=
\u7528\u6237\u5730\u5740\u
4E0D
\u
5B58
\u5728
user.address.not.exists
=
\u7528\u6237\u5730\u5740\u
4E0D
\u
5B58
\u5728
user.address.field.error
=
\u7528\u6237\u5730\u5740\u
5B57
\u
6BB5
\u9519\u
8BEF
\u
FF1A{}
user.address.field.error
=
\u7528\u6237\u5730\u5740\u
5B57
\u
6BB5
\u9519\u
8BEF
\u
FF1A{}
consignee.limit.update.processing
=
\u6536\u
8
d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u7533\u
8bf7
\u
4e2d
consignee.limit.update.processing
=
\u6536\u
8
D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u7533\u
8BF7
\u
4E2D
consignee.limit.update.pass
=
\u6536\u
8
d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u
5ba1
\u6279\u
901a
\u
8fc
7
consignee.limit.update.pass
=
\u6536\u
8
D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u
5BA1
\u6279\u
901A
\u
8FC
7
consignee.limit.update.reject
=
\u6536\u
8
d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u
5ba1
\u6279\u
62d2
\u
7edd
consignee.limit.update.reject
=
\u6536\u
8
D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u
5BA1
\u6279\u
62D2
\u
7EDD
consignee.limit.update.cancel
=
\u6536\u
8
d27
\u
4eba
\u9650\u5236\u
4fee
\u6539\u
5ba1
\u6279\u
53d6
\u
6d
88
consignee.limit.update.cancel
=
\u6536\u
8
D27
\u
4EBA
\u9650\u5236\u
4FEE
\u6539\u
5BA1
\u6279\u
53D6
\u
6D
88
overseas.warehouse.update.processing
=
\u
6d77
\u5916\u
4ed3
\u
4fee
\u6539\u7533\u
8bf7
\u
4e2d
overseas.warehouse.update.processing
=
\u
6D77
\u5916\u
4ED3
\u
4FEE
\u6539\u7533\u
8BF7
\u
4E2D
overseas.warehouse.update.pass
=
\u
6d77
\u5916\u
4ed3
\u
4fee
\u6539\u
5ba1
\u6279\u
901a
\u
8fc7
overseas.warehouse.update.pass
=
\u
6D77
\u5916\u
4ED3
\u
4FEE
\u6539\u
5BA1
\u6279\u
901A
\u
8FC7
overseas.warehouse.update.reject
=
\u
6d77
\u5916\u
4ed3
\u
4fee
\u6539\u
5ba1
\u6279\u
62d2
\u
7edd
overseas.warehouse.update.reject
=
\u
6D77
\u5916\u
4ED3
\u
4FEE
\u6539\u
5BA1
\u6279\u
62D2
\u
7EDD
overseas.warehouse.update.cancel
=
\u
6d77
\u5916\u
4ed3
\u
4fee
\u6539\u
5ba1
\u6279\u
53d6
\u
6d88
overseas.warehouse.update.cancel
=
\u
6D77
\u5916\u
4ED3
\u
4FEE
\u6539\u
5BA1
\u6279\u
53D6
\u
6D88
\ No newline at end of file
customer.saved.not.exists
=
\u
4FDD
\u7559\u
5BA2
\u6237\u
4E0D
\u
5B58
\u5728
customer.deleted.not.exists
=
\u
88AB
\u5408\u
5E76
\u
5BA2
\u6237\u
4E0D
\u
5B58
\u5728
customer.saved.customer.service.is.null
=
\u
88AB
\u
4FDD
\u7559\u
5BA2
\u6237\u7684\u
5BA2
\u6237\u
7ECF
\u7406\u
4E3A
\u
7A7A
customer.deleted.customer.service.is.null
=
\u
88AB
\u5408\u
5E76
\u7684\u
5BA2
\u6237\u7684\u
5BA2
\u6237\u
7ECF
\u7406\u
4E3A
\u
7A7A
customer.merge.customer.service.not.same
=
\u
4E24
\u
5BA2
\u6237\u7684\u
5BA2
\u6237\u
7ECF
\u7406\u
4E0D
\u
4E00
\u
81F4
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment