zoukankan      html  css  js  c++  java
  • 批量插入删除

    public void deleteImageUrlList(List<ProductImageUrlDTO> list);

    public void saveImageUrlList(List<ProductImageUrlDTO> list);

    <insert id="saveImageUrlList" parameterType="java.util.List">
    insert into t_product_color_img_mapping(product_color,product_color_url)
    values
    <foreach collection="list" item="item" index="index" open=""
    close="" separator=",">
    (
    <if test="item.color != null">
    product_color = #{item.color,jdbcType=VERCHAR},
    </if>
    <if test="item.imageUrl != null">
    product_color_url = #{item.imageUrl,jdbcType=VERCHAR}
    </if>
    </foreach>
    )
    </insert>

    <delete id="deleteImageUrlList" parameterType="java.util.List">
    delete from t_product_color_img_mapping where
    <foreach item="item" collection="list" open="(" separator="," close=")">
    #{item.product_id,jdbctype=INTEGER}
    </foreach>
    </delete>

  • 相关阅读:
    生成函数代替伯努利数
    关于费用流
    GDOI注意事项
    计算几何 学习笔记
    jzoj5370
    图上的游戏
    小学生语文题
    arcane
    P2305 [NOI2014] 购票
    P3512 [POI2010]PIL-Pilots
  • 原文地址:https://www.cnblogs.com/panxuejun/p/7501135.html
Copyright © 2011-2022 走看看