OrderDon.java 5.1 KB

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