ExcelManageAccountData.java 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. package com.cyksj.model.excel;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.ejlchina.searcher.bean.DbField;
  5. import com.ejlchina.searcher.bean.DbIgnore;
  6. import com.ejlchina.searcher.bean.SearchBean;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import java.util.Date;
  10. /*
  11. *项目名: netflix
  12. *文件名: ExcelManageAccountData
  13. *创建者: JavaZou
  14. *创建时间:2022/12/27 13:59
  15. */
  16. @Getter
  17. @Setter
  18. @SearchBean(tables = "account a left join goods_don g on a.goods_id = g.id " +
  19. "left join groups_trips gt on gt.account_id = a.id " +
  20. "left join groups_relation gr on gr.groups_id = gt.id " +
  21. "left join goods_don_sku gdk on gdk.id = gt.sku_id",
  22. groupBy = "a.id,g.id,a.bank_card,g.title,a.account,a.password,a.start_time,a.expiry_time,a.amount,a.cn_account,a.us_account,gt.id,a.remark,gdk.id,gdk.spec_val")
  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("a.bank_card")
  41. private String bankCard;
  42. @DbField("a.expiry_time")
  43. @ExcelIgnore
  44. private Date expiryTime;
  45. @ExcelProperty("到期时间")
  46. @DbField("date_format(a.expiry_time,'%Y/%c/%e')")
  47. private String expiryTimeExcel;
  48. @ExcelProperty("激活码")
  49. @DbIgnore
  50. private String activeCode;
  51. @ExcelProperty("密码更新状态")
  52. @DbIgnore
  53. private String passwordStatus;
  54. @ExcelProperty("激活更新状态")
  55. @DbIgnore
  56. private String activeCodeStatus;
  57. @DbField("select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self'")
  58. @ExcelIgnore
  59. private Integer expiryCount;
  60. @DbField("if((select s.account_id from (select s.account_id, count(*) num" +
  61. " from (select ur.account_id, ur.relation_id" +
  62. " from user_ticket_cleared_record ur where ur.deleted is true and source = 'self'" +
  63. " group by ur.account_id, ur.relation_id) s" +
  64. " 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)")
  65. @ExcelIgnore
  66. private Boolean expiredAll;
  67. @DbField("max(gr.expiry_time)")
  68. @ExcelIgnore
  69. private Date lastTicketTime;
  70. /**
  71. * 今日有过期人员
  72. */
  73. @DbField("min(gr.expiry_time)")
  74. @ExcelIgnore
  75. private Date firstTicketTime;
  76. }