From 6023a061f59e6a340e07962192d3bbfb6be0ecbd Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 11 Mar 2022 10:08:37 +0800 Subject: [PATCH] 20211201 fish --- 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