From a3f86d22b6b9d5ab4a335488ddaf8edf3aa5f787 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 03 Jun 2021 16:45:08 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/modules/MemberWalletCoinMapper.xml | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml index 5980ed9..fabdfd6 100644 --- a/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml +++ b/src/main/resources/mapper/modules/MemberWalletCoinMapper.xml @@ -7,4 +7,19 @@ 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