From 0ddea65ff88b3b750ff14d9deb51fa0cda8e52a1 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期三, 07 五月 2025 15:31:19 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/ruoyi/framework/security/LoginUser.java | 60 +++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/ruoyi/framework/security/LoginUser.java b/src/main/java/com/ruoyi/framework/security/LoginUser.java index 46661c5..53459bc 100644 --- a/src/main/java/com/ruoyi/framework/security/LoginUser.java +++ b/src/main/java/com/ruoyi/framework/security/LoginUser.java @@ -4,7 +4,7 @@ import java.util.Set; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; -import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson2.annotation.JSONField; import com.ruoyi.project.system.domain.SysUser; /** @@ -71,6 +71,38 @@ */ private SysUser user; + /** + * 绉熸埛ID + */ + private Integer tenantId; + + public LoginUser() + { + } + + public LoginUser(SysUser user, Set<String> permissions) + { + this.user = user; + this.permissions = permissions; + } + + public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions) + { + this.userId = userId; + this.deptId = deptId; + this.user = user; + this.permissions = permissions; + } + + public LoginUser(Long userId, Long deptId, SysUser user,Integer tenantId, Set<String> permissions) + { + this.userId = userId; + this.deptId = deptId; + this.user = user; + this.permissions = permissions; + this.tenantId = tenantId; + } + public Long getUserId() { return userId; @@ -99,24 +131,6 @@ public void setToken(String token) { this.token = token; - } - - public LoginUser() - { - } - - public LoginUser(SysUser user, Set<String> permissions) - { - this.user = user; - this.permissions = permissions; - } - - public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions) - { - this.userId = userId; - this.deptId = deptId; - this.user = user; - this.permissions = permissions; } @JSONField(serialize = false) @@ -263,4 +277,12 @@ { return null; } + + public Integer getTenantId() { + return tenantId; + } + + public void setTenantId(Integer tenantId) { + this.tenantId = tenantId; + } } -- Gitblit v1.9.3