From 030e1cca0b8103662a182a4dbe801c063b342630 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Thu, 10 Mar 2022 14:44:33 +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