feige
2024-11-05 72f21494ba48e573e68007eab2296f8c25ecc4b7
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
@@ -3,6 +3,8 @@
import java.util.Date;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -71,10 +73,10 @@
    private Date loginDate;
    /** 部门对象 */
    @Excels({
        @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
        @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
    })
//    @Excels({
//        @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
//        @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
//    })
    private SysDept dept;
    /** 角色对象 */
@@ -88,6 +90,17 @@
    /** 角色ID */
    private Long roleId;
    public Integer getClanId() {
        return clanId;
    }
    private Integer clanId;
    public void setClanId(Integer clanId) {
        this.clanId = clanId;
    }
    public SysUser()
    {
@@ -117,6 +130,7 @@
    public static boolean isAdmin(Long userId)
    {
        //1号用户就是管理员
        //这里需要修改成管理员,查询数据库
        return userId != null && 1L == userId;
    }
@@ -302,7 +316,9 @@
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("deptId", getDeptId())
                .append("clanId", getClanId())
                .append("deptId", getDeptId())
            .append("userName", getUserName())
            .append("nickName", getNickName())
            .append("email", getEmail())