Selaa lähdekoodia

添加扩展值

李进 2 vuotta sitten
vanhempi
commit
441a33f8ee
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      authorize-sdk/src/main/java/com/xy/utils/AuthorizeUtils.java

+ 5 - 5
authorize-sdk/src/main/java/com/xy/utils/AuthorizeUtils.java

@@ -544,21 +544,21 @@ public class AuthorizeUtils {
      *
      * @return
      */
-    public static String getExpand() {
+    public static String getExpand(String token) {
         RedisService<String> redisService = SpringBeanUtils.getBean(RedisService.class);
-        return redisService.get("satoken:expand:" + getToken());
+        return redisService.get("satoken:expand:" + token);
     }
 
     /**
      * 扩展值续签
      */
-    public static void renewTimeoutExpand() {
-        String expand = getExpand();
+    public static void renewTimeoutExpand(String token) {
+        String expand = getExpand(token);
         if (StringUtils.isEmpty(expand)) {
             return;
         }
         RedisService<String> redisService = SpringBeanUtils.getBean(RedisService.class);
-        redisService.set("satoken:expand:" + getToken(), expand, CommConsts.TOKEN_TIMEOUT);
+        redisService.set("satoken:expand:" + token, expand, CommConsts.TOKEN_TIMEOUT);
     }
 
     @Data