|
|
|
@ -18,6 +18,10 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.annotation.RequirePermission; |
|
|
|
import com.epmet.commons.tools.enums.RequirePermissionEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
@ -433,7 +437,11 @@ public class CustomerStaffController { |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@PostMapping("enablestaff") |
|
|
|
public Result enableStaff(@RequestBody EnableStaffFormDTO fromDTO){ |
|
|
|
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_ENABLE) |
|
|
|
public Result enableStaff(@LoginUser TokenDto tokenDto, @RequestBody EnableStaffFormDTO fromDTO){ |
|
|
|
if (tokenDto.getUserId().equals(fromDTO.getStaffId())) { |
|
|
|
throw new RenException("工作人员自己不能解禁自己"); |
|
|
|
} |
|
|
|
customerStaffService.enableStaff(fromDTO); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|