From 08ba802e122b93bbad235b78669bd8cac0e1d1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 26 Jun 2023 12:27:42 +0800 Subject: [PATCH] =?UTF-8?q?reset=20=E5=9B=9E=E6=BB=9A=20satoken=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20loginType=20=E5=88=86=E7=A6=BB=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=94=A8=E6=88=B7=20=E5=AD=98=E5=9C=A8=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/common/satoken/utils/LoginHelper.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java index 99bd6b58..929d124b 100644 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java +++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java @@ -68,8 +68,7 @@ public class LoginHelper { // } else if (userType == UserType.APP_USER) { // model.setTimeout(86400).setActiveTimeout(1800); // } - StpUtil.stpLogic.setLoginType(loginUser.getUserType()) - .login(loginUser.getLoginId(), + StpUtil.login(loginUser.getLoginId(), model.setExtra(TENANT_KEY, loginUser.getTenantId()) .setExtra(USER_KEY, loginUser.getUserId())); StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser); @@ -155,7 +154,7 @@ public class LoginHelper { * 获取用户类型 */ public static UserType getUserType() { - String loginType = StpUtil.stpLogic.getLoginType(); + String loginType = StpUtil.getLoginIdAsString(); return UserType.getUserType(loginType); }