<?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="ctop.bytedance.ad.advertise.mapper.ByteDanceCreativeMapper">
    <insert id="replaceBatch">
        replace into ctop_bytedance_creative(
        id,
        plan_id,
        toutiao_id,
        account_id,
        title,
        creative_word_ids,
        status,
        opt_status,
        image_mode,
        image_ids,
        image_id,
        video_id,
        audit_reject_reason,
        third_party_id,
        creative_create_time,
        creative_modify_time,
        create_time,
        update_time)
        values
        <foreach collection="creatives" item="report" separator=",">
            (
            #{report.id},
            #{report.planId},
            #{report.toutiaoId},
            #{report.accountId},
            #{report.title},
            #{report.creativeWordIds},
            #{report.status},
            #{report.optStatus},
            #{report.imageMode},
            #{report.imageIds},
            #{report.imageId},
            #{report.videoId},
            #{report.auditRejectReason},
            #{report.thirdPartyId},
            #{report.creativeCreateTime},
            #{report.creativeModifyTime},
            #{report.createTime},
            #{report.updateTime}
            )
        </foreach>
    </insert>
</mapper>
