| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- package com.cyksj.model.manage.views;
- import com.ejlchina.searcher.bean.DbField;
- import com.ejlchina.searcher.bean.DbIgnore;
- import com.ejlchina.searcher.bean.SearchBean;
- import lombok.Getter;
- import lombok.Setter;
- import java.math.BigDecimal;
- import java.util.Date;
- /**
- * @author chan
- * @date 2022/10/12 12:02 PM
- */
- @Getter
- @Setter
- @SearchBean(tables = "account a left join goods_don g on a.goods_id = g.id " +
- "left join groups_trips gt on gt.account_id = a.id " +
- "left join groups_relation gr on gr.groups_id = gt.id " +
- "left join goods_don_sku gdk on gdk.id = gt.sku_id",
- 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")
- public class AccountView {
- @DbField("a.id")
- private Long id;
- @DbField("g.id")
- private Long goodsId;
- @DbField("g.title")
- private String title;
- @DbField("a.bank_card")
- private String bankCard;
- @DbField("a.account")
- private String account;
- @DbField("a.password")
- private String password;
- @DbField("a.start_time")
- private Date startTime;
- @DbField("a.expiry_time")
- private Date expiryTime;
- @DbField("a.amount")
- private BigDecimal amount;
- /**
- * 国区id
- */
- @DbField("a.cn_account")
- private String cnAccount;
- /**
- * 美区id
- */
- @DbField("a.us_account")
- private String usAccount;
- @DbIgnore
- private Integer invited;
- @DbIgnore
- private Integer unInvited;
- @DbIgnore
- private Integer total;
- @DbField("gt.id")
- private Long groupsId;
- /**
- * 账号备注
- */
- @DbField("a.remark")
- private String remark;
- /**
- * 规格
- */
- @DbField("gdk.spec_val")
- private String specVal;
- @DbField("select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true")
- private Integer expiryCount;
- @DbField("if((select s.account_id from (select s.account_id, count(*) num" +
- " from (select ur.account_id, ur.relation_id" +
- " from user_ticket_cleared_record ur where ur.deleted is true" +
- " group by ur.account_id, ur.relation_id) s" +
- " 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)")
- private Boolean expiredAll;
- @DbField("max(gr.expiry_time)")
- private Date lastTicketTime;
- }
|