OrderDon.java 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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. * 实物电视机类型 1、其他,2索尼 3三星 4东芝 5LG 6海信 7小米
  104. */
  105. private Integer tvType;
  106. /**
  107. * 支付时间
  108. */
  109. private Date payTime;
  110. /**
  111. * 是否是分销订单
  112. */
  113. private Boolean isDistribute;
  114. /**
  115. * 是否是固定推广者分销
  116. */
  117. private Boolean isFixedDistribute;
  118. /**
  119. * 商户id
  120. */
  121. private String shopId;
  122. /**
  123. * 渠道链接id
  124. */
  125. private Long popularizeId;
  126. /**
  127. * 是否是推广未登录用户购买订单
  128. */
  129. private Boolean isNoLogin;
  130. /**
  131. * 是否是网页端支付 默认0移动端支付
  132. */
  133. private Boolean isWebPay;
  134. /**
  135. * 关联兑换码
  136. */
  137. private String exCode;
  138. /**
  139. * 关联推广id
  140. */
  141. private Long dsPopularizeId;
  142. /**
  143. * cps后台推广id
  144. */
  145. private Long cpsPopularizeId;
  146. /**
  147. * 自定义订阅节点
  148. */
  149. private String subNode;
  150. /**
  151. * 续费后 是否需要更换车票
  152. */
  153. private Boolean isChangeTicket;
  154. /**
  155. * 之前的车票的规格id
  156. */
  157. private Long preSkuId;
  158. /**
  159. * 是否已踢出
  160. */
  161. private Boolean isKickOut;
  162. /**
  163. * 余额支付
  164. */
  165. private BigDecimal balance;
  166. /**
  167. * 付款说明
  168. */
  169. @TableField(exist = false)
  170. private String payDesc;
  171. /**
  172. * 虚拟平台特殊类型
  173. */
  174. @TableField(exist = false)
  175. private GoodsDon.SpecialType specialType;
  176. /**
  177. * 是否优惠加购规格
  178. */
  179. private Boolean isDp;
  180. private String payTitle;
  181. public enum Status {
  182. /**
  183. * 订单状态
  184. */
  185. close("已关闭"),
  186. noPayment("待付款"),
  187. hasPayment("已付款"),
  188. transport("已发货"),
  189. received("已签收"),
  190. complete("已完成"),
  191. refund("已退款"),
  192. ;
  193. private String desc;
  194. Status(String desc) {
  195. this.desc = desc;
  196. }
  197. public String getDesc() {
  198. return desc;
  199. }
  200. }
  201. @Getter
  202. @AllArgsConstructor
  203. public enum Type{
  204. WeChat("wechat","微信"),
  205. ALI_PAY("zfb","支付宝"),
  206. EX_CODE("exchange_code","兑换码"),
  207. LOTTERY("lottery","抽奖"),
  208. EQUIPMENT("equipment", "实物设备分销"),
  209. PAY_EQUIPMENT("pay_equipment", "自购设备"),
  210. BALANCE("balance", "余额支付"),
  211. PAYPAL("paypal","paypal支付"),
  212. STRIPE("stripe","stripe支付")
  213. ;
  214. String type;
  215. String desc;
  216. public static Type getType(String type) {
  217. return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(ALI_PAY);
  218. }
  219. }
  220. @Getter
  221. public enum Source {
  222. yinHe("银河官网"),
  223. movies("银河电影"),
  224. ;
  225. String desc;
  226. Source(String desc) {
  227. this.desc = desc;
  228. }
  229. }
  230. @Getter
  231. public enum LabelSource {
  232. red_book("小红书"),
  233. guang_dian("广点通"),
  234. tik_tok("抖音付费"),
  235. ;
  236. String desc;
  237. LabelSource(String desc) {
  238. this.desc = desc;
  239. }
  240. }
  241. }