VipOrderDon.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. package com.cyksj.model.entity;
  2. import cn.hutool.core.util.StrUtil;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.ejlchina.searcher.bean.DbIgnore;
  5. import lombok.AllArgsConstructor;
  6. import lombok.Getter;
  7. import lombok.Setter;
  8. import java.math.BigDecimal;
  9. import java.util.Arrays;
  10. import java.util.Date;
  11. /**
  12. * 项目名: yhlxj2
  13. * 文件名: VipOrderDon
  14. * 创建者: JavaZou
  15. * 创建时间:2025/5/13 10:38
  16. */
  17. @Getter
  18. @Setter
  19. public class VipOrderDon extends BaseEntity{
  20. private Long goodsId;
  21. /**
  22. * cps后台推广id
  23. */
  24. private Long cpsPopularizeId;
  25. /** 订单号 */
  26. private String orderNo ;
  27. /**
  28. * 买家支付id
  29. */
  30. private String buyerId;
  31. /**
  32. * 微信订单号
  33. */
  34. private String transactionId;
  35. /** 用户id */
  36. private Long userId ;
  37. /**
  38. * openId
  39. */
  40. private String openId;
  41. /**
  42. * 续费月数
  43. */
  44. private Integer num;
  45. /** 金额 */
  46. private BigDecimal money;
  47. /**
  48. * 抵扣金额
  49. */
  50. private BigDecimal deductMoney;
  51. /**
  52. * 实际可抵扣金额(超过)
  53. */
  54. private BigDecimal actuallyDeductMoney;
  55. /**
  56. * 超出抵扣会员可延长多少天
  57. */
  58. private Integer extendsDays;
  59. /**
  60. * 海外支付金额
  61. */
  62. private BigDecimal abroadMoney;
  63. /**
  64. * 手续费
  65. */
  66. private BigDecimal abroadTransactionFee;
  67. /**
  68. * 退款金额
  69. */
  70. private BigDecimal refundMoney;
  71. /**
  72. * 退款余额
  73. */
  74. private BigDecimal refundBalance;
  75. /**
  76. * 退款原因
  77. */
  78. private String refundDesc;
  79. /** 支付状态 */
  80. private Status status ;
  81. /**
  82. * 支付类型
  83. */
  84. private Type type;
  85. /**
  86. * 订单类型 1普通订单、2续费订单
  87. * 默认值为1
  88. */
  89. private Integer orderType;
  90. /**
  91. * 是否是分销订单
  92. */
  93. private Boolean isDistribute;
  94. /**
  95. * 是否是固定推广者分销
  96. */
  97. private Boolean isFixedDistribute;
  98. /**
  99. * 支付时间
  100. */
  101. private Date payTime;
  102. /**
  103. * 商户id
  104. */
  105. private String shopId;
  106. /**
  107. * 渠道链接id
  108. */
  109. private Long popularizeId;
  110. /**
  111. * 是否是网页端支付 默认0移动端支付
  112. */
  113. private Boolean isWebPay;
  114. /**
  115. * 余额支付
  116. */
  117. private BigDecimal balance;
  118. private String payTitle;
  119. /**
  120. * 付款说明
  121. */
  122. @TableField(exist = false)
  123. @DbIgnore
  124. private String payDesc;
  125. public enum Status {
  126. /**
  127. * 订单状态
  128. */
  129. close("已关闭"),
  130. noPayment("待付款"),
  131. hasPayment("已付款"),
  132. complete("已完成"),
  133. refund("已退款"),
  134. ;
  135. private String desc;
  136. Status(String desc) {
  137. this.desc = desc;
  138. }
  139. public String getDesc() {
  140. return desc;
  141. }
  142. }
  143. @Getter
  144. @AllArgsConstructor
  145. public enum Type{
  146. WeChat("wechat","微信"),
  147. ALI_PAY("zfb","支付宝"),
  148. BALANCE("balance", "余额支付"),
  149. PAYPAL("paypal","paypal支付"),
  150. STRIPE("stripe","stripe支付"),
  151. GALAXY_COIN("galaxy_coin","银河币支付"),
  152. ;
  153. String type;
  154. String desc;
  155. public static VipOrderDon.Type getType(String type) {
  156. if (StrUtil.isEmpty(type)) {
  157. return ALI_PAY;
  158. }
  159. return Arrays.stream(VipOrderDon.Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(ALI_PAY);
  160. }
  161. }
  162. }