GoodsWholesaleUserDeposit.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package com.cyksj.model.entity;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.ejlchina.searcher.bean.DbField;
  4. import com.ejlchina.searcher.bean.DbIgnore;
  5. import com.ejlchina.searcher.bean.SearchBean;
  6. import lombok.AllArgsConstructor;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import java.math.BigDecimal;
  10. import java.util.Arrays;
  11. import java.util.Date;
  12. /**
  13. * 项目名: yhlxj
  14. * 文件名: GoodsWholesaleUserDeposit
  15. * 创建者: JavaZou
  16. * 创建时间:2024/8/21 15:52
  17. */
  18. @Getter
  19. @Setter
  20. @SearchBean(tables = "goods_wholesale_user_deposit gwud",
  21. where = "gwud.status != 'noPayment'")
  22. public class GoodsWholesaleUserDeposit extends BaseEntity {
  23. private Long userId;
  24. private BigDecimal money;
  25. private Type type;
  26. /**
  27. * 支付状态
  28. */
  29. private Status status;
  30. /**
  31. * 累积批发
  32. */
  33. @TableField(exist = false)
  34. @DbIgnore
  35. private Integer total;
  36. /**
  37. * 操作人
  38. */
  39. private String operator;
  40. /**
  41. * 商户id
  42. */
  43. private String shopId;
  44. private String orderNo;
  45. private String refundOutNo;
  46. private String transactionId;
  47. private Boolean isWebPay;
  48. /**
  49. * 批发数达标
  50. */
  51. private Boolean isGoal;
  52. private Date payTime;
  53. private String buyerId;
  54. @DbIgnore
  55. @TableField(exist = false)
  56. private Boolean isDeposit;
  57. @DbField("select nickname from user where id = gwud.user_id limit 1")
  58. @TableField(exist = false)
  59. private String nickname;
  60. public enum Status {
  61. /**
  62. * 订单状态
  63. */
  64. noPayment("待付款"),
  65. hasPayment("已付款"),
  66. refund("已退款"),
  67. ;
  68. private String desc;
  69. Status(String desc) {
  70. this.desc = desc;
  71. }
  72. public String getDesc() {
  73. return desc;
  74. }
  75. }
  76. @Getter
  77. @AllArgsConstructor
  78. public enum Type {
  79. WeChat("wechat", "微信"),
  80. ALI_PAY("zfb", "支付宝"),
  81. PAYPAL("paypal", "paypal支付"),
  82. STRIPE("stripe", "stripe支付");
  83. String type;
  84. String desc;
  85. public static GoodsWholesaleUserDeposit.Type getType(String type) {
  86. return Arrays.stream(GoodsWholesaleUserDeposit.Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(ALI_PAY);
  87. }
  88. }
  89. }