| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | 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.Excels; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 用户对象 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 |
| | |
| | | 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; |