SysUser.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. package com.coffee.system.entity;
  2. import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.alibaba.excel.annotation.write.style.*;
  5. import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
  6. import com.baomidou.mybatisplus.annotation.*;
  7. import com.coffee.common.annotation.ExcelDict;
  8. import com.coffee.common.config.mybatis.TenantNameHandler;
  9. import com.coffee.common.convert.ExcelDictConverter;
  10. import com.coffee.common.entity.TenantGenericEntity;
  11. import com.fasterxml.jackson.annotation.JsonFormat;
  12. import com.fasterxml.jackson.annotation.JsonIgnore;
  13. import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  14. import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
  15. import io.swagger.models.auth.In;
  16. import lombok.Data;
  17. import lombok.Getter;
  18. import org.python.antlr.ast.Str;
  19. import java.io.Serializable;
  20. import java.util.Date;
  21. import java.util.List;
  22. /**
  23. * <p>
  24. * 用户表
  25. * </p>
  26. *
  27. * @author Kevin
  28. * @since 2021-06-10
  29. */
  30. @Data
  31. @ColumnWidth(15)
  32. @HeadRowHeight(15)
  33. @ContentRowHeight(15)
  34. @HeadStyle
  35. @HeadFontStyle(fontHeightInPoints = 12)
  36. @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
  37. @ContentFontStyle(fontHeightInPoints = 10)
  38. @ExcelIgnoreUnannotated
  39. @TableName(value = "sys_user",autoResultMap = true)
  40. public class SysUser extends TenantGenericEntity<Long,Long> {
  41. private static final long serialVersionUID = 1L;
  42. //
  43. // @TableId
  44. // private Long id;
  45. /**
  46. * 账号
  47. */
  48. @ExcelProperty(value = "账号", index = 0)
  49. private String account;
  50. /**
  51. * 密码
  52. */
  53. @JsonIgnore
  54. private String password;
  55. /**
  56. * 修改密码标记 0未修改;1已修改
  57. */
  58. @JsonIgnore
  59. private String pswModified;
  60. /**
  61. * 昵称
  62. */
  63. @ExcelProperty(value = "昵称", index = 2)
  64. private String nickname;
  65. /**
  66. * 姓名
  67. */
  68. @ExcelProperty(value = "姓名", index = 4)
  69. private String realname;
  70. /**
  71. * 英文名
  72. */
  73. @ExcelProperty(value = "英文名", index = 5)
  74. private String englishName;
  75. /**
  76. * 头像
  77. */
  78. private String avatar;
  79. /**
  80. * 邮箱
  81. */
  82. @ExcelProperty(value = "邮箱", index = 6)
  83. private String email;
  84. /**
  85. * 手机号
  86. */
  87. @ExcelProperty(value = "手机号", index = 7)
  88. private String phone;
  89. /**
  90. * 工号
  91. */
  92. @ExcelProperty(value = "工号", index = 8)
  93. private String staffNumber;
  94. /**
  95. * 生日
  96. */
  97. @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
  98. @ColumnWidth(20)
  99. @ExcelProperty(value = "生日", index = 9)
  100. private Date birthday;
  101. /**
  102. * 性别 1男;2女;3未知
  103. */
  104. @ExcelProperty(value = "性别", index = 3, converter = ExcelDictConverter.class)
  105. @ExcelDict("sys_sex")
  106. private String sex;
  107. /**
  108. * 部门ID
  109. */
  110. private String deptId;
  111. /**
  112. * 排序
  113. */
  114. @ExcelProperty(value = "排序", index = 11)
  115. private Integer sort;
  116. /**
  117. * 备注
  118. */
  119. @ExcelProperty(value = "备注", index = 13)
  120. private String remarks;
  121. /**
  122. * 状态 0正常;1停用
  123. */
  124. @ExcelProperty(value = "状态", index = 12, converter = ExcelDictConverter.class)
  125. @ExcelDict("sys_status")
  126. private String status;
  127. /**
  128. * 删除标记 0存在;1删除
  129. */
  130. private String delFlag;
  131. /**
  132. * 创建人
  133. */
  134. @TableField(fill = FieldFill.INSERT)
  135. private String createBy;
  136. /**
  137. * 创建时间
  138. */
  139. @TableField(fill = FieldFill.INSERT)
  140. @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  141. private Date createTime;
  142. /**
  143. * 更新人
  144. */
  145. @TableField(fill = FieldFill.INSERT_UPDATE)
  146. private String updateBy;
  147. /**
  148. * 更新时间
  149. */
  150. @TableField(fill = FieldFill.INSERT_UPDATE)
  151. @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  152. private Date updateTime;
  153. /**
  154. * 部门名称
  155. */
  156. @TableField(exist = false)
  157. @ExcelProperty(value = "部门", index = 1)
  158. private String deptName;
  159. /**
  160. * 岗位组
  161. */
  162. @TableField(exist = false)
  163. private List<String> postIds;
  164. /**
  165. * 角色组
  166. */
  167. @TableField(exist = false)
  168. private List<String> roleIds;
  169. /**
  170. * 是否为系统级别用户
  171. * 0、否 1、是
  172. **/
  173. @TableField
  174. private Boolean isSys;
  175. @Getter
  176. @TableField(value = "tenant_id",insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER,typeHandler = TenantNameHandler.class)
  177. private String tenantName;
  178. }