sql问题
This commit is contained in:
@@ -5,16 +5,24 @@
|
||||
<mapper namespace="com.czg.service.market.mapper.MkDistributionUserMapper">
|
||||
<update id="updateIncome">
|
||||
update mk_distribution_user
|
||||
set
|
||||
<set>
|
||||
<if test="pendingIncome != null">
|
||||
total_income = total_income + #{pendingIncome},
|
||||
</if>
|
||||
<if test="receivedIncome != null">
|
||||
total_income = total_income + #{receivedIncome},
|
||||
</if>
|
||||
pending_income = pending_income + #{pendingIncome},
|
||||
received_income = received_income + #{receivedIncome},
|
||||
withdrawn_income = withdrawn_income + #{withdrawIncome}
|
||||
|
||||
<if test="pendingIncome != null">
|
||||
pending_income = pending_income + #{pendingIncome},
|
||||
</if>
|
||||
<if test="receivedIncome != null">
|
||||
received_income = received_income + #{receivedIncome},
|
||||
</if>
|
||||
<if test="withdrawIncome != null">
|
||||
withdrawn_income = withdrawn_income + #{withdrawIncome}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id} and shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user