|
|
@@ -0,0 +1,184 @@
|
|
|
+<?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="com.ruixuan.launch.mapper.KuaishouLaunchCreativeRecordMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.ruixuan.launch.entity.KuaishouLaunchCreativeRecord" id="KuaishouLaunchCreativeRecordResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="accountId" column="account_id"/>
|
|
|
+ <result property="campaignId" column="campaign_id"/>
|
|
|
+ <result property="unitId" column="unit_id"/>
|
|
|
+ <result property="creativeId" column="creative_id"/>
|
|
|
+ <result property="strategyId" column="strategy_id"/>
|
|
|
+ <result property="creativeName" column="creative_name"/>
|
|
|
+ <result property="statDate" column="stat_date"/>
|
|
|
+ <result property="coverUrl" column="cover_url"/>
|
|
|
+ <result property="coverWidth" column="cover_width"/>
|
|
|
+ <result property="coverHeight" column="cover_height"/>
|
|
|
+ <result property="photoId" column="photo_id"/>
|
|
|
+ <result property="creativeMaterialType" column="creative_material_type"/>
|
|
|
+ <result property="actionBar" column="action_bar"/>
|
|
|
+ <result property="recommendation" column="recommendation"/>
|
|
|
+ <result property="description" column="description"/>
|
|
|
+ <result property="newExposeText" column="new_expose_text"/>
|
|
|
+ <result property="newExposeUrl" column="new_expose_url"/>
|
|
|
+ <result property="liveCreativeType" column="live_creative_type"/>
|
|
|
+ <result property="message" column="message"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectKuaishouLaunchCreativeRecordVo">
|
|
|
+ select id,
|
|
|
+ account_id,
|
|
|
+ campaign_id,
|
|
|
+ unit_id,
|
|
|
+ creative_id,
|
|
|
+ strategy_id,
|
|
|
+ creative_name,
|
|
|
+ stat_date,
|
|
|
+ cover_url,
|
|
|
+ cover_width,
|
|
|
+ cover_height,
|
|
|
+ photo_id,
|
|
|
+ creative_material_type,
|
|
|
+ action_bar,
|
|
|
+ recommendation,
|
|
|
+ description,
|
|
|
+ new_expose_text,
|
|
|
+ new_expose_url,
|
|
|
+ live_creative_type,
|
|
|
+ message,
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
+ from kuaishou_launch_creative_record
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectKuaishouLaunchCreativeRecordList" parameterType="com.ruixuan.launch.entity.KuaishouLaunchCreativeRecord"
|
|
|
+ resultMap="KuaishouLaunchCreativeRecordResult">
|
|
|
+ <include refid="selectKuaishouLaunchCreativeRecordVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="accountId != null ">and account_id = #{accountId}</if>
|
|
|
+ <if test="campaignId != null ">and campaign_id = #{campaignId}</if>
|
|
|
+ <if test="unitId != null ">and unit_id = #{unitId}</if>
|
|
|
+ <if test="creativeId != null ">and creative_id = #{creativeId}</if>
|
|
|
+ <if test="strategyId != null ">and strategy_id = #{strategyId}</if>
|
|
|
+ <if test="creativeName != null and creativeName != ''">and creative_name like concat('%', #{creativeName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="statDate != null and statDate != ''">and stat_date = #{statDate}</if>
|
|
|
+ <if test="coverUrl != null and coverUrl != ''">and cover_url = #{coverUrl}</if>
|
|
|
+ <if test="coverWidth != null ">and cover_width = #{coverWidth}</if>
|
|
|
+ <if test="coverHeight != null ">and cover_height = #{coverHeight}</if>
|
|
|
+ <if test="photoId != null and photoId != ''">and photo_id = #{photoId}</if>
|
|
|
+ <if test="creativeMaterialType != null ">and creative_material_type = #{creativeMaterialType}</if>
|
|
|
+ <if test="actionBar != null and actionBar != ''">and action_bar = #{actionBar}</if>
|
|
|
+ <if test="recommendation != null and recommendation != ''">and recommendation = #{recommendation}</if>
|
|
|
+ <if test="description != null and description != ''">and description = #{description}</if>
|
|
|
+ <if test="newExposeText != null and newExposeText != ''">and new_expose_text = #{newExposeText}</if>
|
|
|
+ <if test="newExposeUrl != null and newExposeUrl != ''">and new_expose_url = #{newExposeUrl}</if>
|
|
|
+ <if test="liveCreativeType != null ">and live_creative_type = #{liveCreativeType}</if>
|
|
|
+ <if test="message != null and message != ''">and message = #{message}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectKuaishouLaunchCreativeRecordById" parameterType="String"
|
|
|
+ resultMap="KuaishouLaunchCreativeRecordResult">
|
|
|
+ <include refid="selectKuaishouLaunchCreativeRecordVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertKuaishouLaunchCreativeRecord" parameterType="com.ruixuan.launch.entity.KuaishouLaunchCreativeRecord">
|
|
|
+ insert into kuaishou_launch_creative_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="accountId != null">account_id,</if>
|
|
|
+ <if test="campaignId != null">campaign_id,</if>
|
|
|
+ <if test="unitId != null">unit_id,</if>
|
|
|
+ <if test="creativeId != null">creative_id,</if>
|
|
|
+ <if test="strategyId != null">strategy_id,</if>
|
|
|
+ <if test="creativeName != null">creative_name,</if>
|
|
|
+ <if test="statDate != null">stat_date,</if>
|
|
|
+ <if test="coverUrl != null">cover_url,</if>
|
|
|
+ <if test="coverWidth != null">cover_width,</if>
|
|
|
+ <if test="coverHeight != null">cover_height,</if>
|
|
|
+ <if test="photoId != null">photo_id,</if>
|
|
|
+ <if test="creativeMaterialType != null">creative_material_type,</if>
|
|
|
+ <if test="actionBar != null">action_bar,</if>
|
|
|
+ <if test="recommendation != null">recommendation,</if>
|
|
|
+ <if test="description != null">description,</if>
|
|
|
+ <if test="newExposeText != null">new_expose_text,</if>
|
|
|
+ <if test="newExposeUrl != null">new_expose_url,</if>
|
|
|
+ <if test="liveCreativeType != null">live_creative_type,</if>
|
|
|
+ <if test="message != null">message,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="accountId != null">#{accountId},</if>
|
|
|
+ <if test="campaignId != null">#{campaignId},</if>
|
|
|
+ <if test="unitId != null">#{unitId},</if>
|
|
|
+ <if test="creativeId != null">#{creativeId},</if>
|
|
|
+ <if test="strategyId != null">#{strategyId},</if>
|
|
|
+ <if test="creativeName != null">#{creativeName},</if>
|
|
|
+ <if test="statDate != null">#{statDate},</if>
|
|
|
+ <if test="coverUrl != null">#{coverUrl},</if>
|
|
|
+ <if test="coverWidth != null">#{coverWidth},</if>
|
|
|
+ <if test="coverHeight != null">#{coverHeight},</if>
|
|
|
+ <if test="photoId != null">#{photoId},</if>
|
|
|
+ <if test="creativeMaterialType != null">#{creativeMaterialType},</if>
|
|
|
+ <if test="actionBar != null">#{actionBar},</if>
|
|
|
+ <if test="recommendation != null">#{recommendation},</if>
|
|
|
+ <if test="description != null">#{description},</if>
|
|
|
+ <if test="newExposeText != null">#{newExposeText},</if>
|
|
|
+ <if test="newExposeUrl != null">#{newExposeUrl},</if>
|
|
|
+ <if test="liveCreativeType != null">#{liveCreativeType},</if>
|
|
|
+ <if test="message != null">#{message},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateKuaishouLaunchCreativeRecord" parameterType="com.ruixuan.launch.entity.KuaishouLaunchCreativeRecord">
|
|
|
+ update kuaishou_launch_creative_record
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="accountId != null">account_id = #{accountId},</if>
|
|
|
+ <if test="campaignId != null">campaign_id = #{campaignId},</if>
|
|
|
+ <if test="unitId != null">unit_id = #{unitId},</if>
|
|
|
+ <if test="creativeId != null">creative_id = #{creativeId},</if>
|
|
|
+ <if test="strategyId != null">strategy_id = #{strategyId},</if>
|
|
|
+ <if test="creativeName != null">creative_name = #{creativeName},</if>
|
|
|
+ <if test="statDate != null">stat_date = #{statDate},</if>
|
|
|
+ <if test="coverUrl != null">cover_url = #{coverUrl},</if>
|
|
|
+ <if test="coverWidth != null">cover_width = #{coverWidth},</if>
|
|
|
+ <if test="coverHeight != null">cover_height = #{coverHeight},</if>
|
|
|
+ <if test="photoId != null">photo_id = #{photoId},</if>
|
|
|
+ <if test="creativeMaterialType != null">creative_material_type = #{creativeMaterialType},</if>
|
|
|
+ <if test="actionBar != null">action_bar = #{actionBar},</if>
|
|
|
+ <if test="recommendation != null">recommendation = #{recommendation},</if>
|
|
|
+ <if test="description != null">description = #{description},</if>
|
|
|
+ <if test="newExposeText != null">new_expose_text = #{newExposeText},</if>
|
|
|
+ <if test="newExposeUrl != null">new_expose_url = #{newExposeUrl},</if>
|
|
|
+ <if test="liveCreativeType != null">live_creative_type = #{liveCreativeType},</if>
|
|
|
+ <if test="message != null">message = #{message},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteKuaishouLaunchCreativeRecordById" parameterType="String">
|
|
|
+ delete
|
|
|
+ from kuaishou_launch_creative_record
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteKuaishouLaunchCreativeRecordByIds" parameterType="String">
|
|
|
+ delete from kuaishou_launch_creative_record where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|