From 3bf946392dee62474eb0e7de2d3e6786883db5ce Mon Sep 17 00:00:00 2001 From: Yjoioooo <693337446@qq.com> Date: Fri, 24 Mar 2023 12:01:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=88=87=E6=8D=A2=E5=BD=B1=E5=93=8D=E5=90=8C?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E4=B8=8B=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/tenant/helper/TenantHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a436b603..0daf5d18 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 @@ -73,7 +73,7 @@ public class TenantHelper { 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; From 2406d1063da4f124241b58e9b0817818f0c3e563 Mon Sep 17 00:00:00 2001 From: Yjoioooo <693337446@qq.com> Date: Fri, 24 Mar 2023 12:02:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=E5=A2=9E=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E8=A7=92=E8=89=B2=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java index 94572fae..c2a3309a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java @@ -9,6 +9,7 @@ import com.ruoyi.system.domain.SysUser; import io.github.linpeilie.annotations.AutoMapper; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.Data; import lombok.EqualsAndHashCode; @@ -110,6 +111,7 @@ public class SysUserBo extends BaseEntity { /** * 角色组 */ + @Size(min = 1, message = "用户角色不能为空") private Long[] roleIds; /**