Helius
2022-09-23 7c6f033b8754b07bf5c75ae8745a982d76f9abb4
src/main/resources/mapper/modules/MallMemberWalletMapper.xml
@@ -12,4 +12,36 @@
            balance = #{record.balance}
        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>
</mapper>