Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
644a26ad
Commit
644a26ad
authored
Mar 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
96180e85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+3
-1
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
644a26ad
...
@@ -104,6 +104,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -104,6 +104,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
}
}
String
customerBizId
=
customerAddRequest
.
getCustomerBizId
();
Customer
customer
=
null
;
Customer
customer
=
null
;
if
(
StringUtils
.
isNotBlank
(
customerAddRequest
.
getCustomerBizId
()))
{
if
(
StringUtils
.
isNotBlank
(
customerAddRequest
.
getCustomerBizId
()))
{
customer
=
customerService
.
queryOneByCustomerBizId
(
customerAddRequest
.
getCustomerBizId
());
customer
=
customerService
.
queryOneByCustomerBizId
(
customerAddRequest
.
getCustomerBizId
());
...
@@ -114,7 +115,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -114,7 +115,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
if
(
customer
==
null
)
{
if
(
customer
==
null
)
{
customer
=
new
Customer
();
customer
=
new
Customer
();
// 客户主表业务唯一id
// 客户主表业务唯一id
customer
.
setCustomerBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_CUSTOMER
.
getCode
()
));
customer
BizId
=
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_CUSTOMER
.
getCode
(
));
}
}
}
}
...
@@ -135,6 +136,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -135,6 +136,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
// 校验客户主表信息
// 校验客户主表信息
validCustomer
(
customer
);
validCustomer
(
customer
);
customer
.
setCustomerBizId
(
customerBizId
);
boolean
result
=
customerService
.
saveOrUpdate
(
customer
);
boolean
result
=
customerService
.
saveOrUpdate
(
customer
);
if
(!
result
)
{
if
(!
result
)
{
throw
new
BusinessException
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
...
...
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