OrderDon.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. package com.cyksj.model.entity;
  2. import lombok.*;
  3. import java.io.Serializable;
  4. import java.math.BigDecimal;
  5. import java.util.Arrays;
  6. import java.util.Date;
  7. /**
  8. * @author chan
  9. * @date 2021/10/11 下午4:04
  10. */
  11. @Getter
  12. @Setter
  13. public class OrderDon extends BaseEntity implements Serializable {
  14. /**
  15. * 座位id
  16. */
  17. private Long relationId;
  18. /**
  19. * 商品id
  20. */
  21. private Long skuId;
  22. /** 订单号 */
  23. private String orderNo ;
  24. private Long goodsId;
  25. /**
  26. * 微信订单号
  27. */
  28. private String transactionId;
  29. /** 用户id */
  30. private Long userId ;
  31. /**
  32. * openId
  33. */
  34. private String openId;
  35. /** 金额 */
  36. private BigDecimal money ;
  37. /**
  38. * 退款金额
  39. */
  40. private BigDecimal refundMoney;
  41. /**
  42. * 优惠金额
  43. */
  44. private BigDecimal realMoney;
  45. /**
  46. * 优惠金额
  47. */
  48. private BigDecimal couponMoney;
  49. /**
  50. * 优惠券用户领取id
  51. */
  52. private Long couponUserId;
  53. /**
  54. * 购买数量
  55. */
  56. private Integer num;
  57. /** 支付状态 */
  58. private Status status ;
  59. /**
  60. * 支付类型
  61. */
  62. private Type type;
  63. /**
  64. * 订单类型 1普通订单、2续费订单
  65. * 默认值为1
  66. */
  67. private Integer orderType;
  68. /**
  69. * 支付时间
  70. */
  71. private Date payTime;
  72. /**
  73. * 是否是分销订单
  74. */
  75. private Boolean isDistribute;
  76. /**
  77. * 是否是固定推广者分销
  78. */
  79. private Boolean isFixedDistribute;
  80. /**
  81. * 商户id
  82. */
  83. private String shopId;
  84. /**
  85. * 渠道链接id
  86. */
  87. private Long popularizeId;
  88. public enum Status {
  89. /**
  90. * 订单状态
  91. */
  92. close("已关闭"),
  93. noPayment("待付款"),
  94. hasPayment("已付款"),
  95. transport("已发货"),
  96. received("已签收"),
  97. complete("已完成"),
  98. refund("已退款"),
  99. ;
  100. private String desc;
  101. Status(String desc) {
  102. this.desc = desc;
  103. }
  104. public String getDesc() {
  105. return desc;
  106. }
  107. }
  108. @Getter
  109. @AllArgsConstructor
  110. public enum Type{
  111. WeChat("wechat","微信"),
  112. ALI_PAY("zfb","支付宝"),
  113. EX_CODE("exchange_code","兑换码"),
  114. ;
  115. String type;
  116. String desc;
  117. public static Type getType(String type) {
  118. return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(WeChat);
  119. }
  120. }
  121. }