Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rpc-scrm-shopmall
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit edf3aec9
authored
Mar 04, 2026
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(score): 实现员工积分手机号变更及迁移功能
1 parent
53348141
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
2 deletions
rpc-scrm-shopmall-api/src/main/java/cn/com/glsx/scrm/shopmall/dto/integral/motivation/ShopmallStaffScoreChangeDTO.java
rpc-scrm-shopmall-api/src/main/java/cn/com/glsx/scrm/shopmall/remote/StaffMotivationRemote.java
rpc-scrm-shopmall/src/main/java/cn/com/glsx/scrm/shopmall/remote/StaffMotivationRemoteImpl.java
rpc-scrm-shopmall/src/main/java/cn/com/glsx/scrm/shopmall/service/integral/StaffMotivationService.java
rpc-scrm-shopmall/src/main/resources/META-INF/orm/ShopmallStaffMotivationMapper.xml
rpc-scrm-shopmall-api/src/main/java/cn/com/glsx/scrm/shopmall/dto/integral/motivation/ShopmallStaffScoreChangeDTO.java
0 → 100644
View file @
edf3aec
package
cn
.
com
.
glsx
.
scrm
.
shopmall
.
dto
.
integral
.
motivation
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.io.Serializable
;
import
java.util.Date
;
@NoArgsConstructor
@AllArgsConstructor
@Data
@ToString
(
callSuper
=
true
)
public
class
ShopmallStaffScoreChangeDTO
implements
Serializable
{
@ApiModelProperty
(
notes
=
"源员工id"
)
private
Integer
sourceStaffId
;
@ApiModelProperty
(
notes
=
"目标员工id"
)
private
Integer
targetStaffId
;
@ApiModelProperty
(
notes
=
"源员工手机号"
)
private
String
sourceStaffPhone
;
@ApiModelProperty
(
notes
=
"目标员工手机号"
)
private
String
targetStaffPhone
;
@ApiModelProperty
(
notes
=
"源门店号"
)
private
Integer
sourceMerchantId
;
@ApiModelProperty
(
notes
=
"目标门店号"
)
private
Integer
targetMerchantId
;
@ApiModelProperty
(
notes
=
"操作时间"
)
private
Date
operateTime
;
@ApiModelProperty
(
notes
=
"操作人"
)
private
String
operator
;
@ApiModelProperty
(
notes
=
"操作备注"
)
private
String
remark
;
}
rpc-scrm-shopmall-api/src/main/java/cn/com/glsx/scrm/shopmall/remote/StaffMotivationRemote.java
View file @
edf3aec
...
@@ -8,6 +8,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...
@@ -8,6 +8,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffScoreChangeDTO
;
import
cn.com.glsx.scrm.shopmall.enums.integral.StaffMotivationStatusEnum
;
import
cn.com.glsx.scrm.shopmall.enums.integral.StaffMotivationStatusEnum
;
import
cn.com.glsx.scrm.shopmall.model.ShopmallStaffMotivationOperation
;
import
cn.com.glsx.scrm.shopmall.model.ShopmallStaffMotivationOperation
;
...
@@ -57,4 +58,7 @@ public interface StaffMotivationRemote {
...
@@ -57,4 +58,7 @@ public interface StaffMotivationRemote {
@ApiMethod
(
"查询指定订单的操作记录"
)
@ApiMethod
(
"查询指定订单的操作记录"
)
RpcResponse
<
List
<
ShopmallStaffMotivationOperation
>>
getOrderOperation
(
ShopmallStaffMotivationDTO
req
);
RpcResponse
<
List
<
ShopmallStaffMotivationOperation
>>
getOrderOperation
(
ShopmallStaffMotivationDTO
req
);
@ApiMethod
(
"变更手机号(积分迁移)"
)
RpcResponse
<
Boolean
>
changeStaffScore
(
ShopmallStaffScoreChangeDTO
dto
);
}
}
rpc-scrm-shopmall/src/main/java/cn/com/glsx/scrm/shopmall/remote/StaffMotivationRemoteImpl.java
View file @
edf3aec
...
@@ -5,6 +5,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...
@@ -5,6 +5,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffScoreChangeDTO
;
import
cn.com.glsx.scrm.shopmall.enums.integral.StaffMotivationStatusEnum
;
import
cn.com.glsx.scrm.shopmall.enums.integral.StaffMotivationStatusEnum
;
import
cn.com.glsx.scrm.shopmall.model.ShopmallStaffMotivationOperation
;
import
cn.com.glsx.scrm.shopmall.model.ShopmallStaffMotivationOperation
;
import
cn.com.glsx.scrm.shopmall.service.integral.StaffMotivationService
;
import
cn.com.glsx.scrm.shopmall.service.integral.StaffMotivationService
;
...
@@ -122,4 +123,14 @@ public class StaffMotivationRemoteImpl implements StaffMotivationRemote {
...
@@ -122,4 +123,14 @@ public class StaffMotivationRemoteImpl implements StaffMotivationRemote {
return
RpcResponse
.
error
(
e
);
return
RpcResponse
.
error
(
e
);
}
}
}
}
@Override
public
RpcResponse
<
Boolean
>
changeStaffScore
(
ShopmallStaffScoreChangeDTO
dto
)
{
try
{
return
RpcResponse
.
success
(
staffMotivationService
.
changeStaffScore
(
dto
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
);
}
}
}
}
rpc-scrm-shopmall/src/main/java/cn/com/glsx/scrm/shopmall/service/integral/StaffMotivationService.java
View file @
edf3aec
...
@@ -26,6 +26,7 @@ import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
...
@@ -26,6 +26,7 @@ import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
import
cn.com.glsx.scrm.shopmall.dto.integral.IntegralTransferOutDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.IntegralTransferOutDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffMotivationOrderScoreDTO
;
import
cn.com.glsx.scrm.shopmall.dto.integral.motivation.ShopmallStaffScoreChangeDTO
;
import
cn.com.glsx.scrm.shopmall.enums.integral.*
;
import
cn.com.glsx.scrm.shopmall.enums.integral.*
;
import
cn.com.glsx.scrm.shopmall.mapper.ShopmallStaffMotivationMapper
;
import
cn.com.glsx.scrm.shopmall.mapper.ShopmallStaffMotivationMapper
;
import
cn.com.glsx.scrm.shopmall.mapper.ShopmallStaffMotivationOperationMapper
;
import
cn.com.glsx.scrm.shopmall.mapper.ShopmallStaffMotivationOperationMapper
;
...
@@ -557,7 +558,7 @@ public class StaffMotivationService {
...
@@ -557,7 +558,7 @@ public class StaffMotivationService {
return
res
;
return
res
;
}
}
public
Boolean
audit
(
ShopmallStaffMotivationDTO
requestDTO
)
{
public
Boolean
audit
All
(
ShopmallStaffMotivationDTO
requestDTO
)
{
RpcAssert
.
assertNotNull
(
requestDTO
.
getAuditResult
(),
DefaultErrorEnum
.
DATA_NULL
,
"审核结果不能为空"
);
RpcAssert
.
assertNotNull
(
requestDTO
.
getAuditResult
(),
DefaultErrorEnum
.
DATA_NULL
,
"审核结果不能为空"
);
ShopmallStaffMotivationDTO
res
=
staffMotivationMapper
.
findById
(
requestDTO
.
getId
());
ShopmallStaffMotivationDTO
res
=
staffMotivationMapper
.
findById
(
requestDTO
.
getId
());
RpcAssert
.
assertNotNull
(
res
,
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"无此记录"
);
RpcAssert
.
assertNotNull
(
res
,
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"无此记录"
);
...
@@ -568,13 +569,29 @@ public class StaffMotivationService {
...
@@ -568,13 +569,29 @@ public class StaffMotivationService {
requestDTO
.
setOperatorPhone
(
staffResponse
.
getStaffPhone
());
requestDTO
.
setOperatorPhone
(
staffResponse
.
getStaffPhone
());
}
}
}
}
RpcAssert
.
assertNotNull
(
requestDTO
.
getOperator
(),
DefaultErrorEnum
.
DATA_NULL
,
"审核人信息缺少"
);
return
thiz
.
audit
(
requestDTO
,
res
);
return
thiz
.
audit
(
requestDTO
,
res
);
}
}
public
Boolean
audit
(
ShopmallStaffMotivationDTO
requestDTO
)
{
List
<
ShopmallStaffMotivationDTO
>
items
=
staffMotivationMapper
.
findCondition
(
requestDTO
);
RpcAssert
.
assertNotEmpty
(
items
,
DefaultErrorEnum
.
SERVER_ERROR
,
"无审批记录可审批"
);
if
(
StringUtils
.
isBlank
(
requestDTO
.
getOperator
())
&&
StringUtils
.
isNotBlank
(
requestDTO
.
getOperatorId
()))
{
MerchantStaffResponse
staffResponse
=
getStaff
(
requestDTO
.
getOperatorId
());
if
(
staffResponse
!=
null
)
{
requestDTO
.
setOperator
(
staffResponse
.
getStaffName
());
requestDTO
.
setOperatorPhone
(
staffResponse
.
getStaffPhone
());
}
}
log
.
info
(
"准备进行积分审批,数量:{},req:{}"
,
items
.
size
(),
requestDTO
);
items
.
forEach
(
p
->
thiz
.
audit
(
requestDTO
,
p
));
return
true
;
}
@Transactional
@Transactional
@GlsxDistributeLockable
(
name
=
"'StaffMotivationService_' + #res.orderCode + '_' + #res.staffUuid"
,
timeoutException
=
RpcServiceException
.
class
)
@GlsxDistributeLockable
(
name
=
"'StaffMotivationService_' + #res.orderCode + '_' + #res.staffUuid"
,
timeoutException
=
RpcServiceException
.
class
)
public
Boolean
audit
(
ShopmallStaffMotivationDTO
requestDTO
,
ShopmallStaffMotivationDTO
res
)
{
public
Boolean
audit
(
ShopmallStaffMotivationDTO
requestDTO
,
ShopmallStaffMotivationDTO
res
)
{
RpcAssert
.
assertNotNull
(
requestDTO
.
getOperator
(),
DefaultErrorEnum
.
DATA_NULL
,
"审核人信息缺少"
);
RpcAssert
.
assertNotNull
(
requestDTO
.
getAuditResult
(),
DefaultErrorEnum
.
DATA_NULL
,
"审核结果不能为空"
);
String
operationRemark
;
String
operationRemark
;
if
(
StaffMotivationAuditSourceEnum
.
SUPERVISOR
.
equals
(
requestDTO
.
getAuditSource
()))
{
if
(
StaffMotivationAuditSourceEnum
.
SUPERVISOR
.
equals
(
requestDTO
.
getAuditSource
()))
{
// 督导审核
// 督导审核
...
@@ -777,4 +794,9 @@ public class StaffMotivationService {
...
@@ -777,4 +794,9 @@ public class StaffMotivationService {
.
forEach
(
p
->
p
.
setMotivationOrderCodes
(
transferOutOrderMap
.
get
(
p
.
getId
())));
.
forEach
(
p
->
p
.
setMotivationOrderCodes
(
transferOutOrderMap
.
get
(
p
.
getId
())));
}
}
public
Boolean
changeStaffScore
(
ShopmallStaffScoreChangeDTO
dto
)
{
// 审批记录是否需要迁移(因为订单绑定的受益人也没变,审批记录作为快照数据理应不变)
return
true
;
}
}
}
rpc-scrm-shopmall/src/main/resources/META-INF/orm/ShopmallStaffMotivationMapper.xml
View file @
edf3aec
...
@@ -72,6 +72,9 @@
...
@@ -72,6 +72,9 @@
<if
test=
"generateType != null"
>
<if
test=
"generateType != null"
>
and sm.generate_type = #{generateType}
and sm.generate_type = #{generateType}
</if>
</if>
<if
test=
"generateType == null"
>
and sm.generate_type in (0, 2)
</if>
<if
test=
"merchantId != null"
>
<if
test=
"merchantId != null"
>
and sm.merchant_id = #{merchantId}
and sm.merchant_id = #{merchantId}
</if>
</if>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment