<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.ctop.crawler.modules.kuaishoucce.mapper.KuaishouInspiredAdMapper">

    <insert id="replaceBatch">
        replace into kuaishou_inspired_ad(
        id,
        main_mv_url,
        cover_thumbnail_url,
        width,
        height,
        video_duration,
        head_url,
        first_industry_name,
        nick_name,
        caption,
        create_time,
        update_time
        )
        values
        <foreach collection="ads" item="ad" separator=",">
            (
            #{ad.id},
            #{ad.mainMvUrl},
            #{ad.coverThumbnailUrl},
            #{ad.width},
            #{ad.height},
            #{ad.videoDuration},
            #{ad.headUrl},
            #{ad.firstIndustryName},
            #{ad.nickName},
            #{ad.caption},
            #{ad.createTime},
            #{ad.updateTime}
            )
        </foreach>
    </insert>
</mapper>
