PersonDistributeBrokenLineView.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.cyksj.model.views;
  2. import com.ejlchina.searcher.bean.DbField;
  3. import com.ejlchina.searcher.bean.SearchBean;
  4. import lombok.Getter;
  5. import lombok.Setter;
  6. import java.math.BigDecimal;
  7. /*
  8. *项目名: netflix
  9. *文件名: PersonDistributeBrokenLineView
  10. *创建者: JavaZou
  11. *创建时间:2023/3/8 14:40
  12. */
  13. @Getter
  14. @Setter
  15. @SearchBean(tables = "distribute_waiting_send_points dw left join order_don od on od.id = dw.order_id and dw.is_vip = false" +
  16. " left join vip_order_don vod on vod.id = dw.order_id and dw.is_vip = true" +
  17. " left join goods_don g on g.id = ifnull(od.goods_id,vod.goods_id)"
  18. , where = ":userId: and dw.send_status not in ('not_exist','close')"
  19. , groupBy = "g.id,g.title,ifnull(od.goods_id,vod.goods_id),date_format(ifnull(od.created_time,vod.created_time),'%Y-%m-%d')")
  20. public class PersonDistributeBrokenLineView {
  21. @DbField("g.id")
  22. private Long goodsId;
  23. /**
  24. * 平台名称
  25. */
  26. @DbField("g.title")
  27. private String goodsTitle;
  28. /**
  29. * 当前日期订单数
  30. */
  31. @DbField("count(dw.order_id)")
  32. private Integer orderNum;
  33. /**
  34. * 当前日期订单金额
  35. */
  36. @DbField("cast(sum(if(od.id is null,vod.money,if(od.is_dp and od.ori_money != 0,od.ori_money,od.money))/100) as decimal(10,2))")
  37. private BigDecimal money;
  38. /**
  39. * 日期
  40. */
  41. @DbField("date_format(ifnull(od.created_time,vod.created_time),'%Y-%m-%d')")
  42. private String date;
  43. }