UserOpen.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.bofeng.entity;
  2. import com.alibaba.excel.annotation.ExcelProperty;
  3. import com.baomidou.mybatisplus.annotations.TableField;
  4. import com.baomidou.mybatisplus.annotations.TableId;
  5. import com.baomidou.mybatisplus.annotations.TableName;
  6. import com.fasterxml.jackson.annotation.JsonIgnore;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import java.io.UnsupportedEncodingException;
  10. @Getter
  11. @Setter
  12. @TableName("sys_user_open")
  13. public class UserOpen {
  14. @TableId("open_id")
  15. private String openId;
  16. @TableField("user_id")
  17. private Long userId;
  18. @TableField("be_active")
  19. private String beActive;
  20. @ExcelProperty(value = "昵称", index = 0)
  21. @TableField("nick_name")
  22. private String nickName;
  23. private String getNicName() throws UnsupportedEncodingException {
  24. byte[] utf8Bytes = nickName.getBytes("UTF-8");
  25. String nickName = new String(utf8Bytes, "UTF-8");
  26. return nickName;
  27. }
  28. @ExcelProperty(value = "性别", index = 1)
  29. @TableField("sex_desc")
  30. private String sexDesc;
  31. @TableField("sex")
  32. private Integer sex;
  33. @ExcelProperty(value = "城市", index = 2)
  34. @TableField("city")
  35. private String city;
  36. @ExcelProperty(value = "省", index = 3)
  37. @TableField("province")
  38. private String province;
  39. @ExcelProperty(value = "国家", index = 4)
  40. @TableField("country")
  41. private String country;
  42. @TableField("head_img_url")
  43. private String headImgUrl;
  44. }