分销金额

This commit is contained in:
张松
2025-10-29 19:06:42 +08:00
parent c027336989
commit 3820d86c8a
10 changed files with 36 additions and 16 deletions

View File

@@ -17,6 +17,20 @@
where id = #{id}
and amount - #{money} >= 0
</update>
<update id="updateOneOrTwoAmount">
update tb_shop_user
<set>
<if test="isOne != null and isOne == 1">
one_income = one_income + #{amount}
</if>
<if test="isOne != null and isOne == 2">
two_income = two_income + #{amount}
</if>
</set>
where user_id = #{userId}
and shop_id = #{shopId}
</update>
<select id="selectUserSummary" resultType="com.czg.account.dto.shopuser.ShopUserSummaryDTO">

View File

@@ -8,12 +8,6 @@
update tb_user_info
<set>
distribution_amount = distribution_amount + #{amount}
<if test="isOne != null and isOne == 1">
, one_income = one_income + #{amount}
</if>
<if test="isOne != null and isOne == 2">
, two_income = two_income + #{amount}
</if>
</set>
where id = #{userId}
and distribution_amount + #{amount} >= 0