|
@@ -0,0 +1,125 @@
|
|
|
+<?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.job.live.mapper.KuaishouLiveUnitListMapper">
|
|
|
+
|
|
|
+ <resultMap type="cn.com.ctop.job.live.entity.KuaishouLiveUnitList" id="KuaishouLiveUnitListResult">
|
|
|
+ <result property="accountId" column="account_id"/>
|
|
|
+ <result property="campaignId" column="campaign_id"/>
|
|
|
+ <result property="campaignName" column="campaign_name"/>
|
|
|
+ <result property="unitId" column="unit_id"/>
|
|
|
+ <result property="unitName" column="unit_name"/>
|
|
|
+ <result property="unitCreateTime" column="unit_create_time"/>
|
|
|
+ <result property="reportDate" column="report_date"/>
|
|
|
+ <result property="viewStatus" column="view_status"/>
|
|
|
+ <result property="dayBudget" column="day_budget"/>
|
|
|
+ <result property="campaignType" column="campaign_type"/>
|
|
|
+ <result property="ocpxActionType" column="ocpx_action_type"/>
|
|
|
+ <result property="bidDetail" column="bid_detail"/>
|
|
|
+ <result property="creativeBuildTypeStr" column="creative_build_type_str"/>
|
|
|
+ <result property="speed" column="speed"/>
|
|
|
+ <result property="exploreTools" column="explore_tools"/>
|
|
|
+ <result property="simultaneousOptimizationType" column="simultaneous_optimization_type"/>
|
|
|
+ <result property="targetExtend" column="target_extend"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectKuaishouLiveUnitListVo">
|
|
|
+ select account_id,
|
|
|
+ campaign_id,
|
|
|
+ campaign_name,
|
|
|
+ unit_id,
|
|
|
+ unit_name,
|
|
|
+ unit_create_time,
|
|
|
+ report_date,
|
|
|
+ view_status,
|
|
|
+ day_budget,
|
|
|
+ campaign_type,
|
|
|
+ ocpx_action_type,
|
|
|
+ bid_detail,
|
|
|
+ creative_build_type_str,
|
|
|
+ speed,
|
|
|
+ explore_tools,
|
|
|
+ simultaneous_optimization_type,
|
|
|
+ target_extend
|
|
|
+ from kuaishou_live_unit_list
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectKuaishouLiveUnitListList" resultMap="KuaishouLiveUnitListResult">
|
|
|
+ <include refid="selectKuaishouLiveUnitListVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="campaignName != null and campaignName != ''">and campaign_name like concat('%', #{campaignName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>
|
|
|
+ <if test="unitCreateTime != null ">and unit_create_time = #{unitCreateTime}</if>
|
|
|
+ <if test="reportDate != null ">and report_date = #{reportDate}</if>
|
|
|
+ <if test="viewStatus != null ">and view_status = #{viewStatus}</if>
|
|
|
+ <if test="dayBudget != null ">and day_budget = #{dayBudget}</if>
|
|
|
+ <if test="campaignType != null and campaignType != ''">and campaign_type = #{campaignType}</if>
|
|
|
+ <if test="ocpxActionType != null ">and ocpx_action_type = #{ocpxActionType}</if>
|
|
|
+ <if test="bidDetail != null and bidDetail != ''">and bid_detail = #{bidDetail}</if>
|
|
|
+ <if test="creativeBuildTypeStr != null and creativeBuildTypeStr != ''">and creative_build_type_str =
|
|
|
+ #{creativeBuildTypeStr}
|
|
|
+ </if>
|
|
|
+ <if test="speed != null ">and speed = #{speed}</if>
|
|
|
+ <if test="exploreTools != null and exploreTools != ''">and explore_tools = #{exploreTools}</if>
|
|
|
+ <if test="simultaneousOptimizationType != null and simultaneousOptimizationType != ''">and
|
|
|
+ simultaneous_optimization_type = #{simultaneousOptimizationType}
|
|
|
+ </if>
|
|
|
+ <if test="targetExtend != null and targetExtend != ''">and target_extend = #{targetExtend}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectKuaishouLiveUnitListByAccountId" parameterType="Long" resultMap="KuaishouLiveUnitListResult">
|
|
|
+ <include refid="selectKuaishouLiveUnitListVo"/>
|
|
|
+ where account_id = #{accountId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="replaceBatch">
|
|
|
+ replace into kuaishou_live_unit_list(
|
|
|
+ account_id,
|
|
|
+ campaign_id,
|
|
|
+ campaign_name,
|
|
|
+ unit_id,
|
|
|
+ unit_name,
|
|
|
+ unit_create_time,
|
|
|
+ report_date,
|
|
|
+ view_status,
|
|
|
+ day_budget,
|
|
|
+ campaign_type,
|
|
|
+ ocpx_action_type,
|
|
|
+ bid_detail,
|
|
|
+ creative_build_type_str,
|
|
|
+ speed,
|
|
|
+ explore_tools,
|
|
|
+ simultaneous_optimization_type,
|
|
|
+ target_extend
|
|
|
+
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="report" separator=",">
|
|
|
+ (
|
|
|
+ #{report.accountId},
|
|
|
+ #{report.campaignId},
|
|
|
+ #{report.campaignName},
|
|
|
+ #{report.unitId},
|
|
|
+ #{report.unitName},
|
|
|
+ #{report.unitCreateTime},
|
|
|
+ #{report.reportDate},
|
|
|
+ #{report.viewStatus},
|
|
|
+ #{report.dayBudget},
|
|
|
+ #{report.campaignType},
|
|
|
+ #{report.ocpxActionType},
|
|
|
+ #{report.bidDetail},
|
|
|
+ #{report.creativeBuildTypeStr},
|
|
|
+ #{report.speed},
|
|
|
+ #{report.exploreTools},
|
|
|
+ #{report.simultaneousOptimizationType},
|
|
|
+ #{report.targetExtend}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+</mapper>
|