| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- package com.cyksj.model.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/12/13 2:54 PM
- */
- @Getter
- @Setter
- @SearchBean(tables = "channel_popularize cp " +
- " LEFT JOIN order_don o on cp.id = o.popularize_id :time: " +
- " LEFT JOIN order_don o1 on o.id = o1.id and o1.`status` not in ('close','noPayment')" +
- " LEFT JOIN order_don o2 on o.id = o2.id and o2.`status` = 'refund' " +
- " LEFT JOIN channel c on c.id = cp.channel_id "
- ,distinct = true
- ,groupBy = "cp.id,cp.name,cp.url,cp.modality,cp.pay_method,cp.created_time,cp.update_time"
- )
- public class ChannelPopularizeView {
- @DbField("cp.id")
- private Long id;
- /**
- * 渠道id
- */
- @DbField("cp.channel_id")
- private Long channelId;
- /**
- * 渠道名称
- */
- @DbField("c.name")
- private String channelName;
- /**
- * 链接名称
- */
- @DbField("cp.name")
- private String name;
- /**
- * url
- */
- @DbField("cp.url")
- private String url;
- /**
- * 样式
- */
- @DbField("cp.modality")
- private String modality;
- /**
- * 支付方式
- */
- @DbField("cp.pay_method")
- private String payMethod;
- @DbField("cp.is_show_sku")
- private Boolean isShowSku;
- @DbField("cp.is_show_logo")
- private Boolean isShowLogo;
- /**
- * 浏览数
- */
- @DbField("select count(v.id) from channel_popularize_visit v where v.popularize_id = cp.id ")
- private Integer visit;
- /**
- * 邮箱注册人数
- */
- @DbIgnore
- private Integer emailCount;
- /**
- * 手机注册人数
- */
- @DbIgnore
- private Integer phoneCount;
- /**
- * 网页端支付订单数
- */
- private Integer numOfOrderWebPay;
- /**
- * 订单数
- */
- @DbField("count(o1.id)")
- private Integer orderCount;
- /**
- * 订单金额
- */
- @DbField("IFNULL(sum(o1.money),0)")
- private BigDecimal orderMoney;
- /**
- * 退款订单数
- */
- @DbField("count(o2.id)")
- private Integer refundCount;
- /**
- * 退款金额
- */
- @DbField("IFNULL(sum(o2.money),0)")
- private BigDecimal refundMoney;
- @DbField("cp.created_time")
- private Date createdTime;
- @DbField("cp.update_time")
- private Date updateTime;
- }
|