|
|
@ -511,7 +511,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result editStaffV3(StaffSubmitPyFromDTO fromDTO) { |
|
|
|
public Result editStaffPy(StaffSubmitPyFromDTO fromDTO) { |
|
|
|
CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); |
|
|
|
customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId()); |
|
|
|
customerStaffFormDTO.setMobile(fromDTO.getMobile()); |
|
|
@ -519,7 +519,13 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
if (null != customerStaffDTO && !fromDTO.getStaffId().equals(customerStaffDTO.getUserId())) { |
|
|
|
return new Result<CustomerStaffDTO>().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
CustomerStaffByAccountFormDTO customerStaffAccountFormDTO = new CustomerStaffByAccountFormDTO(); |
|
|
|
customerStaffAccountFormDTO.setCustomerId(fromDTO.getCustomerId()); |
|
|
|
customerStaffAccountFormDTO.setUserAccount(fromDTO.getUserAccount()); |
|
|
|
customerStaffDTO = baseDao.selectListCustomerStaffInfoByAccount(customerStaffAccountFormDTO); |
|
|
|
if (null != customerStaffDTO && !fromDTO.getStaffId().equals(customerStaffDTO.getUserId())) { |
|
|
|
return new Result<CustomerStaffDTO>().error(EpmetErrorCode.ACCOUNT_USED.getCode(), EpmetErrorCode.ACCOUNT_USED.getMsg()); |
|
|
|
} |
|
|
|
CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); |
|
|
|
//Customer_Staff表插入数据
|
|
|
|
CustomerStaffEntity staffEntity = new CustomerStaffEntity(); |
|
|
@ -529,6 +535,9 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
staffEntity.setGender(fromDTO.getGender()); |
|
|
|
staffEntity.setUserAccount(fromDTO.getUserAccount()); |
|
|
|
staffEntity.setWorkType(fromDTO.getWorkType()); |
|
|
|
if (StringUtils.isNotBlank(fromDTO.getPwd())){ |
|
|
|
staffEntity.setPassword(PasswordUtils.encode(fromDTO.getPwd())); |
|
|
|
} |
|
|
|
baseDao.updateById(staffEntity); |
|
|
|
|
|
|
|
//清空权限关联
|
|
|
|