Commit bb45b2b8 authored by 赵啸非's avatar 赵啸非

修改登录鉴权时间

parent 80920a43
package com.mortals.xhx.base.framework.interceptor;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.service.IAuthTokenService;
......@@ -65,7 +66,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
@Value("${token.database:0}")
private Integer portalDb;
protected static final Long SECOND = 1l;
protected static final Long SECOND = 1000l;
protected static final Long SECOND_MINUTE = 60 * SECOND;
......@@ -202,7 +203,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
// 根据uuid将user缓存
String userKey = getTokenKey(user.getToken());
//设置有效时间 单位秒
cacheService.set(userKey, user, expireTime * SECOND_MINUTE);
cacheService.set(userKey, JSON.toJSONString(user), expireTime * SECOND_MINUTE);
}
......
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