OrderDon.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. package com.cyksj.model.entity;
  2. import lombok.*;
  3. import java.io.Serializable;
  4. import java.math.BigDecimal;
  5. import java.util.Arrays;
  6. import java.util.Date;
  7. /**
  8. * @author chan
  9. * @date 2021/10/11 下午4:04
  10. */
  11. @Getter
  12. @Setter
  13. public class OrderDon extends BaseEntity implements Serializable {
  14. /**
  15. * 座位id
  16. */
  17. private Long relationId;
  18. /**
  19. * 商品id
  20. */
  21. private Long skuId;
  22. /** 订单号 */
  23. private String orderNo ;
  24. private Long goodsId;
  25. /**
  26. * 微信订单号
  27. */
  28. private String transactionId;
  29. /** 用户id */
  30. private Long userId ;
  31. /**
  32. * openId
  33. */
  34. private String openId;
  35. /** 金额 */
  36. private BigDecimal money ;
  37. /**
  38. * 退款金额
  39. */
  40. private BigDecimal refundMoney;
  41. /**
  42. * 退款原因
  43. */
  44. private String refundDesc;
  45. /**
  46. * 优惠金额
  47. */
  48. private BigDecimal realMoney;
  49. /**
  50. * 优惠金额
  51. */
  52. private BigDecimal couponMoney;
  53. /**
  54. * 优惠券用户领取id
  55. */
  56. private Long couponUserId;
  57. /**
  58. * 购买数量
  59. */
  60. private Integer num;
  61. /** 支付状态 */
  62. private Status status ;
  63. /**
  64. * 支付类型
  65. */
  66. private Type type;
  67. /**
  68. * 推广者设置的优惠码
  69. */
  70. private String couponExCode;
  71. /**
  72. * 订单类型 1普通订单、2续费订单
  73. * 默认值为1
  74. */
  75. private Integer orderType;
  76. /**
  77. * 订单来源
  78. */
  79. private Source source;
  80. /**
  81. * 支付时间
  82. */
  83. private Date payTime;
  84. /**
  85. * 是否是分销订单
  86. */
  87. private Boolean isDistribute;
  88. /**
  89. * 是否是固定推广者分销
  90. */
  91. private Boolean isFixedDistribute;
  92. /**
  93. * 商户id
  94. */
  95. private String shopId;
  96. /**
  97. * 渠道链接id
  98. */
  99. private Long popularizeId;
  100. /**
  101. * 是否是推广未登录用户购买订单
  102. */
  103. private Boolean isNoLogin;
  104. /**
  105. * 是否是网页端支付 默认0移动端支付
  106. */
  107. private Boolean isWebPay;
  108. /**
  109. * 关联兑换码
  110. */
  111. private String exCode;
  112. /**
  113. * 关联推广id
  114. */
  115. private Long dsPopularizeId;
  116. /**
  117. * 自定义订阅节点
  118. */
  119. private String subNode;
  120. /**
  121. * 续费后 是否需要更换车票
  122. */
  123. private Boolean isChangeTicket;
  124. /**
  125. * 之前的车票的规格id
  126. */
  127. private Long preSkuId;
  128. public enum Status {
  129. /**
  130. * 订单状态
  131. */
  132. close("已关闭"),
  133. noPayment("待付款"),
  134. hasPayment("已付款"),
  135. transport("已发货"),
  136. received("已签收"),
  137. complete("已完成"),
  138. refund("已退款"),
  139. ;
  140. private String desc;
  141. Status(String desc) {
  142. this.desc = desc;
  143. }
  144. public String getDesc() {
  145. return desc;
  146. }
  147. }
  148. @Getter
  149. @AllArgsConstructor
  150. public enum Type{
  151. WeChat("wechat","微信"),
  152. ALI_PAY("zfb","支付宝"),
  153. EX_CODE("exchange_code","兑换码"),
  154. LOTTERY("lottery","抽奖"),
  155. EQUIPMENT("equipment", "实物设备分销"),
  156. PAY_EQUIPMENT("pay_equipment", "自购设备"),
  157. ;
  158. String type;
  159. String desc;
  160. public static Type getType(String type) {
  161. return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(WeChat);
  162. }
  163. }
  164. @Getter
  165. public enum Source {
  166. yinHe("银河官网"),
  167. movies("银河电影"),
  168. ;
  169. String desc;
  170. Source(String desc) {
  171. this.desc = desc;
  172. }
  173. }
  174. }