|  |  |  | 
|---|
|  |  |  | // 根据用户名查询用户对象 | 
|---|
|  |  |  | SystemUser queryDto = new SystemUser(); | 
|---|
|  |  |  | queryDto.setUsername(username); | 
|---|
|  |  |  | queryDto.setType(Constants.UserType.SYSTEM.getKey()); | 
|---|
|  |  |  | queryDto.setDeleted(Boolean.FALSE); | 
|---|
|  |  |  | SystemUser user = systemUserService.findOne(queryDto); | 
|---|
|  |  |  | if(user == null){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,账号或密码不正确!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(!Constants.equalsInteger(user.getStatus(),Constants.ZERO)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,账号信息已被禁用,如有疑问请联系系统管理员!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (user == null) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 获取登录用户信息 | 
|---|
|  |  |  | List<SystemRole> roles = systemRoleService.findByUserId(user.getId()); | 
|---|