|
@@ -443,6 +443,12 @@ public class UserLogic {
|
|
|
|
|
|
@Transactional
|
|
|
public void saveWebsitUser(String websitId, User user, String bankAccount, String workerNumber, String remark) {
|
|
|
+ // 用户师傅编号不为空并且师傅编号与传入师傅编号不一致,抛错
|
|
|
+ if (StringUtils.isNotBlank(user.getWorkerNumber())
|
|
|
+ && !StringUtils.equals(user.getWorkerNumber(), workerNumber)) {
|
|
|
+ throw new RemoteServiceException("用户师傅编号与本次传入师傅编号不一致");
|
|
|
+ }
|
|
|
+
|
|
|
// 先清空网点师傅记录
|
|
|
websitUserService.lambdaUpdate()
|
|
|
.eq(WebsitUser::getUserId, user.getUserId())
|
|
@@ -459,6 +465,11 @@ public class UserLogic {
|
|
|
websitUser.setBankAccount(bankAccount);
|
|
|
websitUser.setWorkerNumber(workerNumber);
|
|
|
websitUser.insert();
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(user.getWorkerNumber())) {
|
|
|
+ user.setWorkerNumber(workerNumber)
|
|
|
+ .updateById();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|