From 520cbec1b392442a6ee661dfad4178c2ceaf3e65 Mon Sep 17 00:00:00 2001 From: Yjoioooo <693337446@qq.com> Date: Fri, 24 Mar 2023 14:50:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=81=97=E6=BC=8F=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/tenant/helper/TenantHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java index 0daf5d18..7f762aa5 100644 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java +++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java @@ -59,7 +59,7 @@ public class TenantHelper { TEMP_DYNAMIC_TENANT.set(tenantId); return; } - String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId(); + String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); RedisUtils.setCacheObject(cacheKey, tenantId); SaHolder.getStorage().set(cacheKey, tenantId); } @@ -91,7 +91,7 @@ public class TenantHelper { TEMP_DYNAMIC_TENANT.remove(); return; } - String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId(); + String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); RedisUtils.deleteObject(cacheKey); SaHolder.getStorage().delete(cacheKey); }