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
39ce7607
Commit
39ce7607
authored
Nov 12, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进记录单号处理逻辑修正
parent
4f0942f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
CustomerFollowupServiceImpl.java
...service/customerFollowup/CustomerFollowupServiceImpl.java
+12
-19
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerFollowup/CustomerFollowupServiceImpl.java
View file @
39ce7607
...
@@ -90,30 +90,23 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
...
@@ -90,30 +90,23 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
createFollowup
(
CustomerFollowupCreateReqVO
createReqVO
)
{
public
Long
createFollowup
(
CustomerFollowupCreateReqVO
createReqVO
)
{
// 获取新编号
String
newNumber
=
createReqVO
.
getNumber
();
Long
numberId
=
createReqVO
.
getNumberId
();
Integer
numberVersion
=
createReqVO
.
getNumberVersion
();
// 编号不存在,报异常
if
(
StringUtils
.
isBlank
(
newNumber
))
{
throw
exception
(
ErrorCodeConstants
.
FOLLOWUP_NUMBER_NOT_NULL
);
}
// 更新编号,内部会判断冲突
// 更新编号,内部会判断冲突
//OrderNumberLogListener
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
event
.
setId
(
numberId
);
event
.
setType
(
3
);
event
.
setVersion
(
numberVersion
);
event
.
setNewNumber
(
newNumber
);
event
.
setType
(
6
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
applicationContext
.
publishEvent
(
event
);
applicationContext
.
publishEvent
(
event
);
String
newNumber
=
CodeUtils
.
getOddReceiptNumbers
(
event
.
getNumber
());
// 更新跟进记录编号最新缓存
// 待将最新单号持久化
event
.
setNewNumber
(
newNumber
);
applicationContext
.
publishEvent
(
event
);
// 插入
// 插入
CustomerFollowupDO
followup
=
CustomerFollowupConvert
.
INSTANCE
.
convert
(
createReqVO
);
CustomerFollowupDO
followup
=
CustomerFollowupConvert
.
INSTANCE
.
convert
(
createReqVO
);
// 设置联系人名称
// 设置联系人名称
setContactName
(
followup
);
setContactName
(
followup
);
followup
.
setNumber
(
newNumber
);
followupMapper
.
insert
(
followup
);
followupMapper
.
insert
(
followup
);
Long
customerId
=
createReqVO
.
getCustomerId
();
Long
customerId
=
createReqVO
.
getCustomerId
();
...
@@ -208,10 +201,10 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
...
@@ -208,10 +201,10 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
if
(
customerFollowupDO
==
null
)
{
if
(
customerFollowupDO
==
null
)
{
throw
exception
(
FOLLOWUP_NOT_EXISTS
);
throw
exception
(
FOLLOWUP_NOT_EXISTS
);
}
}
//
if
(
CustomerFollowupStatusEnum
.
Commited
.
getValue
().
equals
(
customerFollowupDO
.
getStatus
()))
{
//
if (CustomerFollowupStatusEnum.Commited.getValue().equals(customerFollowupDO.getStatus())) {
throw
exception
(
FOLLOWUP_ALREADY_SUBMITTED
);
//
throw exception(FOLLOWUP_ALREADY_SUBMITTED);
}
//
}
}
}
for
(
Long
id
:
ids
)
{
for
(
Long
id
:
ids
)
{
...
...
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