|  |  | 
 |  |  | package com.ruoyi.common.core.domain.entity; | 
 |  |  |  | 
 |  |  | import java.util.ArrayList; | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  | import javax.validation.constraints.*; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  | import org.apache.commons.lang3.builder.ToStringBuilder; | 
 |  |  | import org.apache.commons.lang3.builder.ToStringStyle; | 
 |  |  | import com.ruoyi.common.annotation.Excel; | 
 |  |  | import com.ruoyi.common.annotation.Excel.ColumnType; | 
 |  |  | import com.ruoyi.common.annotation.Excel.Type; | 
 |  |  | import com.ruoyi.common.annotation.Excels; | 
 |  |  | import com.ruoyi.common.core.domain.BaseEntity; | 
 |  |  | import com.ruoyi.common.xss.Xss; | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  | import org.apache.commons.lang3.builder.ToStringBuilder; | 
 |  |  | import org.apache.commons.lang3.builder.ToStringStyle; | 
 |  |  | import org.springframework.stereotype.Component; | 
 |  |  |  | 
 |  |  | import javax.validation.constraints.Email; | 
 |  |  | import javax.validation.constraints.NotBlank; | 
 |  |  | import javax.validation.constraints.Size; | 
 |  |  | import java.util.ArrayList; | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 用户对象 sys_user | 
 |  |  | 
 |  |  |  * @author ruoyi | 
 |  |  |  */ | 
 |  |  | @Data | 
 |  |  | @Component | 
 |  |  | @ApiModel(value = "SysUser", description = "用户对象") | 
 |  |  | public class SysUser extends BaseEntity { | 
 |  |  |     private static final long serialVersionUID = 1L; | 
 |  |  | // | 
 |  |  | //    @Value("${isAdmin}") | 
 |  |  | //    private List<Long> isAdmin; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 用户ID | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "his用户ID") | 
 |  |  |     private String hisUserId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * his用户ID | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "his用户ID") | 
 |  |  |     private String userCode; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 部门ID | 
 |  |  | 
 |  |  |     @ApiModelProperty(value = "职位") | 
 |  |  |     @Excel(name = "职位") | 
 |  |  |     private String title; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 部门编码 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "部门编码") | 
 |  |  |     @Excel(name = "部门编码") | 
 |  |  |     private String deptCode; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 部门名称 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "部门名称") | 
 |  |  |     @Excel(name = "部门名称") | 
 |  |  |     private String deptName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 用户邮箱 | 
 |  |  | 
 |  |  |         this.userId = userId; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public boolean isAdmin() { | 
 |  |  |         return isAdmin(this.userId); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static boolean isAdmin(Long userId) { | 
 |  |  |         return userId != null && 1L == userId; | 
 |  |  |     } | 
 |  |  | //    public boolean isAdmin() { | 
 |  |  | //        return isAdmin(this.userId); | 
 |  |  | //    } | 
 |  |  | // | 
 |  |  | //    public boolean isAdmin(Long userId) { | 
 |  |  | //        return isAdmin.contains(userId); | 
 |  |  | //    } | 
 |  |  |  | 
 |  |  |     public Long getDeptId() { | 
 |  |  |         return this.deptId; |