From ae95d54490a630a6e2cd4c8c1b9909a41cbde5d2 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 08 Jun 2022 09:44:33 +0800
Subject: [PATCH] fix

---
 src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java b/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java
index ed70cd5..b57d48b 100644
--- a/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java
+++ b/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java
@@ -19,20 +19,23 @@
     public static final int WITHDRAW_STATUS_AGREE = 2;
     public static final int WITHDRAW_STATUS_DISAGREE = 3;
 
+
+    public static final int TYPE_BUY = 1;
+    public static final int TYPE_SALE = 2;
+
     public DappFundFlowEntity() {}
 
-    public DappFundFlowEntity(Long memberId, BigDecimal amount, Integer type, Integer status, Integer fee) {
+    public DappFundFlowEntity(Long memberId, BigDecimal amount, Integer type, Integer status, BigDecimal fee) {
+        new DappFundFlowEntity(memberId, amount, type, status, fee, null);
+    }
+
+    public DappFundFlowEntity(Long memberId, BigDecimal amount, Integer type, Integer status, BigDecimal fee, String fromHash) {
         this.memberId = memberId;
         this.amount = amount;
         this.type = type;
         this.status = status;
         this.fee = fee;
-
-        this.setCreateBy("system");
-        this.setUpdateBy("system");
-        this.setCreateTime(new Date());
-        this.setUpdateTime(new Date());
-        this.setVersion(1);
+        this.fromHash = fromHash;
     }
 
     private Long memberId;
@@ -40,7 +43,7 @@
     private BigDecimal amount;
 
     /**
-     * 类型 1-兑换 2-提现 3-采矿
+     * 类型 1-买入 2-卖出 3-采矿
      */
     private Integer type;
 
@@ -52,5 +55,13 @@
     @TableField(exist = false)
     private String address;
 
-    private Integer fee;
+    private BigDecimal fee;
+
+    private String toHash;
+
+    private String fromHash;
+
+    private BigDecimal newestPrice;
+
+    private BigDecimal targetAmount;
 }

--
Gitblit v1.9.1