From e0d921b1ac42b1d20b4fc31c844e685886a7b9a3 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 28 三月 2023 15:10:22 +0800
Subject: [PATCH] update 优化 docker 镜像使用 graalvm 全量包

---
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java |    6 +++---
 1 files changed, 3 insertions(+), 3 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 a436b60..7f762aa 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 @@
             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);
     }
@@ -73,7 +73,7 @@
         if (!SpringMVCUtil.isWeb()) {
             return TEMP_DYNAMIC_TENANT.get();
         }
-        String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId();
+        String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId();
         String tenantId = (String) SaHolder.getStorage().get(cacheKey);
         if (StringUtils.isNotBlank(tenantId)) {
             return tenantId;
@@ -91,7 +91,7 @@
             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);
     }

--
Gitblit v1.9.3