|
@@ -2,6 +2,40 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="cn.com.ctop.toutiao.modules.report.mapper.EtlBytedanceReportVideoDailyMapper">
|
|
|
|
|
|
+ <select id="getCtopMaterialAscriptionInfo" resultType="cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo">
|
|
|
+ SELECT DISTINCT
|
|
|
+ md5,
|
|
|
+ cma.clip_id,
|
|
|
+ cma.clip_name,
|
|
|
+ cma.shot_id,
|
|
|
+ cma.shot_name,
|
|
|
+ cma.plan_id,
|
|
|
+ cma.plan_name
|
|
|
+ FROM
|
|
|
+ etl_report_bytedance_video video
|
|
|
+ LEFT JOIN ctop_material_ascription cma ON cma. CODE = video.md5
|
|
|
+ where
|
|
|
+ cma.clip_id is not null or
|
|
|
+ cma.clip_name is not null or
|
|
|
+ cma.shot_id is not null or
|
|
|
+ cma.shot_name is not null or
|
|
|
+ cma.plan_id is not null or
|
|
|
+ cma.plan_name is not null;
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateOneBytedanceVideoInfo" parameterType="cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo">
|
|
|
+ UPDATE etl_report_bytedance_video
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="etlReportBytedanceVideo.clipId!=null">clip_id=#{etlReportBytedanceVideo.clipId},</if>
|
|
|
+ <if test="etlReportBytedanceVideo.clipName!=null">clip_name=#{etlReportBytedanceVideo.clipName},</if>
|
|
|
+ <if test="etlReportBytedanceVideo.shotId!=null">shot_id=#{etlReportBytedanceVideo.shotId},</if>
|
|
|
+ <if test="etlReportBytedanceVideo.shotName!=null">shot_name=#{etlReportBytedanceVideo.shotName},</if>
|
|
|
+ <if test="etlReportBytedanceVideo.planId!=null">plan_id=#{etlReportBytedanceVideo.planId},</if>
|
|
|
+ <if test="etlReportBytedanceVideo.planName!=null">plan_name=#{etlReportBytedanceVideo.planName},</if>
|
|
|
+ </trim>
|
|
|
+ WHERE md5=#{etlReportBytedanceVideo.md5}
|
|
|
+ </update>
|
|
|
+
|
|
|
|
|
|
<select id="getBytedanceVideoInfo" resultType="java.util.Map">
|
|
|
SELECT
|