Browse Source

fix 修复 临时解决 token与token-session 过期时间不一致问题(等satoken处理)

Signed-off-by: 疯狂的狮子Li <15040126243@163.com>
疯狂的狮子Li 8 months ago
parent
commit
8e091d712f

+ 3 - 1
ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java

@@ -57,7 +57,9 @@ public class LoginHelper {
             model.setExtra(TENANT_KEY, loginUser.getTenantId())
                 .setExtra(USER_KEY, loginUser.getUserId())
                 .setExtra(DEPT_KEY, loginUser.getDeptId()));
-        StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser);
+        SaSession tokenSession = StpUtil.getTokenSession();
+        tokenSession.updateTimeout(model.getTimeout());
+        tokenSession.set(LOGIN_USER_KEY, loginUser);
     }
 
     /**