xml中SQL批量更新的写法


<update id="batchUpdateReqDetail" parameterType="list">
<foreach collection="list" item="item">
update PROJECT_PLAN_REQ_DETAIL set
PLAN_PURCHASE_ID = #{item.planPurchaseId},
PLAN_STATUS = #{item.planStatus}
where 1=1 and PLAN_DETAIL_ID = #{item.planDetailId};
</foreach>
</update>

上一篇:F. Floor Plan


下一篇:并发控制--context篇