ExcelManageAccountData.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. package com.cyksj.model.excel;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.cyksj.model.entity.GroupsTrips;
  5. import com.ejlchina.searcher.bean.DbField;
  6. import com.ejlchina.searcher.bean.DbIgnore;
  7. import com.ejlchina.searcher.bean.SearchBean;
  8. import lombok.Getter;
  9. import lombok.Setter;
  10. import java.util.Date;
  11. /*
  12. *项目名: netflix
  13. *文件名: ExcelManageAccountData
  14. *创建者: JavaZou
  15. *创建时间:2022/12/27 13:59
  16. */
  17. @Getter
  18. @Setter
  19. @SearchBean(tables = "account a left join goods_don g on a.goods_id = g.id " +
  20. "left join groups_trips gt on gt.account_id = a.id " +
  21. "left join goods_don_sku gdk on gdk.id = gt.sku_id",
  22. where = ":extra_sql:")
  23. public class ExcelManageAccountData {
  24. @ExcelIgnore
  25. @DbField("a.id")
  26. private Long id;
  27. @ExcelProperty("平台")
  28. @DbField("g.title")
  29. private String title;
  30. @ExcelProperty("规格")
  31. @DbField("gdk.spec_val")
  32. private String specVal;
  33. @ExcelProperty("账号")
  34. @DbField("a.account")
  35. private String account;
  36. @ExcelProperty("密码")
  37. @DbField("a.password")
  38. private String password;
  39. @ExcelProperty("邮箱密码")
  40. @DbField("select password from sys_email where email = a.account limit 1")
  41. private String emailPassword;
  42. @ExcelProperty("APIkey")
  43. @DbField("a.api_key")
  44. private String apiKey;
  45. @ExcelProperty("校验码")
  46. @DbField("a.verify_codes")
  47. private String verifyCodes;
  48. @ExcelProperty("银行卡号")
  49. @DbField("a.bank_card")
  50. private String bankCard;
  51. @DbField("a.expiry_time")
  52. @ExcelIgnore
  53. private Date expiryTime;
  54. @ExcelProperty("创建时间")
  55. @DbField("a.created_time")
  56. private Date createdTime;
  57. @ExcelProperty("首开时间")
  58. @DbField("date_format(a.start_time,'%Y/%c/%e')")
  59. private String startTimeExcel;
  60. @ExcelProperty("到期时间")
  61. @DbField("date_format(a.expiry_time,'%Y/%c/%e')")
  62. private String expiryTimeExcel;
  63. @ExcelProperty("激活码")
  64. @DbIgnore
  65. private String activeCode;
  66. @ExcelProperty("密码更新状态")
  67. @DbIgnore
  68. private String passwordStatus;
  69. @DbField("gt.status")
  70. @ExcelIgnore
  71. private GroupsTrips.Status gtStatus;
  72. @ExcelProperty("激活更新状态")
  73. @DbIgnore
  74. private String activeCodeStatus;
  75. /**
  76. * 是否外部采购
  77. */
  78. @DbField("a.outside_purchase")
  79. @ExcelIgnore
  80. private Boolean outsidePurchase;
  81. /**
  82. * 是否外部采购
  83. */
  84. @DbField("if(a.outside_purchase,'是','否')")
  85. @ExcelProperty("外部采购")
  86. private String outsidePurchaseStr;
  87. @DbField("a.verify_link")
  88. @ExcelProperty("同户更新装置")
  89. private String verifyLink;
  90. //@DbField("select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self'")
  91. @ExcelIgnore
  92. @DbIgnore
  93. private Integer expiryCount;
  94. // @DbField("if((select s.account_id from (select s.account_id, count(*) num" +
  95. // " from (select ur.account_id, ur.relation_id" +
  96. // " from user_ticket_cleared_record ur where ur.deleted is true and source = 'self'" +
  97. // " group by ur.account_id, ur.relation_id) s" +
  98. // " group by s.account_id) s left join groups_trips gt on gt.account_id = s.account_id where s.account_id = a.id and s.num >= gt.num)is null,false,true)")
  99. @DbIgnore
  100. @ExcelIgnore
  101. private Boolean expiredAll;
  102. /**
  103. * 账号类型 2 备用
  104. */
  105. @DbField("a.type")
  106. @ExcelIgnore
  107. private Integer accountType;
  108. @DbField("a.email")
  109. @ExcelProperty("辅助邮箱")
  110. private String email;
  111. @DbField("a.relate_email")
  112. @ExcelProperty("关联邮箱")
  113. private String relateEmail;
  114. }