Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
304a027f
Commit
304a027f
authored
Oct 12, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑优化
parent
3a9a23d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
CustomerServiceImpl.java
...in/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
+6
-5
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
View file @
304a027f
...
...
@@ -82,17 +82,18 @@ public class CustomerServiceImpl implements ICustomerService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
add
(
Customer
customer
)
{
dealWithcustomerData
(
customer
);
customer
.
setUipId
(
enterpriseCommonService
.
getUipIdByCompanyNameOrCompanyId
(
customer
.
getCompanyName
(),
customer
.
getCompanyId
()));
Long
userId
=
LoginHelper
.
getUserId
();
customer
.
setCreateId
(
userId
);
customer
.
setUpdateId
(
userId
);
customer
.
setTenantId
(
LoginHelper
.
getTenantId
());
//查重
Customer
verifyCustomer
=
baseMapper
.
selectByCompanyNameAndUserId
(
customer
.
getCompanyName
(),
userId
);
if
(!
ObjectUtils
.
isEmpty
(
verifyCustomer
))
{
throw
new
ServiceException
(
"当前客户信息已存在,请勿重复添加!"
);
}
dealWithcustomerData
(
customer
);
customer
.
setUipId
(
enterpriseCommonService
.
getUipIdByCompanyNameOrCompanyId
(
customer
.
getCompanyName
(),
customer
.
getCompanyId
()));
customer
.
setCreateId
(
userId
);
customer
.
setUpdateId
(
userId
);
customer
.
setTenantId
(
LoginHelper
.
getTenantId
());
int
i
=
baseMapper
.
insert
(
customer
);
if
(
i
==
0
)
throw
new
ServiceException
(
"客户信息添加错误!"
);
...
...
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