mybatis oracle批量修改
发布日期:2021-09-03 15:22:39 浏览次数:4 分类:技术文章

本文共 1200 字,大约阅读时间需要 4 分钟。

hot3.png

<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>

转载于:https://my.oschina.net/u/2001417/blog/714519

转载地址:https://blog.csdn.net/weixin_34191845/article/details/92170395 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:初涉程序员之路的感悟
下一篇:windows xcopy

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2024年04月03日 06时08分28秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章