分销日志
This commit is contained in:
parent
2c17e5dcdf
commit
c027336989
|
|
@ -5,13 +5,18 @@
|
||||||
<mapper namespace="com.czg.service.account.mapper.UserInfoMapper">
|
<mapper namespace="com.czg.service.account.mapper.UserInfoMapper">
|
||||||
|
|
||||||
<update id="updateAmount">
|
<update id="updateAmount">
|
||||||
update tb_user_info set distribution_amount = distribution_amount + #{amount} where id = #{userId}
|
update tb_user_info
|
||||||
|
<set>
|
||||||
|
distribution_amount = distribution_amount + #{amount}
|
||||||
<if test="isOne != null and isOne == 1">
|
<if test="isOne != null and isOne == 1">
|
||||||
,one_income = one_income + #{amount}
|
, one_income = one_income + #{amount}
|
||||||
</if>
|
</if>
|
||||||
<if test="isOne != null and isOne == 2">
|
<if test="isOne != null and isOne == 2">
|
||||||
,two_income = two_income + #{amount}
|
, two_income = two_income + #{amount}
|
||||||
</if>
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{userId}
|
||||||
and distribution_amount + #{amount} >= 0
|
and distribution_amount + #{amount} >= 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue