|
@@ -61,13 +61,16 @@ public class LoginController extends BaseController{
|
|
if(tmUser.getStatus() == 0){
|
|
if(tmUser.getStatus() == 0){
|
|
throw new BusinessException(ResultCode.USER_NOT_LOGIN_PERM);
|
|
throw new BusinessException(ResultCode.USER_NOT_LOGIN_PERM);
|
|
}
|
|
}
|
|
- List<TmDepartment> deptList = tmDepartmentService.getSonByDeptId(request.getDeptId());
|
|
|
|
- if(deptList == null || deptList.size() <=0){
|
|
|
|
- throw new BusinessException(ResultCode.DEPT_NOT_EXITS);
|
|
|
|
- }
|
|
|
|
- List<String> deptIds = deptList.stream().map(TmDepartment::getId).collect(Collectors.toList());
|
|
|
|
- if(!deptIds.contains(tmUser.getDeptId())){
|
|
|
|
- throw new BusinessException(ResultCode.PASSWORD_ERROR);
|
|
|
|
|
|
+ //超管除外
|
|
|
|
+ if(!tmUser.getDeptId().equals("0")){
|
|
|
|
+ List<TmDepartment> deptList = tmDepartmentService.getSonByDeptId(request.getDeptId());
|
|
|
|
+ if(deptList == null || deptList.size() <=0){
|
|
|
|
+ throw new BusinessException(ResultCode.DEPT_NOT_EXITS);
|
|
|
|
+ }
|
|
|
|
+ List<String> deptIds = deptList.stream().map(TmDepartment::getId).collect(Collectors.toList());
|
|
|
|
+ if(!deptIds.contains(tmUser.getDeptId())){
|
|
|
|
+ throw new BusinessException(ResultCode.PASSWORD_ERROR);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//对前端传的密码解密
|
|
//对前端传的密码解密
|