From e3bf96ad189e12d7c2201734e9121063e7f39a37 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 13 Nov 2020 15:32:03 +0800
Subject: [PATCH] modify

---
 src/main/resources/mapper/modules/MemberWalletCoinMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
index 5980ed9..24d9634 100644
--- a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
+++ b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
@@ -7,4 +7,23 @@
         select * from member_wallet_coin where member_id = #{memberId} and wallet_code = #{walletCode}
     </select>
 
+    <select id="selectTdCoinWalletByAddress" resultType="com.xcong.excoin.modules.member.entity.TdCoinWallet">
+		select * from td_coin_wallet
+		where address=#{address} and symbol=#{symbol}
+	</select>
+    
+    <update id="updateTdCoinWalletAvaliable">
+        update td_coin_wallet
+        set available_balance=available_balance+#{money}
+        where address=#{address}
+    </update>
+
+    <select id="selectMemberWalletCoinByMemberId" resultType="java.util.HashMap">
+        select
+            member_id,
+            MAX(case wallet_code when 'USDT' then available_balance else 0 end) usdt,
+            MAX(case wallet_code when 'RFNC' then available_balance else 0 end) rfnc
+        from member_wallet_coin
+        where member_id=#{memberId}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1