Commit ac8ad2b2 by 胡文明

Merge remote-tracking branch 'origin/master'

parents 78145c41 9cc2def9
...@@ -28,12 +28,12 @@ public class ErrorCodes { ...@@ -28,12 +28,12 @@ public class ErrorCodes {
public static final String UNSUPPORTED_DATA_TYPE = "R0016"; public static final String UNSUPPORTED_DATA_TYPE = "R0016";
public static final String UNKNOEW_TRANS = "R0017"; public static final String UNKNOEW_TRANS = "R0017";
public static final String FORBIDDEN_TRANS = "R0018"; public static final String FORBIDDEN_TRANS = "R0018";
public static final String INTERRUPTED_ERROR = "R9997"; public static final String INTERRUPTED_ERROR = "R9997";
public static final String REDIS_CONNECTION_ERROR = "R9998"; public static final String REDIS_CONNECTION_ERROR = "R9998";
public static final String ERROR = "R9999"; public static final String ERROR = "R9999";
public static final String BUSINESS_ERROR = "E0001"; public static final String BUSINESS_ERROR = "E0001";
} }
...@@ -137,14 +137,14 @@ public class LoginController { ...@@ -137,14 +137,14 @@ public class LoginController {
getMenus(item, subMenuList); getMenus(item, subMenuList);
} }
} }
@ResponseBody @ResponseBody
@RequestMapping(value = "/logout", method = RequestMethod.POST) @RequestMapping(value = "/logout", method = RequestMethod.POST)
public Object logout(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpSession session) { public Object logout(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpSession session) {
return "ok"; return "ok";
} }
} }
...@@ -74,7 +74,7 @@ public class TokenInterceptor implements HandlerInterceptor { ...@@ -74,7 +74,7 @@ public class TokenInterceptor implements HandlerInterceptor {
} }
// 验证登录时间 // 验证登录时间
if (System.currentTimeMillis() > redisLoginInfo.getExpiredTime()) { if (System.currentTimeMillis() > redisLoginInfo.getExpiredTime()) {
Result rt = new Result(ErrorCodes.LOGIN_TIMEOUT, "会话超时,请重新登录。超时时间戳:"+redisLoginInfo.getExpiredTime()+ Result rt = new Result(ErrorCodes.LOGIN_TIMEOUT, "会话超时,请重新登录。超时时间戳:"+redisLoginInfo.getExpiredTime()+
",当前时间戳:"+System.currentTimeMillis(), null); ",当前时间戳:"+System.currentTimeMillis(), null);
responseMessage(response, response.getWriter(), rt); responseMessage(response, response.getWriter(), rt);
...@@ -82,7 +82,7 @@ public class TokenInterceptor implements HandlerInterceptor { ...@@ -82,7 +82,7 @@ public class TokenInterceptor implements HandlerInterceptor {
} }
// 重新刷入登陆时间 // 重新刷入登陆时间
RedisLoginInfo nweRedisLoginInfo = new RedisLoginInfo(userId, token, NumericUtil.sessionTimeOut(), redisLoginInfo.getSysmod(),terminalType); RedisLoginInfo nweRedisLoginInfo = new RedisLoginInfo(userId, token, NumericUtil.sessionTimeOut(), redisLoginInfo.getSysmod(),noUiRequest.getTerminalType());
RedisUtil.set(Constants.SESSION + "." + userId + "." + terminalType, nweRedisLoginInfo); RedisUtil.set(Constants.SESSION + "." + userId + "." + terminalType, nweRedisLoginInfo);
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment