| | |
| | | if(userType.equals(UserTypeEnum.OTHER_USER.getCode())){ |
| | | throw new ApiException("没有权限操作或者更新上级用户类型的用户"); |
| | | } |
| | | if(currentUserType.equals(UserTypeEnum.OTHER_USER.getCode())){ |
| | | if(userType<=UserTypeEnum.COMPANY_USER.getCode()){ |
| | | if(currentUserType.equals(UserTypeEnum.OTHER_USER.getCode()) || currentUserType.equals(UserTypeEnum.COMPANY_ADMIN.getCode())){ |
| | | if(userType<=UserTypeEnum.COMPANY_USER.getCode() && !currentUserType.equals(UserTypeEnum.COMPANY_ADMIN.getCode())){ |
| | | throw new ApiException("没有权限操作或者更新上级用户类型的用户"); |
| | | } |
| | | }else{ |
| | | if(userType<=currentUserType){ |
| | | if(userType<currentUserType){ |
| | | throw new ApiException("没有权限操作或者更新上级用户类型的用户"); |
| | | } |
| | | } |