| | |
| | | |
| | | import cc.mrbird.febs.common.annotation.Desensitization; |
| | | import cc.mrbird.febs.common.annotation.IsMobile; |
| | | import cc.mrbird.febs.common.converter.TimeConverter; |
| | | |
| | | import cc.mrbird.febs.common.entity.DesensitizationType; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.wuwenze.poi.annotation.Excel; |
| | | import com.wuwenze.poi.annotation.ExcelField; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Email; |
| | |
| | | */ |
| | | @Data |
| | | @TableName("t_user") |
| | | @Excel("用户信息表") |
| | | public class User implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -4352868070794165001L; |
| | |
| | | */ |
| | | @TableField("USERNAME") |
| | | @Size(min = 4, max = 10, message = "{range}") |
| | | @ExcelField(value = "用户名") |
| | | @ExcelProperty(value = "用户名") |
| | | private String username; |
| | | |
| | | /** |
| | |
| | | @TableField("EMAIL") |
| | | @Size(max = 50, message = "{noMoreThan}") |
| | | @Email(message = "{email}") |
| | | @ExcelField(value = "邮箱") |
| | | @ExcelProperty(value = "邮箱") |
| | | private String email; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("MOBILE") |
| | | @IsMobile(message = "{mobile}") |
| | | @ExcelField(value = "联系电话") |
| | | @ExcelProperty(value = "联系电话") |
| | | @Desensitization(type = DesensitizationType.PHONE) |
| | | private String mobile; |
| | | |
| | |
| | | */ |
| | | @TableField("STATUS") |
| | | @NotBlank(message = "{required}") |
| | | @ExcelField(value = "状态", writeConverterExp = "0=锁定,1=有效") |
| | | @ExcelProperty(value = "状态") |
| | | private String status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("CREATE_TIME") |
| | | @ExcelField(value = "创建时间", writeConverter = TimeConverter.class) |
| | | @ExcelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField("MODIFY_TIME") |
| | | @ExcelField(value = "修改时间", writeConverter = TimeConverter.class) |
| | | @ExcelProperty(value = "修改时间") |
| | | private Date modifyTime; |
| | | |
| | | /** |
| | | * 最近访问时间 |
| | | */ |
| | | @TableField("LAST_LOGIN_TIME") |
| | | @ExcelField(value = "最近访问时间", writeConverter = TimeConverter.class) |
| | | @ExcelProperty(value = "最近访问时间") |
| | | @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒", timezone = "GMT+8") |
| | | private Date lastLoginTime; |
| | | |
| | |
| | | */ |
| | | @TableField("SSEX") |
| | | @NotBlank(message = "{required}") |
| | | @ExcelField(value = "性别", writeConverterExp = "0=男,1=女,2=保密") |
| | | @ExcelProperty(value = "性别") |
| | | private String sex; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("DESCRIPTION") |
| | | @Size(max = 100, message = "{noMoreThan}") |
| | | @ExcelField(value = "个人描述") |
| | | @ExcelProperty(value = "个人描述") |
| | | private String description; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @ExcelField(value = "部门") |
| | | @ExcelProperty(value = "部门") |
| | | @TableField(exist = false) |
| | | private String deptName; |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private String roleId; |
| | | |
| | | @ExcelField(value = "角色") |
| | | @ExcelProperty(value = "角色") |
| | | @TableField(exist = false) |
| | | private String roleName; |
| | | |