<!-- 批量增加已分配數量 --> <update id="batchUpdateDistributedNum" parameterType="java.util.List" flushCache="true" > <foreach collection="list" item="item" index="index" open="" close="" separator=";"> update wave_good_detail <set> goods_num = goods_num - #{item.salesVolumes}, undistributed_num =undistributed_num - #{item.salesVolumes}, operate_time=CURRENT_TIMESTAMP </set> <where> pk_wave = #{item.pkWave} and goods_code=#{item.goodsCode} <if test="item.supplier !=null and item.supplier !=''"> and supplier=#{item.supplier} </if> </where> </foreach> </update>
mybaties 批量更新
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.