update 批量更新
阿新 • • 發佈:2019-01-28
efi ffi reac gis list err upd where end
update
tb_order
<trim prefix="set" suffixOverrides=",">
<trim prefix="logistics_name =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.logistics_name!=null">
when order_id=#{i.order_id} then #{i.logistics_name}
</if>
</foreach>
</trim>
<trim prefix=" logistics_code =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.logistics_code!=null">
when order_id=#{i.order_id} then #{i.logistics_code}
</if>
</foreach>
</trim>
<trim prefix="order_status =case" suffix="end," >
<foreach collection="list" item="i" index="index">
<if test="i.order_status!=null">
when order_id=#{i.order_id} then #{i.order_status}
</if>
</foreach>
</trim>
</trim>
where
<foreach collection="list" separator="or" item="i" index="index" >
order_id=#{i.order_id}
</foreach>
update 批量更新