jinlin
2024-01-31 9025b9cf7ec8610003d445a31d93e35e7bd73c2e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
 * 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;
    }
}