User.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. package com.zanxiang.mybatis.entity;
  2. import com.baomidou.mybatisplus.annotation.IdType;
  3. import com.baomidou.mybatisplus.annotation.TableId;
  4. import com.baomidou.mybatisplus.annotation.TableName;
  5. import lombok.*;
  6. import org.apache.logging.log4j.util.Strings;
  7. import java.math.BigDecimal;
  8. import java.time.LocalDateTime;
  9. /**
  10. * @author : lingfeng
  11. * @time : 2022-06-06
  12. * @description : 玩家表
  13. */
  14. @Data
  15. @NoArgsConstructor
  16. @AllArgsConstructor
  17. @ToString
  18. @Builder
  19. @TableName("t_user")
  20. public class User {
  21. /**
  22. * id
  23. */
  24. @TableId(value = "id", type = IdType.AUTO)
  25. private Long id;
  26. /**
  27. * 所属渠道ID
  28. */
  29. private Long agentId;
  30. /**
  31. * 注册游戏id
  32. */
  33. private Long gameId;
  34. /**
  35. * 用户名
  36. */
  37. private String username;
  38. /**
  39. * 昵称
  40. */
  41. private String nickname;
  42. /**
  43. * 密码
  44. */
  45. private String password;
  46. /**
  47. * 绑定邮箱
  48. */
  49. private String email;
  50. /**
  51. * 绑定手机号码
  52. */
  53. private String mobile;
  54. /**
  55. * 绑定支付宝账号
  56. */
  57. private String aliPay;
  58. /**
  59. * 客户端类型, 1 : 安卓app
  60. */
  61. private Integer deviceType;
  62. /**
  63. * 用户状态, -1 : 为冻结状态, 0 : 为正常状态
  64. */
  65. private Integer status;
  66. /**
  67. * 头像
  68. */
  69. private String avatar;
  70. /**
  71. * 充值次数
  72. */
  73. private Integer rechargeCount;
  74. /**
  75. * 充值金额
  76. */
  77. private BigDecimal rechargeMoney;
  78. /**
  79. * 最近充值时间
  80. */
  81. private LocalDateTime lastRechargeTime;
  82. /**
  83. * 平台币余额
  84. */
  85. private BigDecimal platformCoin;
  86. /**
  87. * 创角数
  88. */
  89. private Integer roleCount;
  90. /**
  91. * 是否GS
  92. */
  93. private Boolean isGs;
  94. /**
  95. * 客服id
  96. */
  97. private Long customerId;
  98. /**
  99. * 拥有角色最高vip等级
  100. */
  101. private Integer vipMax;
  102. /**
  103. * 是否实名认证,0未实名认证,1成年人,2未成年人
  104. */
  105. private Integer authentication;
  106. /**
  107. * 注册时间
  108. */
  109. private LocalDateTime createTime;
  110. /**
  111. * 更改时间
  112. */
  113. private LocalDateTime updateTime;
  114. /**
  115. * 客户端操作系统, android, ios, windows, mac
  116. */
  117. private String deviceSystem;
  118. /**
  119. * 用户设备mac地址
  120. */
  121. private String mac;
  122. /**
  123. * 设备唯一编号IMEI
  124. */
  125. private String imei;
  126. /**
  127. * 安卓id, (仅安卓设备才有值)
  128. */
  129. private String androidId;
  130. /**
  131. * 用户注册ip
  132. */
  133. private String ip;
  134. /**
  135. * 归因广告id
  136. */
  137. private String adId;
  138. /**
  139. * 获取用户显示手机号
  140. *
  141. * @return : 用户显示手机号
  142. */
  143. public String getShowPhoneNum() {
  144. if (Strings.isBlank(this.mobile)) {
  145. return null;
  146. }
  147. return this.mobile.substring(0, 3) + "****" + this.mobile.substring(mobile.length() - 4);
  148. }
  149. }