| | |
| | | if (StringUtils.isNull(appUser)) { |
| | | recordLogService.recordLogininfor(body.getCellPhone(), Constants.LOGIN_FAIL, |
| | | "登录用户不存在"); |
| | | throw new ServiceException("登录用户:" + body.getCellPhone() + " 不存在"); |
| | | throw new ServiceException("登录用户:" + body.getCellPhone() + " 不存在",500); |
| | | } |
| | | // 1:正常 2:冻结 3:注销 |
| | | if (appUser.getUserStatus().equals(AppUserStatusEnum.FROZEN.getCode())) { |
| | | recordLogService.recordLogininfor(body.getCellPhone(), Constants.LOGIN_FAIL, |
| | | "账号已冻结"); |
| | | throw new ServiceException("账号已冻结"); |
| | | throw new ServiceException("账号已冻结",500); |
| | | } |
| | | if (appUser.getUserStatus().equals(AppUserStatusEnum.LOGOUT.getCode())) { |
| | | recordLogService.recordLogininfor(body.getCellPhone(), Constants.LOGIN_FAIL, |
| | | "账号已注销"); |
| | | throw new ServiceException("账号已注销"); |
| | | throw new ServiceException("账号已注销",500); |
| | | } |
| | | // 查询系统用户信息 |
| | | SysUser sysUser = sysUserClient.getSysUser(appUser.getUserId()).getData(); |
| | | if (StringUtils.isNull(sysUser)) { |
| | | recordLogService.recordLogininfor(body.getCellPhone(), Constants.LOGIN_FAIL, |
| | | "登录用户不存在"); |
| | | throw new ServiceException("登录用户:" + body.getCellPhone() + " 不存在"); |
| | | throw new ServiceException("登录用户:" + body.getCellPhone() + " 不存在",500); |
| | | } |
| | | passwordService.validate(sysUser, body.getPassword()); |
| | | // if (!sysUser.getPassword().equals(body.getPassword())){ |