Browse Source

解禁:/epmetuser/customerstaff/enablestaff

master
yinzuomei 3 years ago
parent
commit
d720e12549
  1. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java
  2. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  3. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java

@ -18,5 +18,8 @@ public class EnableStaffFormDTO implements Serializable {
* 被解禁用户Id
*/
private String staffId;
/**
* token中获取
*/
private String customerId;
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -566,6 +566,7 @@ public class CustomerStaffController {
@PostMapping("enablestaff")
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_ENABLE)
public Result enableStaff(@LoginUser TokenDto tokenDto, @RequestBody EnableStaffFormDTO fromDTO){
fromDTO.setCustomerId(tokenDto.getCustomerId());
if (tokenDto.getUserId().equals(fromDTO.getStaffId())) {
throw new RenException("工作人员自己不能解禁自己");
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -1055,6 +1055,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
staffEntity.setId(customerStaffEntity.getId());
staffEntity.setEnableFlag(CustomerStaffConstant.ENABLE);
baseDao.updateById(staffEntity);
//2021.8.24 sun 人员禁用时删除工作人员的缓存信息
CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId());
}
/**

Loading…
Cancel
Save