From 2f4dd0b0ba57cc66f2e2d0df7bbbf6cbfe9ba8c7 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 23 Aug 2023 14:06:23 +0800
Subject: [PATCH] 后台修改
---
src/main/resources/mapper/dapp/DappWalletMineDao.xml | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/dapp/DappWalletMineDao.xml b/src/main/resources/mapper/dapp/DappWalletMineDao.xml
index 8ecb63b..3341917 100644
--- a/src/main/resources/mapper/dapp/DappWalletMineDao.xml
+++ b/src/main/resources/mapper/dapp/DappWalletMineDao.xml
@@ -3,7 +3,7 @@
<mapper namespace="cc.mrbird.febs.dapp.mapper.DappWalletMineDao">
<select id="selectByMemberId" resultType="cc.mrbird.febs.dapp.entity.DappWalletMineEntity">
- select * from dapp_wallet_mine where member_id=#{memberId} for update
+ select * from dapp_wallet_mine where member_id=#{memberId}
</select>
<select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappWalletMineEntity">
@@ -40,4 +40,15 @@
<select id="selectAmountThanZero" resultType="cc.mrbird.febs.dapp.entity.DappWalletMineEntity">
select * from dapp_wallet_mine where available_amount > 0
</select>
+ <update id="addTotalAndaddAvailableById">
+ update dapp_wallet_mine
+ set total_amount = total_amount + #{amount},
+ available_amount = available_amount + #{amount}
+ where member_id=#{memberId}
+ </update>
+
+ <select id="selectTotal" resultType="java.math.BigDecimal">
+ select IFNULL(sum(IFNULL(total_amount,0)),0)
+ from dapp_wallet_mine
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1