ExcelOrderDonData.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. package com.cyksj.model.excel;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.cyksj.model.entity.OrderDon;
  5. import com.ejlchina.searcher.bean.DbField;
  6. import com.ejlchina.searcher.bean.DbIgnore;
  7. import com.ejlchina.searcher.bean.SearchBean;
  8. import lombok.Getter;
  9. import lombok.Setter;
  10. import java.math.BigDecimal;
  11. import java.util.Date;
  12. /*
  13. *项目名: netflix
  14. *文件名: ExcelOrderDonData
  15. *创建者: JavaZou
  16. *创建时间:2022/12/29 10:25
  17. */
  18. @Getter
  19. @Setter
  20. @SearchBean(tables = "order_don o left join goods_don_sku sku on o.sku_id = sku.id " +
  21. "left join goods_don g on g.id = sku.goods_id " +
  22. "left join user u on o.user_id = u.id " +
  23. "left join groups_relation gr on gr.id = o.relation_id " +
  24. "left join channel_popularize cp on o.popularize_id = cp.id " +
  25. "left join channel c on c.id = cp.channel_id "
  26. )
  27. public class ExcelOrderDonData {
  28. @DbField("o.id")
  29. @ExcelIgnore
  30. private Long id;
  31. @DbField("c.id")
  32. @ExcelIgnore
  33. private Long channelId;
  34. @DbField("o.relation_id")
  35. @ExcelIgnore
  36. private Long relationId;
  37. @DbField("o.transaction_id")
  38. @ExcelIgnore
  39. private String transactionId;
  40. @DbField("g.type")
  41. @ExcelIgnore
  42. private Integer goodsDonType;
  43. @DbField("o.order_no")
  44. @ExcelProperty("订单号")
  45. private String orderNo;
  46. @DbField("c.name")
  47. @ExcelProperty("渠道")
  48. private String channel;
  49. @DbField("g.title")
  50. @ExcelProperty("商品")
  51. private String title;
  52. @DbIgnore
  53. @ExcelProperty("优惠券")
  54. private String couponName;
  55. @DbField("o.coupon_money")
  56. @ExcelProperty("减免金额")
  57. private BigDecimal couponMoney;
  58. @DbField("sku.spec_val")
  59. @ExcelProperty("规格")
  60. private String specVal;
  61. @DbField("o.money")
  62. @ExcelProperty("金额")
  63. private BigDecimal money;
  64. @DbField("u.id")
  65. @ExcelProperty("用户ID")
  66. private Long userId;
  67. @DbField("u.nickname")
  68. @ExcelProperty("用户名")
  69. private String nickname;
  70. @DbField("case when u.login_phone != '' then 'phone' when u.email != '' then 'email' when u.open_id != '' then 'wechat' else 'wechat' end")
  71. @ExcelIgnore
  72. private String register;
  73. @DbField("case when u.login_phone != '' then concat('手机号',login_phone) when u.email != '' then concat('邮箱',email) when u.open_id != '' then '微信授权' else '微信授权' end")
  74. @ExcelProperty("注册方式")
  75. private String registerStr;
  76. @DbField("gr.account")
  77. @ExcelProperty("账号")
  78. private String account;
  79. @DbIgnore
  80. @ExcelProperty("售前")
  81. private String beforeServiceName;
  82. @DbIgnore
  83. @ExcelProperty("售后")
  84. private String afterServiceName;
  85. @DbField("o.status")
  86. @ExcelIgnore
  87. private OrderDon.Status status;
  88. @ExcelProperty("状态")
  89. private String statusStr;
  90. @DbField("o.created_time")
  91. @ExcelProperty("创建时间")
  92. private Date createdTime;
  93. @DbField("o.type")
  94. @ExcelIgnore
  95. private OrderDon.Type type;
  96. @DbField("o.source")
  97. @ExcelIgnore
  98. private OrderDon.Source source;
  99. @ExcelProperty("支付方式")
  100. private String typeStr;
  101. @ExcelProperty("收货地址")
  102. @DbIgnore
  103. private String transportStr;
  104. @ExcelProperty("收货人")
  105. @DbIgnore
  106. private String receiver;
  107. @ExcelProperty("手机号")
  108. @DbIgnore
  109. private String phone;
  110. @ExcelProperty("物流公司")
  111. @DbIgnore
  112. private String codeCn;
  113. @ExcelProperty("物流单号")
  114. @DbIgnore
  115. private String trackingNumber;
  116. @DbField("o.order_type")
  117. @ExcelIgnore
  118. private Integer orderType;
  119. @DbField("o.num")
  120. @ExcelIgnore
  121. private Integer num;
  122. @DbField("o.coupon_user_id")
  123. @ExcelIgnore
  124. private Long couponUserId;
  125. @DbField("cp.id")
  126. @ExcelIgnore
  127. private Long popularizeId;
  128. }