update report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java.

Raod 3 years ago committed by Gitee
parent aa4f6afa8a
commit a576adff08
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -130,14 +130,8 @@ public class TokenFilter implements Filter {
error(response);
return;
}
if (!cacheHelper.exist(userKey)) {
error(response);
return;
}
String gaeaUserJsonStr = cacheHelper.stringGet(userKey);
// 延长有效期
cacheHelper.stringSetExpire(tokenKey, token, 3600);
cacheHelper.stringSetExpire(userKey, gaeaUserJsonStr, 3600);
// 判断用户是否有该url的权限
if (!BusinessConstant.USER_ADMIN.equals(loginName)) {
@ -148,6 +142,10 @@ public class TokenFilter implements Filter {
}
}
// 延长有效期
cacheHelper.stringSetExpire(tokenKey, token, 3600);
cacheHelper.stringSetExpire(userKey, gaeaUserJsonStr, 3600);
//执行
filterChain.doFilter(request, response);

Loading…
Cancel
Save