| | |
| | | recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员"); |
| | | throw new ServiceException("对不起,您的账号:" + username + " 已停用"); |
| | | } |
| | | if (user.getUserType().equals("03")){ |
| | | // if (user.getUserType().equals("02")){ |
| | | // throw new ServiceException("登录失败,登录账号权限不足"); |
| | | // } |
| | | |
| | | if (org.springframework.util.StringUtils.hasLength(seBei) && user.getUserType().equals("03")){ |
| | | SeBei se=new SeBei(); |
| | | se.setUserId(user.getUserId()); |
| | | se.setSebei(seBei); |
| | | Integer getequipmente = managementClient.getequipmente(se).getData(); |
| | | if (getequipmente==1){ |
| | | throw new ServiceException("登录失败,登录账号与当前设备不匹配"); |
| | | }else if (getequipmente==9){ |
| | | throw new ServiceException("登录失败,设备号不存在"); |
| | | } |
| | | } |
| | | if (org.springframework.util.StringUtils.hasLength(seBei)){ |
| | | userInfo.setIsBig(true); |
| | | } |
| | | passwordService.validate(user, password); |
| | | recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功"); |
| | | return userInfo; |