OrderDon.java 6.0 KB

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