AccountView.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package com.cyksj.model.manage.views;
  2. import com.ejlchina.searcher.bean.DbField;
  3. import com.ejlchina.searcher.bean.DbIgnore;
  4. import com.ejlchina.searcher.bean.SearchBean;
  5. import lombok.Getter;
  6. import lombok.Setter;
  7. import java.math.BigDecimal;
  8. import java.util.Date;
  9. /**
  10. * @author chan
  11. * @date 2022/10/12 12:02 PM
  12. */
  13. @Getter
  14. @Setter
  15. @SearchBean(tables = "account a left join goods_don g on a.goods_id = g.id " +
  16. "left join groups_trips gt on gt.account_id = a.id " +
  17. "left join groups_relation gr on gr.groups_id = gt.id " +
  18. "left join goods_don_sku gdk on gdk.id = gt.sku_id",
  19. groupBy = "a.id,g.id,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.spec_val")
  20. public class AccountView {
  21. @DbField("a.id")
  22. private Long id;
  23. @DbField("g.id")
  24. private Long goodsId;
  25. @DbField("g.title")
  26. private String title;
  27. @DbField("a.account")
  28. private String account;
  29. @DbField("a.password")
  30. private String password;
  31. @DbField("a.start_time")
  32. private Date startTime;
  33. @DbField("a.expiry_time")
  34. private Date expiryTime;
  35. @DbField("a.amount")
  36. private BigDecimal amount;
  37. /**
  38. * 国区id
  39. */
  40. @DbField("a.cn_account")
  41. private String cnAccount;
  42. /**
  43. * 美区id
  44. */
  45. @DbField("a.us_account")
  46. private String usAccount;
  47. @DbIgnore
  48. private Integer invited;
  49. @DbIgnore
  50. private Integer unInvited;
  51. @DbIgnore
  52. private Integer total;
  53. @DbField("gt.id")
  54. private Long groupsId;
  55. /**
  56. * 账号备注
  57. */
  58. @DbField("a.remark")
  59. private String remark;
  60. /**
  61. * 规格
  62. */
  63. @DbField("gdk.spec_val")
  64. private String specVal;
  65. @DbField("select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true")
  66. private Integer expiryCount;
  67. @DbField("max(gr.expiry_time)")
  68. private Date lastTicketTime;
  69. }