OrderDon.java 6.4 KB

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