From 9fe13ab6626a7abadcd0d67ca780363cd92cb024 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 10 Nov 2020 15:42:22 +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