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