您的位置:首页 > 数据库 > Oracle

mybatis oracle批量修改

2016-07-19 00:00 369 查看
摘要: mybatis oracle批量修改

<update id="batchUpdateOrder" parameterType="java.util.List">
begin
<foreach collection="list" item="item" index="index" separator=";">
update mp_order
<set>
<if test="item.orderPostcode != null and item.orderPostcode != ''">
ORDER_POSTCODE = #{item.orderPostcode,jdbcType=VARCHAR},
</if>
<if test="item.customerName != null and item.customerName != ''">
CUSTOMER_NAME = #{item.customerName,jdbcType=VARCHAR},
</if>
<if test="item.credentialsType != null and item.credentialsType != ''">
CREDENTIALS_TYPE = #{item.credentialsType,jdbcType=VARCHAR},
</if>
<if test="item.credentialsNo != null and item.credentialsNo != ''">
CREDENTIALS_NO = #{item.credentialsNo,jdbcType=VARCHAR},
</if>
<if test="item.storeOrderType != null and item.storeOrderType != ''">
STORE_ORDER_TYPE = #{item.storeOrderType,jdbcType=VARCHAR},
</if>
<if test="item.orderSource != null and item.orderSource != ''">
ORDER_SOURCE = #{item.orderSource,jdbcType=VARCHAR},
</if>
<if test="item.totalTariff != null and item.totalTariff != ''">
TOTAL_TARIFF = #{item.totalTariff,jdbcType=DECIMAL},
</if>
</set>
WHERE ORDER_NO = #{item.orderNo,jdbcType=VARCHAR}
</foreach>
;end;
</update>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: