|
@@ -88,12 +88,14 @@ public class SysLoginService {
|
|
|
}
|
|
|
|
|
|
//判断15天内是否登录过 大于0 登录过
|
|
|
- Integer lastLogininforCount = remoteWechatService.getLastLogininfor(username);
|
|
|
- if (lastLogininforCount < 1){
|
|
|
- //设置用户停用
|
|
|
- remoteUserService.updateStatus(user);
|
|
|
- remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
|
|
- throw new BaseException("对不起,您的账号:" + username + "超过15天未登录 已停用,请联系管理员");
|
|
|
+ if (!"admin".equals(username)){
|
|
|
+ Integer lastLogininforCount = remoteWechatService.getLastLogininfor(username);
|
|
|
+ if (lastLogininforCount < 1){
|
|
|
+ //设置用户停用
|
|
|
+ remoteUserService.updateStatus(user);
|
|
|
+ remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
|
|
+ throw new BaseException("对不起,您的账号:" + username + "超过15天未登录 已停用,请联系管理员");
|
|
|
+ }
|
|
|
}
|
|
|
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
|
@@ -134,12 +136,14 @@ public class SysLoginService {
|
|
|
throw new BaseException("对不起,您的账号:" + userName + " 已被删除");
|
|
|
}
|
|
|
//判断15天内是否登录过 大于0 登录过
|
|
|
- Integer lastLogininforCount = remoteWechatService.getLastLogininfor(userName);
|
|
|
- if (lastLogininforCount < 1){
|
|
|
- //设置用户停用
|
|
|
- remoteUserService.updateStatus(user);
|
|
|
- remoteLogService.saveLogininfor(userName, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
|
|
- throw new BaseException("对不起,您的账号:" + userName + "超过15天未登录 已停用,请联系管理员");
|
|
|
+ if (!"admin".equals(userName)) {
|
|
|
+ Integer lastLogininforCount = remoteWechatService.getLastLogininfor(userName);
|
|
|
+ if (lastLogininforCount < 1) {
|
|
|
+ //设置用户停用
|
|
|
+ remoteUserService.updateStatus(user);
|
|
|
+ remoteLogService.saveLogininfor(userName, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
|
|
+ throw new BaseException("对不起,您的账号:" + userName + "超过15天未登录 已停用,请联系管理员");
|
|
|
+ }
|
|
|
}
|
|
|
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
|
|
remoteLogService.saveLogininfor(userName, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|