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 |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
index 761c431..24d9634 100644
--- a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
+++ b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
@@ -17,4 +17,13 @@
         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