From 8dd45c1c726b5628dfd8cae1992a27112ebb6af6 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 16 Mar 2022 15:23:38 +0800
Subject: [PATCH] Merge branch 'bea-back' of http://120.27.238.55:7000/r/exchange-back into bea-back

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

diff --git a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
index 5980ed9..64fcaaa 100644
--- a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
+++ b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml
@@ -7,4 +7,20 @@
         select * from member_wallet_coin where member_id = #{memberId} and wallet_code = #{walletCode}
     </select>
 
+
+    <update id="updateBlockBalance">
+        update member_wallet_coin
+        set
+            available_balance = IFNULL(available_balance, 0) + #{availableBalance},
+            total_balance = IFNULL(total_balance, 0) + #{availableBalance}
+        where id=#{id}
+    </update>
+
+    <update id="reduceFrozenBalance">
+        update member_wallet_coin
+        set frozen_balance = frozen_balance - #{amount},
+            total_balance = total_balance - #{amount}
+        where id=#{id}
+    </update>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1