chenrui
4 天以前 6e7c712456a8cf5693321edd2f3482aaf61d08b0
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;
/**
@@ -24,7 +24,7 @@
    /**
     * 部门ID
     */
    private Long deptId;
    private Long [] deptIds;
    /**
     * 用户唯一标识
@@ -71,35 +71,15 @@
     */
    private SysUser user;
    public Long getUserId()
    {
        return userId;
    }
    /**
     * 租户ID
     */
    private Integer tenantId;
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }
    public Long getDeptId()
    {
        return deptId;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }
    public String getToken()
    {
        return token;
    }
    public void setToken(String token)
    {
        this.token = token;
    }
    /**
     * 当前部门id
     */
    private Long currentDeptId;
    public LoginUser()
    {
@@ -111,12 +91,61 @@
        this.permissions = permissions;
    }
    public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions)
    public LoginUser(Long userId, Long [] deptId, SysUser user, Set<String> permissions)
    {
        this.userId = userId;
        this.deptId = deptId;
        this.deptIds = deptId;
        this.user = user;
        this.permissions = permissions;
    }
    public LoginUser(Long userId, Long [] deptIds, SysUser user,Integer tenantId, Set<String> permissions)
    {
        this.userId = userId;
        this.deptIds = deptIds;
        this.user = user;
        this.permissions = permissions;
        this.tenantId = tenantId;
    }
    public LoginUser(Long userId, Long [] deptIds, SysUser user,Integer tenantId,Long currentDeptId, Set<String> permissions)
    {
        this.userId = userId;
        this.deptIds = deptIds;
        this.user = user;
        this.permissions = permissions;
        this.tenantId = tenantId;
        this.currentDeptId = currentDeptId;
    }
    public Long getUserId()
    {
        return userId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }
    public Long [] getDeptIds()
    {
        return deptIds;
    }
    public void setDeptId(Long [] deptIds)
    {
        this.deptIds = deptIds;
    }
    public String getToken()
    {
        return token;
    }
    public void setToken(String token)
    {
        this.token = token;
    }
    @JSONField(serialize = false)
@@ -263,4 +292,24 @@
    {
        return null;
    }
    public Integer getTenantId() {
        return tenantId;
    }
    public void setTenantId(Integer tenantId) {
        this.tenantId = tenantId;
    }
    public void setDeptIds(Long[] deptIds) {
        this.deptIds = deptIds;
    }
    public Long getCurrentDeptId() {
        return currentDeptId;
    }
    public void setCurrentDeptId(Long currentDeptId) {
        this.currentDeptId = currentDeptId;
    }
}