OrderDon.java 6.8 KB

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