From 5e0c0bacadab898152518437ceb63bf8b54c6652 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 12 Aug 2022 22:27:34 +0800
Subject: [PATCH] finish NFT Active

---
 src/main/resources/mapper/dapp/DappWalletMineDao.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/dapp/DappWalletMineDao.xml b/src/main/resources/mapper/dapp/DappWalletMineDao.xml
index 7de979e..6f103bb 100644
--- a/src/main/resources/mapper/dapp/DappWalletMineDao.xml
+++ b/src/main/resources/mapper/dapp/DappWalletMineDao.xml
@@ -5,4 +5,24 @@
     <select id="selectByMemberId" resultType="cc.mrbird.febs.dapp.entity.DappWalletMineEntity">
         select * from dapp_wallet_mine where member_id=#{memberId}
     </select>
+
+    <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappWalletMineEntity">
+        select * from dapp_wallet_mine a
+        inner join dapp_member b on a.member_id=b.id
+        <where>
+            <if test="record.currentUser != null">
+                and b.referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})
+            </if>
+            <if test="record.address != '' and record.address != null">
+                and b.address = #{record.address}
+            </if>
+        </where>
+    </select>
+
+    <update id="updateBalance">
+        update dapp_wallet_mine
+        set total_amount = total_amount + #{totalAmount},
+            available_amount = available_amount + #{availableAmount}
+        where member_id=#{memberId}
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1