• mybatis批量对象update更新,不推荐!


    实际上是一条一条插入,不要用!更新了1331条数据, 用了5,6分钟,一条一条的入库,害。

    serverImpl.java

    太慢了,我就注释了。

    mapper.java

    mapper.xml

    <!-- 更新箱数为null的数据 -->
         <update id="updatePoInfo"
            parameterType="com.kent.qr.vo.PoTableVO">
            update production_order
            set
            plant = #{plant},
            order_type = #{orderType},
            batch_no =#{batchNo},
            customer_code = #{customerCode},
            customer_name
            =#{customerName},
            material_no = #{materialNo},
            mode_no =#{moldNo},
            cust_material_no =
            #{custMaterialNo},
            order_qty =#{orderQty},
            uom =
            #{uom},
            packing_category =#{packingCategory},
            country = #{country},
            mpt
            =#{mpt},
            mpq = #{mpq},
            mpt_material_no =#{mptMaterialNo},
            length =
            #{length},
            width =#{width},
            high = #{high},
            apt =#{apt},
            apq = #{apq},
            assortment_id
            =#{assortmentID},
            assortment_description =
            #{assortmentDescription},
            total_carton_qty =#{totalCartonQty},
            rel_date
            =#{relDate},
            locco =
            #{locco},
            airplane_type =#{airplaneType},
            zscxs =
            #{zscxs}
    
            where
            production_order in(
            <foreach collection="poNoList" item="productionOrderNo"
                separator=",">
                #{productionOrderNo}
            </foreach>
            )
    
        </update> 
        

    这个where条件,来源于PoTableVo实体类里面,在第一张图里add进去的。

         where
            production_order in(
            <foreach collection="poNoList" item="productionOrderNo"
                separator=",">
                #{productionOrderNo}
            </foreach>
            )

  • 相关阅读:
    半链接和关联转换
    My97 DatePicker图标触发
    My97 DatePicker普通调用
    JavaScript获取路径
    OR扩展
    linux vmstat使用说明
    linux sar查看网络流量
    library cache: mutex X
    My97DatePicker日历控制按日、按周和按月选择
    利用PowerDesigner15在win7系统下对MySQL 进行反向工程(三)
  • 原文地址:https://www.cnblogs.com/PinkPink/p/13832952.html
Copyright © 2020-2023  润新知