解决 token与token-session 过期时间不一致问题

This commit is contained in:
数据小王子 2024-02-27 10:48:08 +08:00
parent 8027f5c2d8
commit 3f829e271d

View File

@ -58,7 +58,9 @@ public class LoginHelper {
model.setExtra(TENANT_KEY, loginUser.getTenantId()) model.setExtra(TENANT_KEY, loginUser.getTenantId())
.setExtra(USER_KEY, loginUser.getUserId()) .setExtra(USER_KEY, loginUser.getUserId())
.setExtra(DEPT_KEY, loginUser.getDeptId())); .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);
} }
/** /**