| | |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户已停用,请联系管理员"); |
| | | throw new ServiceException("您的账号已被停用,请联系平台"); |
| | | } |
| | | if (user.getRoleType()==2){ |
| | | Shop data = shopClient.getShopById(user.getObjectId()).getData(); |
| | | if (data==null){ |
| | | throw new ServiceException("门店不存在"); |
| | | }else{ |
| | | if (data.getStatus()==2){ |
| | | throw new ServiceException("您所属门店已被冻结,请联系平台"); |
| | | } |
| | | } |
| | | } |
| | | // if (user.getRoleType()==2){ |
| | | // Shop data = shopClient.getShopById(user.getSiteId()).getData(); |
| | | // if (data==null){ |
| | | // throw new ServiceException("站点不存在"); |
| | | // }else{ |
| | | // if (data.getStatus()==2){ |
| | | // throw new ServiceException("您所属门店已被冻结,请联系平台"); |
| | | // } |
| | | // } |
| | | // } |
| | | passwordService.validate(user, password, request); |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_SUCCESS_STATUS, "登录成功"); |
| | | return userInfo; |