OrderDon.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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 BigDecimal realMoney;
  45. /**
  46. * 优惠金额
  47. */
  48. private BigDecimal couponMoney;
  49. /**
  50. * 优惠券用户领取id
  51. */
  52. private Long couponUserId;
  53. /**
  54. * 购买数量
  55. */
  56. private Integer num;
  57. /** 支付状态 */
  58. private Status status ;
  59. /**
  60. * 支付类型
  61. */
  62. private Type type;
  63. /**
  64. * 推广者设置的优惠码
  65. */
  66. private String couponExCode;
  67. /**
  68. * 订单类型 1普通订单、2续费订单
  69. * 默认值为1
  70. */
  71. private Integer orderType;
  72. /**
  73. * 订单来源
  74. */
  75. private Source source;
  76. /**
  77. * 支付时间
  78. */
  79. private Date payTime;
  80. /**
  81. * 是否是分销订单
  82. */
  83. private Boolean isDistribute;
  84. /**
  85. * 是否是固定推广者分销
  86. */
  87. private Boolean isFixedDistribute;
  88. /**
  89. * 商户id
  90. */
  91. private String shopId;
  92. /**
  93. * 渠道链接id
  94. */
  95. private Long popularizeId;
  96. /**
  97. * 是否是推广未登录用户购买订单
  98. */
  99. private Boolean isNoLogin;
  100. /**
  101. * 是否是网页端支付 默认0移动端支付
  102. */
  103. private Boolean isWebPay;
  104. /**
  105. * 关联兑换码
  106. */
  107. private String exCode;
  108. /**
  109. * 自定义订阅节点
  110. */
  111. private String subNode;
  112. /**
  113. * 续费后 是否需要更换车票
  114. */
  115. private Boolean isChangeTicket;
  116. /**
  117. * 之前的车票的规格id
  118. */
  119. private Long preSkuId;
  120. public enum Status {
  121. /**
  122. * 订单状态
  123. */
  124. close("已关闭"),
  125. noPayment("待付款"),
  126. hasPayment("已付款"),
  127. transport("已发货"),
  128. received("已签收"),
  129. complete("已完成"),
  130. refund("已退款"),
  131. ;
  132. private String desc;
  133. Status(String desc) {
  134. this.desc = desc;
  135. }
  136. public String getDesc() {
  137. return desc;
  138. }
  139. }
  140. @Getter
  141. @AllArgsConstructor
  142. public enum Type{
  143. WeChat("wechat","微信"),
  144. ALI_PAY("zfb","支付宝"),
  145. EX_CODE("exchange_code","兑换码"),
  146. LOTTERY("lottery","抽奖"),
  147. EQUIPMENT("equipment", "实物设备分销"),
  148. PAY_EQUIPMENT("pay_equipment", "自购设备"),
  149. ;
  150. String type;
  151. String desc;
  152. public static Type getType(String type) {
  153. return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(WeChat);
  154. }
  155. }
  156. @Getter
  157. public enum Source {
  158. yinHe("银河官网"),
  159. movies("银河电影"),
  160. ;
  161. String desc;
  162. Source(String desc) {
  163. this.desc = desc;
  164. }
  165. }
  166. }