OrderDon.java 6.2 KB

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