From 3f829e271d150dacf4a9118a4bd978454b5895c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B0=8F=E7=8E=8B=E5=AD=90?= Date: Tue, 27 Feb 2024 10:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20token=E4=B8=8Etoken-sessio?= =?UTF-8?q?n=20=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/security/utils/LoginHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/LoginHelper.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/LoginHelper.java index 4f63c75..429a71e 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/LoginHelper.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/LoginHelper.java @@ -58,7 +58,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); } /**