|
|
@@ -73,14 +73,14 @@ public class LoginFilter implements Filter {
|
|
|
//token解析后为用户id
|
|
|
String token = request.getHeader(RequestConstant.TOKEN);
|
|
|
if (StringUtils.isBlank(token)) {
|
|
|
- throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.TOKEN_MISSING);
|
|
|
+ throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_MISSING);
|
|
|
}
|
|
|
|
|
|
String key;
|
|
|
try {
|
|
|
key = EncryUtil.descry(Global.PRI_KEY, token);
|
|
|
} catch (Exception e) {
|
|
|
- throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.TOKEN_ERROR);
|
|
|
+ throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_ERROR);
|
|
|
}
|
|
|
|
|
|
//从redis获取用户信息
|
|
|
@@ -88,7 +88,7 @@ public class LoginFilter implements Filter {
|
|
|
String systemType = request.getHeader(RequestConstant.SYSTEM_TYPE);
|
|
|
String userInfo = RedissonUtils.getString(Global.getFullUserLoginKey(Integer.parseInt(systemType), Long.parseLong(key), clientType));
|
|
|
if (StringUtils.isBlank(userInfo)) {
|
|
|
- throw new SystemException(HttpStatus.UN_LOGIN_CODE, HttpStatus.UN_LOGIN_MESSAGE);
|
|
|
+ throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.UN_LOGIN_MESSAGE);
|
|
|
}
|
|
|
|
|
|
//将redis里的用户信息存入内存中,避免业务操作多次从redis获取值*/
|