| /** | 
|  * Copyright (c) 2018 人人开源 All rights reserved. | 
|  * | 
|  * https://www.renren.io | 
|  * | 
|  * 版权所有,侵权必究! | 
|  */ | 
|   | 
| package com.zt.core.context; | 
|   | 
| import com.baomidou.mybatisplus.annotation.TableField; | 
| import com.fasterxml.jackson.annotation.JsonIgnore; | 
| import com.fasterxml.jackson.annotation.JsonProperty; | 
| import io.swagger.annotations.ApiModel; | 
| import io.swagger.annotations.ApiModelProperty; | 
| import lombok.Data; | 
|   | 
| import java.io.Serializable; | 
| import java.util.List; | 
| import java.util.Set; | 
|   | 
| /** | 
|  * 登录用户信息 | 
|  * | 
|  * @author hehz | 
|  */ | 
| @Data | 
| @ApiModel(value = "当前用户") | 
| public class User implements Serializable { | 
|     private static final long serialVersionUID = 1L; | 
|   | 
|     private Long id; | 
|     private String username; | 
|     private String realName; | 
|     private Integer secretClass; | 
|     private String headUrl; | 
|     private Integer gender; | 
|     private String email; | 
|     private String mobile; | 
|     private Long deptId; | 
|     private Long companyId; | 
|     private Long tenantId; | 
|     @JsonIgnore | 
|     private String password; | 
|     private Integer status; | 
|   | 
|     @ApiModelProperty(value = "是否为平台用户") | 
|     @JsonProperty("isPlatform") | 
|     private boolean isPlatform; | 
|   | 
|     @ApiModelProperty(value = "是否为超级管理员") | 
|     @JsonProperty("isSuperAdmin") | 
|     private boolean isSuperAdmin; | 
|   | 
|     @ApiModelProperty(value = "公司類型") | 
|     @JsonProperty("unitType") | 
|     @TableField(exist = false) | 
|     private String unitType; | 
|   | 
|     @ApiModelProperty(value = "公司編碼") | 
|     @JsonProperty("unitCode") | 
|     @TableField(exist = false) | 
|     private String unitCode; | 
|   | 
|     @ApiModelProperty(value = "所属专业") | 
|     @JsonProperty("groupIds") | 
|     @TableField(exist = false) | 
|     private String groupIds; | 
|   | 
|     @ApiModelProperty(value = "区域") | 
|     @JsonProperty("area") | 
|     @TableField(exist = false) | 
|     private String area; | 
|   | 
|     @ApiModelProperty(value = "区域") | 
|     @JsonProperty("systemMarker") | 
|     @TableField(exist = false) | 
|     private String systemMarker; | 
|   | 
|     @ApiModelProperty(value = "用户权限") | 
|     private Set<String> permissions; | 
|   | 
|     private String userNameInit; | 
|   | 
|     @TableField(exist = false) | 
|     private String roleName; | 
|   | 
|     @TableField(exist = false) | 
|     private String deptName; | 
|   | 
|     @JsonIgnore | 
|     private List<Long> roleIdList; | 
|   | 
|     @JsonIgnore | 
|     public boolean isPlatform() { | 
|         return isPlatform; | 
|     } | 
|   | 
|     @JsonIgnore | 
|     public boolean isSuperAdmin() { | 
|         return isSuperAdmin; | 
|     } | 
| } |