From 159c4ae136e14f9bbfb28eef799b42fe59d9fd9e Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 24 Jun 2024 10:39:55 +0800
Subject: [PATCH] 后台矩阵列表

---
 src/main/resources/mapper/dapp/DappFundFlowDao.xml                          |    5 ++++-
 src/main/resources/templates/febs/views/dapp/member-withdraw.html           |    3 ++-
 src/main/java/cc/mrbird/febs/dapp/controller/MemberMoneyFlowController.java |    6 +++---
 src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java            |    3 +++
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/dapp/controller/MemberMoneyFlowController.java b/src/main/java/cc/mrbird/febs/dapp/controller/MemberMoneyFlowController.java
index 1f7aa3d..af43dbd 100644
--- a/src/main/java/cc/mrbird/febs/dapp/controller/MemberMoneyFlowController.java
+++ b/src/main/java/cc/mrbird/febs/dapp/controller/MemberMoneyFlowController.java
@@ -12,8 +12,8 @@
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -49,7 +49,7 @@
     /**
      * 提现转账列表-同意
      */
-    @GetMapping("withdrawAgree/{id}")
+    @PostMapping("withdrawAgree/{id}")
     @ControllerEndpoint(operation = "提现转账列表-同意", exceptionMessage = "操作失败")
     public FebsResponse agreeWithdraw(@NotNull(message = "{required}") @PathVariable Long id) {
         return dappWalletService.agreeWithdraw(id);
@@ -58,7 +58,7 @@
     /**
      * 提现转账列表-拒绝
      */
-    @GetMapping("withdrawDisAgree/{id}")
+    @PostMapping("withdrawDisAgree/{id}")
     @ControllerEndpoint(operation = "提现转账列表-拒绝", exceptionMessage = "操作失败")
     public FebsResponse disagreeWithdraw(@NotNull(message = "{required}") @PathVariable Long id) {
         return dappWalletService.disagreeWithdraw(id);
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 b6428b9..634dbeb 100644
--- a/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java
+++ b/src/main/java/cc/mrbird/febs/dapp/entity/DappFundFlowEntity.java
@@ -69,6 +69,9 @@
     @TableField(exist = false)
     private String address;
 
+    @TableField(exist = false)
+    private BigDecimal amountReal;
+
     private BigDecimal fee;
 
     private String toHash;
diff --git a/src/main/resources/mapper/dapp/DappFundFlowDao.xml b/src/main/resources/mapper/dapp/DappFundFlowDao.xml
index a1072e6..4e69c8b 100644
--- a/src/main/resources/mapper/dapp/DappFundFlowDao.xml
+++ b/src/main/resources/mapper/dapp/DappFundFlowDao.xml
@@ -3,7 +3,10 @@
 <mapper namespace="cc.mrbird.febs.dapp.mapper.DappFundFlowDao">
 
     <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappFundFlowEntity">
-        select a.*, b.address address from dapp_fund_flow a
+        select a.*,
+                (a.amount + a.fee) AS amountReal,
+               b.address address
+        from dapp_fund_flow a
         inner join dapp_member b on a.member_id=b.id
         <where>
             <if test="record.currentUser != null">
diff --git a/src/main/resources/templates/febs/views/dapp/member-withdraw.html b/src/main/resources/templates/febs/views/dapp/member-withdraw.html
index 109385a..ab16dbd 100644
--- a/src/main/resources/templates/febs/views/dapp/member-withdraw.html
+++ b/src/main/resources/templates/febs/views/dapp/member-withdraw.html
@@ -132,8 +132,9 @@
                 cols: [[
                     {field: 'address', title: '地址', minWidth: 130},
                     {field: 'createTime', title: '创建时间', minWidth: 180},
-                    {field: 'amount', title: '提现金额(USDT)', minWidth: 130},
+                    {field: 'amountReal', title: '到账金额(USDT)', minWidth: 130},
                     {title: '提现状态', templet: '#withdraw-status'},
+                    {field: 'amount', title: '提现金额(USDT)', minWidth: 130},
                     {field: 'fee', title: '手续费', minWidth: 130},
                     {title: '操作', toolbar: '#withdraw-option', minWidth: 200}
                 ]]

--
Gitblit v1.9.1