| | |
| | | // 用户不存在,但提示用户名与密码错误并锁定账号 |
| | | if (user == null || user.getId() == null) { |
| | | setFailCount(tenantId, username, count); |
| | | throw new UsernameNotFoundException(TokenUtil.USER_NOT_FOUND); |
| | | throw new UserDeniedAuthorizationException(TokenUtil.USER_NOT_FOUND); |
| | | } |
| | | // 用户角色不存在 |
| | | if (Func.isEmpty(userInfo.getRoles())) { |
| | |
| | | R<Dept> deptRes = sysClient.getDept(Long.valueOf(deptStr)); |
| | | if (StringUtil.isBlank(deptRes.getData().getAdCode())) |
| | | // 部门为空 |
| | | throw new UsernameNotFoundException("没有找到有效组织机构~"); |
| | | throw new UserDeniedAuthorizationException("没有找到有效组织机构~"); |
| | | else |
| | | userInfo.getDetail().set("adCodeBase",attResManagePersonClient.getAdBaseById(deptRes.getData().getAdCode()).getData()); |
| | | |