|
@@ -43,6 +43,9 @@ public class SysLoginService {
|
|
* 登录
|
|
* 登录
|
|
*/
|
|
*/
|
|
public LoginUser login(String username, String password) {
|
|
public LoginUser login(String username, String password) {
|
|
|
|
+ if (upKeep && !"admin".equals(username)){
|
|
|
|
+ throw new BaseException("当前正在维护");
|
|
|
|
+ }
|
|
// 用户名或密码为空 错误
|
|
// 用户名或密码为空 错误
|
|
if (StringUtils.isAnyBlank(username, password)) {
|
|
if (StringUtils.isAnyBlank(username, password)) {
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写");
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写");
|
|
@@ -88,10 +91,6 @@ public class SysLoginService {
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户密码错误");
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "用户密码错误");
|
|
throw new BaseException("用户不存在/密码错误");
|
|
throw new BaseException("用户不存在/密码错误");
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (upKeep && !"admin".equals(username)){
|
|
|
|
- throw new BaseException("当前正在维护");
|
|
|
|
- }
|
|
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
|
return userInfo;
|
|
return userInfo;
|
|
}
|
|
}
|