Browse Source

!165 记录登录信息状态值改为常量

Merge pull request !165 from mastery/my-ry-cloud
tags/v3.5.0
若依 3 years ago committed by Gitee
parent
commit
33694c860f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 4
      ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
  2. 10
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java

4
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java

@ -148,11 +148,11 @@ public class SysLoginService @@ -148,11 +148,11 @@ public class SysLoginService
// 日志状态
if (StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER))
{
logininfor.setStatus("0");
logininfor.setStatus(Constants.LOGIN_SUCCESS_STATUS);
}
else if (Constants.LOGIN_FAIL.equals(status))
{
logininfor.setStatus("1");
logininfor.setStatus(Constants.LOGIN_FAIL_STATUS);
}
remoteLogService.saveLogininfor(logininfor, SecurityConstants.INNER);
}

10
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java

@ -53,6 +53,16 @@ public class Constants @@ -53,6 +53,16 @@ public class Constants
public static final Integer FAIL = 500;
/**
* 登录成功状态
*/
public static final String LOGIN_SUCCESS_STATUS = "1";
/**
* 登录失败状态
*/
public static final String LOGIN_FAIL_STATUS = "0";
/**
* 登录成功
*/
public static final String LOGIN_SUCCESS = "Success";

Loading…
Cancel
Save