分销金额
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user