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
6df275ea
Commit
6df275ea
authored
Nov 01, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 跟进编码生成bug修复
parent
c653c100
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
11 deletions
+51
-11
CustomerFollowupService.java
...mer/service/customerFollowup/CustomerFollowupService.java
+1
-1
CustomerFollowupServiceImpl.java
...service/customerFollowup/CustomerFollowupServiceImpl.java
+13
-7
CustomerFollowupCreateReqVO.java
...omer/vo/customerFollowup/CustomerFollowupCreateReqVO.java
+6
-0
CustomerFollowupNumberBackVO.java
...mer/vo/customerFollowup/CustomerFollowupNumberBackVO.java
+28
-0
CustomerFollowupController.java
...er/admin/customerFollowup/CustomerFollowupController.java
+3
-3
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerFollowup/CustomerFollowupService.java
View file @
6df275ea
...
@@ -15,7 +15,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
...
@@ -15,7 +15,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
*/
*/
public
interface
CustomerFollowupService
extends
IService
<
CustomerFollowupDO
>
{
public
interface
CustomerFollowupService
extends
IService
<
CustomerFollowupDO
>
{
String
generateFollowupNumber
();
CustomerFollowupNumberBackVO
generateFollowupNumber
();
/**
/**
* 创建客户跟进
* 创建客户跟进
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerFollowup/CustomerFollowupServiceImpl.java
View file @
6df275ea
...
@@ -19,10 +19,7 @@ import cn.iocoder.yudao.module.customer.dal.mysql.customerContacts.CustomerConta
...
@@ -19,10 +19,7 @@ import cn.iocoder.yudao.module.customer.dal.mysql.customerContacts.CustomerConta
import
cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup.CustomerFollowupMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup.CustomerFollowupMapper
;
import
cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.*
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupQueryVO
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupUpdateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupUpdateStatusReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerFollowupStatusEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerFollowupStatusEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
...
@@ -76,14 +73,19 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
...
@@ -76,14 +73,19 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
* @return
* @return
*/
*/
@Override
@Override
public
String
generateFollowupNumber
()
{
public
CustomerFollowupNumberBackVO
generateFollowupNumber
()
{
// 跟进单号生成
// 跟进单号生成
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
event
.
setType
(
6
);
event
.
setType
(
6
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
applicationContext
.
publishEvent
(
event
);
applicationContext
.
publishEvent
(
event
);
String
newFollowupNumber
=
CodeUtils
.
getOddFollowupNumbers
(
event
.
getNumber
());
String
newFollowupNumber
=
CodeUtils
.
getOddFollowupNumbers
(
event
.
getNumber
());
return
newFollowupNumber
;
CustomerFollowupNumberBackVO
customerFollowupNumberBackVO
=
new
CustomerFollowupNumberBackVO
()
.
setNumberId
(
event
.
getId
())
.
setNumberVersion
(
event
.
getVersion
());
return
customerFollowupNumberBackVO
;
}
}
@Override
@Override
...
@@ -91,6 +93,8 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
...
@@ -91,6 +93,8 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
public
Long
createFollowup
(
CustomerFollowupCreateReqVO
createReqVO
)
{
public
Long
createFollowup
(
CustomerFollowupCreateReqVO
createReqVO
)
{
// 获取新编号
// 获取新编号
String
newNumber
=
createReqVO
.
getNumber
();
String
newNumber
=
createReqVO
.
getNumber
();
Long
numberId
=
createReqVO
.
getNumberId
();
Integer
numberVersion
=
createReqVO
.
getNumberVersion
();
// 编号不存在,报异常
// 编号不存在,报异常
if
(
StringUtils
.
isBlank
(
newNumber
))
{
if
(
StringUtils
.
isBlank
(
newNumber
))
{
...
@@ -99,9 +103,11 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
...
@@ -99,9 +103,11 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
// 更新编号,内部会判断冲突
// 更新编号,内部会判断冲突
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
event
.
setId
(
numberId
);
event
.
setVersion
(
numberVersion
);
event
.
setNewNumber
(
newNumber
);
event
.
setType
(
6
);
event
.
setType
(
6
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
event
.
setNumberKey
(
FOLLOWUP_NEW_NUMBER
);
event
.
setNewNumber
(
newNumber
);
applicationContext
.
publishEvent
(
event
);
applicationContext
.
publishEvent
(
event
);
// 插入
// 插入
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customerFollowup/CustomerFollowupCreateReqVO.java
View file @
6df275ea
...
@@ -11,4 +11,10 @@ import javax.validation.constraints.*;
...
@@ -11,4 +11,10 @@ import javax.validation.constraints.*;
@ApiModel
(
"管理后台 - 客户跟进创建 Request VO"
)
@ApiModel
(
"管理后台 - 客户跟进创建 Request VO"
)
public
class
CustomerFollowupCreateReqVO
extends
CustomerFollowupBaseVO
{
public
class
CustomerFollowupCreateReqVO
extends
CustomerFollowupBaseVO
{
@ApiModelProperty
(
value
=
"编号纪录ID"
)
private
Long
numberId
;
@ApiModelProperty
(
value
=
"行号"
)
private
Integer
numberVersion
;
}
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customerFollowup/CustomerFollowupNumberBackVO.java
0 → 100644
View file @
6df275ea
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customerFollowup
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
* 客户跟进 Base VO,提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
@Data
public
class
CustomerFollowupNumberBackVO
{
@ApiModelProperty
(
value
=
"编号"
)
private
String
number
;
@ApiModelProperty
(
value
=
"编号纪录ID"
)
private
Long
numberId
;
@ApiModelProperty
(
value
=
"行号"
)
private
Integer
numberVersion
;
}
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerFollowup/CustomerFollowupController.java
View file @
6df275ea
...
@@ -46,9 +46,9 @@ public class CustomerFollowupController {
...
@@ -46,9 +46,9 @@ public class CustomerFollowupController {
@GetMapping
(
"/getFollowupNewNumber"
)
@GetMapping
(
"/getFollowupNewNumber"
)
@ApiOperation
(
"获得最新的跟进编号"
)
@ApiOperation
(
"获得最新的跟进编号"
)
public
CommonResult
<
String
>
getFollowupNewNumber
()
{
public
CommonResult
<
CustomerFollowupNumberBackVO
>
getFollowupNewNumber
()
{
String
number
=
followupService
.
generateFollowupNumber
();
CustomerFollowupNumberBackVO
customerFollowupNumberBackVO
=
followupService
.
generateFollowupNumber
();
return
success
(
number
);
return
success
(
customerFollowupNumberBackVO
);
}
}
...
...
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