liangpeile 1 anno fa
parent
commit
e256678961

+ 1 - 1
crmeb-admin/src/main/java/com/zbkj/admin/filter/TokenComponent.java

@@ -29,7 +29,7 @@ public class TokenComponent {
 
     // 令牌有效期(默认30分钟) todo 调试期改为5小时
 //    private static final int expireTime = 30;
-    private static final int expireTime = 5 * 60;
+    private static final int expireTime = 7* 24 * 60;
 
     // Redis 存储的key
     private static final String TOKEN_REDIS = "TOKEN:ADMIN:";

+ 2 - 2
crmeb-common/src/main/java/com/zbkj/common/token/FrontTokenComponent.java

@@ -31,7 +31,7 @@ public class FrontTokenComponent {
 
     // 令牌有效期(默认30分钟) todo 调试期改为5小时
 //    private static final int expireTime = 30;
-    private static final int expireTime = 5 * 60;
+    private static final int expireTime = 7 * 24 * 60;
 
     /**
      * 删除用户身份信息
@@ -78,7 +78,7 @@ public class FrontTokenComponent {
         loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
         // 根据uuid将loginUser缓存
         String userKey = getTokenKey(loginUser.getToken());
-        redisUtil.set(userKey, loginUser, (long) 0, TimeUnit.MINUTES);
+        redisUtil.set(userKey, loginUser, (long) expireTime, TimeUnit.MINUTES);
     }
 
     /**