OrderDon.java 6.4 KB

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