From 836e019db92b9871cba9d440c8159b35f79e1726 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 30 Mar 2023 09:32:42 +0800
Subject: [PATCH] 根据补贴记录,减少用户贡献值

---
 src/main/resources/mapper/modules/MallMemberWalletMapper.xml |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/modules/MallMemberWalletMapper.xml b/src/main/resources/mapper/modules/MallMemberWalletMapper.xml
index b988a31..ac0aa70 100644
--- a/src/main/resources/mapper/modules/MallMemberWalletMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberWalletMapper.xml
@@ -67,7 +67,7 @@
         select ifnull(sum(commission),0) total from mall_member_wallet
     </select>
 
-    <select id="selectSumStarByIds" resultType="cc.mrbird.febs.mall.entity.MallMemberWallet">
+    <select id="selectMemberWalletsByIds" resultType="cc.mrbird.febs.mall.entity.MallMemberWallet">
         select * from mall_member_wallet
         where  member_id IN
         <foreach collection = "list" item = "item"  separator=","  open = "(" close = ")" >
@@ -95,4 +95,37 @@
         </foreach>
     </update>
 
+    <update id="reduceTotalScoreById">
+            update mall_member_wallet
+            <set>
+                total_score = total_score - #{totalScore},
+            </set>
+            WHERE id =  #{id}
+    </update>
+
+    <update id="addBalanceById">
+            update mall_member_wallet
+            <set>
+                balance = balance + #{balance},
+            </set>
+            WHERE id =  #{id}
+    </update>
+
+    <update id="addStarByMemberId">
+            update mall_member_wallet
+            <set>
+                star = star + #{star},
+            </set>
+            WHERE member_id =  #{memberId}
+    </update>
+
+    <update id="reduceStarByMemberId">
+            update mall_member_wallet
+            <set>
+                star = star - #{star},
+            </set>
+            WHERE member_id =  #{memberId}
+    </update>
+
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1