From 8d326b853cd3f2d2ca5f9a70b343389da63d9af6 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Mon, 23 Dec 2024 18:00:00 +0800 Subject: [PATCH] feat(mall): 新增节点规则功能 --- src/main/resources/mapper/modules/MallMemberWalletMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/modules/MallMemberWalletMapper.xml b/src/main/resources/mapper/modules/MallMemberWalletMapper.xml index fb94670..2a37ee5 100644 --- a/src/main/resources/mapper/modules/MallMemberWalletMapper.xml +++ b/src/main/resources/mapper/modules/MallMemberWalletMapper.xml @@ -12,4 +12,52 @@ balance = #{record.balance} where id=#{record.id} and revision=#{record.revision} </update> + + <update id="updateScoreWithVersion"> + update mall_member_wallet + set revision = revision + 1, + score = #{record.score} + where id=#{record.id} and revision=#{record.revision} + </update> + + <update id="updateCommissionWithVersion"> + update mall_member_wallet + set revision = revision + 1, + commission = #{record.commission} + where id=#{record.id} and revision=#{record.revision} + </update> + + <update id="updateBalanceWithId"> + update mall_member_wallet + set revision = revision + 1, + balance = #{record.balance} + where id=#{record.id} + </update> + + <update id="updateAmountWithVersion"> + update mall_member_wallet + set revision = revision + 1 + <if test="record.balance != null"> + , balance = #{record.balance} + </if> + <if test="record.score != null"> + , score = #{record.score} + </if> + <if test="record.prizeScore != null"> + , prize_score = #{record.prizeScore} + </if> + <if test="record.commission != null"> + , commission = #{record.commission} + </if> + where id=#{record.id} and revision=#{record.revision} + </update> + + <update id="updateScore"> + UPDATE mall_member_wallet + SET score = 0 + where id IN + <foreach collection = "list" item = "item" separator="," open = "(" close = ")" > + #{item} + </foreach > + </update> </mapper> \ No newline at end of file -- Gitblit v1.9.1