|
|
@@ -262,11 +262,20 @@ public class UserInfoManage { |
|
|
|
String employeeCode = reqUserDetailEditPO.getEmployeeCode(); |
|
|
|
Long userId = generateUserId(reqUserDetailEditPO.getEmployeeCode()); |
|
|
|
UserInfo userInfo = iUserInfoService.getById(userId); |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return; |
|
|
|
|
|
|
|
String mobile = userInfo.getMobile(); |
|
|
|
if (StringUtils.isBlank(mobile)) { |
|
|
|
String phoneNo = reqUserDetailEditPO.getPhoneNo(); |
|
|
|
userInfo.setMobile(phoneNo); |
|
|
|
// 更新浙政钉相关数据 |
|
|
|
if (StringUtils.isNotBlank(phoneNo)) { |
|
|
|
iDingEmployeeInfoService |
|
|
|
.update(Wrappers.lambdaUpdate(DingEmployeeInfo.class) |
|
|
|
.eq(DingEmployeeInfo::getMainJob, "true") |
|
|
|
.eq(DingEmployeeInfo::getEmployeeCode, employeeCode) |
|
|
|
.set(DingEmployeeInfo::getBindUserMobile, phoneNo)); |
|
|
|
} |
|
|
|
} |
|
|
|
String phoneNo = reqUserDetailEditPO.getPhoneNo(); |
|
|
|
userInfo.setMobile(phoneNo); |
|
|
|
userInfo.setAvailable(reqUserDetailEditPO.getStatus()); |
|
|
|
iUserInfoService.updateById(userInfo); |
|
|
|
|
|
|
@@ -281,15 +290,6 @@ public class UserInfoManage { |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
iUserRoleService.saveBatch(userRoleList); |
|
|
|
} |
|
|
|
|
|
|
|
// 更新浙政钉相关数据 |
|
|
|
if (StringUtils.isNotBlank(phoneNo)) { |
|
|
|
iDingEmployeeInfoService |
|
|
|
.update(Wrappers.lambdaUpdate(DingEmployeeInfo.class) |
|
|
|
.eq(DingEmployeeInfo::getMainJob, "true") |
|
|
|
.eq(DingEmployeeInfo::getEmployeeCode, employeeCode) |
|
|
|
.set(DingEmployeeInfo::getBindUserMobile, phoneNo)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|