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>

posted @ 2020-09-28 22:55  CEO雷总  阅读(3561)  评论(0编辑  收藏  举报