KKSU
2023-12-21 1e51f33490015a769197c448e02c11f95e721c9f
src/main/resources/mapper/modules/MallMemberWalletMapper.xml
@@ -26,4 +26,32 @@
            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="updateBalanceScoreWithId">
        update mall_member_wallet
        set revision = revision + 1 ,
            balance = #{record.balance},
            score = #{record.score}
        where id = #{record.id}
          and revision = #{record.revision}
    </update>
</mapper>