OrderDon.java 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. package com.cyksj.model.entity;
  2. import com.baomidou.mybatisplus.annotation.FieldStrategy;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.ejlchina.searcher.bean.DbIgnore;
  5. import com.fasterxml.jackson.annotation.JsonIgnore;
  6. import lombok.AllArgsConstructor;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import java.io.Serializable;
  10. import java.math.BigDecimal;
  11. import java.util.Arrays;
  12. import java.util.Date;
  13. import java.util.List;
  14. /**
  15. * @author chan
  16. * @date 2021/10/11 下午4:04
  17. */
  18. @Getter
  19. @Setter
  20. public class OrderDon extends BaseEntity implements Serializable {
  21. /**
  22. * 座位id
  23. */
  24. private Long relationId;
  25. /**
  26. * 商品id
  27. */
  28. private Long skuId;
  29. /** 订单号 */
  30. private String orderNo ;
  31. private Long goodsId;
  32. /**
  33. * 微信订单号
  34. */
  35. private String transactionId;
  36. /** 用户id */
  37. private Long userId ;
  38. /**
  39. * openId
  40. */
  41. private String openId;
  42. /** 金额 */
  43. private BigDecimal money ;
  44. /**
  45. * 海外支付金额
  46. */
  47. private BigDecimal abroadMoney;
  48. /**
  49. * 手续费
  50. */
  51. private BigDecimal abroadTransactionFee;
  52. /**
  53. * 退款金额
  54. */
  55. private BigDecimal refundMoney;
  56. /**
  57. * 退款余额
  58. */
  59. private BigDecimal refundBalance;
  60. /**
  61. * 礼品卡现金支付金额
  62. */
  63. private BigDecimal gcCash;
  64. /**
  65. * 退款原因
  66. */
  67. private String refundDesc;
  68. /**
  69. * 优惠金额
  70. */
  71. private BigDecimal realMoney;
  72. /**
  73. * 优惠金额
  74. */
  75. private BigDecimal couponMoney;
  76. /**
  77. * 优惠券用户领取id
  78. */
  79. private Long couponUserId;
  80. /**
  81. * 购买数量
  82. */
  83. private Integer num;
  84. /** 支付状态 */
  85. private Status status ;
  86. /**
  87. * 支付类型
  88. */
  89. private Type type;
  90. /**
  91. * 推广者设置的优惠码
  92. */
  93. private String couponExCode;
  94. /**
  95. * 订单类型 1普通订单、2续费订单
  96. * 默认值为1
  97. */
  98. private Integer orderType;
  99. /**
  100. * 订单来源
  101. */
  102. private Source source;
  103. /**
  104. * 订单标注来源
  105. * 用于客服标注订单来源
  106. */
  107. @TableField(updateStrategy = FieldStrategy.IGNORED)
  108. private String labelSource;
  109. /**
  110. * 实物电视机类型 1、其他,2索尼 3三星 4东芝 5LG 6海信 7小米
  111. */
  112. private Integer tvType;
  113. /**
  114. * 支付时间
  115. */
  116. private Date payTime;
  117. /**
  118. * 是否是分销订单
  119. */
  120. private Boolean isDistribute;
  121. /**
  122. * 是否是固定推广者分销
  123. */
  124. private Boolean isFixedDistribute;
  125. /**
  126. * 商户id
  127. */
  128. private String shopId;
  129. /**
  130. * 渠道链接id
  131. */
  132. private Long popularizeId;
  133. /**
  134. * 是否是推广未登录用户购买订单
  135. */
  136. private Boolean isNoLogin;
  137. /**
  138. * 是否是网页端支付 默认0移动端支付
  139. */
  140. private Boolean isWebPay;
  141. /**
  142. * 关联兑换码
  143. */
  144. private String exCode;
  145. /**
  146. * 关联推广id
  147. */
  148. private Long dsPopularizeId;
  149. /**
  150. * cps后台推广id
  151. */
  152. private Long cpsPopularizeId;
  153. /**
  154. * 自定义订阅节点
  155. */
  156. private String subNode;
  157. /**
  158. * 续费后 是否需要更换车票
  159. */
  160. private Boolean isChangeTicket;
  161. /**
  162. * 之前的车票的规格id
  163. */
  164. private Long preSkuId;
  165. /**
  166. * 是否已踢出
  167. */
  168. private Boolean isKickOut;
  169. /**
  170. * 余额支付
  171. */
  172. private BigDecimal balance;
  173. /**
  174. * 付款说明
  175. */
  176. @TableField(exist = false)
  177. private String payDesc;
  178. /**
  179. * 虚拟平台特殊类型
  180. */
  181. @TableField(exist = false)
  182. private GoodsDon.SpecialType specialType;
  183. /**
  184. * 是否优惠加购规格
  185. */
  186. private Boolean isDp;
  187. private String payTitle;
  188. /**
  189. * 是否是额外硬塞车票车位的订单
  190. */
  191. private Boolean isOt;
  192. /**
  193. * 礼品卡现金使用记录
  194. */
  195. @DbIgnore
  196. @TableField(exist = false)
  197. @JsonIgnore
  198. private List<GiftCardOrderUseRecord> gcUseRecords;
  199. /**
  200. * 店铺id
  201. */
  202. private Long yhsId;
  203. public enum Status {
  204. /**
  205. * 订单状态
  206. */
  207. close("已关闭"),
  208. noPayment("待付款"),
  209. hasPayment("已付款"),
  210. transport("已发货"),
  211. received("已签收"),
  212. complete("已完成"),
  213. refund("已退款"),
  214. ;
  215. private String desc;
  216. Status(String desc) {
  217. this.desc = desc;
  218. }
  219. public String getDesc() {
  220. return desc;
  221. }
  222. }
  223. @Getter
  224. @AllArgsConstructor
  225. public enum Type{
  226. WeChat("wechat","微信"),
  227. ALI_PAY("zfb","支付宝"),
  228. EX_CODE("exchange_code","兑换码"),
  229. LOTTERY("lottery","抽奖"),
  230. EQUIPMENT("equipment", "实物设备分销"),
  231. PAY_EQUIPMENT("pay_equipment", "自购设备"),
  232. BALANCE("balance", "余额支付"),
  233. PAYPAL("paypal","paypal支付"),
  234. STRIPE("stripe","stripe支付")
  235. ;
  236. String type;
  237. String desc;
  238. public static Type getType(String type) {
  239. return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(ALI_PAY);
  240. }
  241. }
  242. @Getter
  243. public enum Source {
  244. yinHe("银河官网"),
  245. movies("银河电影"),
  246. ;
  247. String desc;
  248. Source(String desc) {
  249. this.desc = desc;
  250. }
  251. }
  252. @Getter
  253. public enum LabelSource {
  254. red_book("小红书"),
  255. guang_dian("广点通"),
  256. tik_tok("抖音付费"),
  257. ;
  258. String desc;
  259. LabelSource(String desc) {
  260. this.desc = desc;
  261. }
  262. }
  263. }