xiaoyong931011
2022-03-16 8258ad8685784f421d62acfe6b9992c9935e3ebd
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>