ExcelManageAccountData.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. @ExcelIgnore
  28. @DbField("g.id")
  29. private Long goodsId;
  30. @ExcelProperty("平台")
  31. @DbField("g.title")
  32. private String title;
  33. @ExcelIgnore
  34. @DbField("gdk.id")
  35. private Long skuId;
  36. @ExcelProperty("规格")
  37. @DbField("gdk.spec_val")
  38. private String specVal;
  39. @ExcelProperty("账号")
  40. @DbField("a.account")
  41. private String account;
  42. @ExcelProperty("密码")
  43. @DbField("a.password")
  44. private String password;
  45. @ExcelProperty("邮箱密码")
  46. @DbField("select password from sys_email where email = a.account limit 1")
  47. private String emailPassword;
  48. @ExcelProperty("APIkey")
  49. @DbField("a.api_key")
  50. private String apiKey;
  51. @ExcelProperty("校验码")
  52. @DbField("a.verify_codes")
  53. private String verifyCodes;
  54. @ExcelProperty("银行卡号")
  55. @DbField("a.bank_card")
  56. private String bankCard;
  57. @DbField("a.expiry_time")
  58. @ExcelIgnore
  59. private Date expiryTime;
  60. @ExcelProperty("创建时间")
  61. @DbField("a.created_time")
  62. private Date createdTime;
  63. @ExcelProperty("首开时间")
  64. @DbField("date_format(a.start_time,'%Y/%c/%e')")
  65. private String startTimeExcel;
  66. @ExcelProperty("到期时间")
  67. @DbField("date_format(a.expiry_time,'%Y/%c/%e')")
  68. private String expiryTimeExcel;
  69. @ExcelProperty("激活码")
  70. @DbIgnore
  71. private String activeCode;
  72. @ExcelProperty("密码更新状态")
  73. @DbIgnore
  74. private String passwordStatus;
  75. @DbField("gt.status")
  76. @ExcelIgnore
  77. private GroupsTrips.Status gtStatus;
  78. /**
  79. * 车位数量
  80. */
  81. @DbField("gt.num")
  82. @ExcelIgnore
  83. private Integer num;
  84. /**
  85. * 可用车位数
  86. */
  87. @DbField("gt.available_num")
  88. @ExcelIgnore
  89. private Integer availableNum;
  90. @ExcelProperty("激活更新状态")
  91. @DbIgnore
  92. private String activeCodeStatus;
  93. /**
  94. * 是否外部采购
  95. */
  96. @DbField("a.outside_purchase")
  97. @ExcelIgnore
  98. private Boolean outsidePurchase;
  99. /**
  100. * 是否外部采购
  101. */
  102. @DbField("if(a.outside_purchase,'是','否')")
  103. @ExcelProperty("外部采购")
  104. private String outsidePurchaseStr;
  105. @DbField("a.verify_link")
  106. @ExcelProperty("同户更新装置")
  107. private String verifyLink;
  108. //@DbField("select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self'")
  109. @ExcelIgnore
  110. @DbIgnore
  111. private Integer expiryCount;
  112. // @DbField("if((select s.account_id from (select s.account_id, count(*) num" +
  113. // " from (select ur.account_id, ur.relation_id" +
  114. // " from user_ticket_cleared_record ur where ur.deleted is true and source = 'self'" +
  115. // " group by ur.account_id, ur.relation_id) s" +
  116. // " 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)")
  117. @DbIgnore
  118. @ExcelIgnore
  119. private Boolean expiredAll;
  120. /**
  121. * 账号类型 2 备用
  122. */
  123. @DbField("a.type")
  124. @ExcelIgnore
  125. private Integer accountType;
  126. @DbField("a.email")
  127. @ExcelProperty("辅助邮箱")
  128. private String email;
  129. @DbField("a.relate_email")
  130. @ExcelProperty("关联邮箱")
  131. private String relateEmail;
  132. @DbField("a.remark")
  133. @ExcelProperty("备注")
  134. private String remark;
  135. }