|
@@ -211,17 +211,24 @@
|
|
|
update etl_report_bytedance_video set plan_id=#{planId},plan_name=#{planName} where md5=#{md5}
|
|
|
</update>
|
|
|
<update id="updateDesignTeamLeader">
|
|
|
- update etl_report_bytedance_video video left join ctop_material_ascription su on video.clip_id = su.clip_id
|
|
|
- set video.team_leader = su.leader_name
|
|
|
- where video.clip_id is not null
|
|
|
- and video.team_leader is null
|
|
|
- and su.leader_name is not null
|
|
|
- and su.leader_name != ''
|
|
|
+ UPDATE etl_report_bytedance_video t1
|
|
|
+SET t1.team_leader = (
|
|
|
+ SELECT
|
|
|
+ leader_name
|
|
|
+ FROM
|
|
|
+ ctop_material_ascription
|
|
|
+ WHERE
|
|
|
+ material_id = t1.md5
|
|
|
+limit 1
|
|
|
+) WHERE t1.stat_datetime >= #{date}
|
|
|
+AND t1.team_leader is not NULL
|
|
|
+AND t1.team_leader != '';
|
|
|
</update>
|
|
|
<update id="updateTeamLeader">
|
|
|
update etl_report_bytedance_video video left join sys_user su on video.clip_id = su.id
|
|
|
set video.team_leader = su.leader_name
|
|
|
- where video.clip_id is not null
|
|
|
+ where video.stat_datetime >= #{date}
|
|
|
+ and video.clip_id is not null
|
|
|
and su.leader_name is not null
|
|
|
and video.team_leader is null
|
|
|
and su.leader_name != ''
|
|
@@ -234,7 +241,7 @@
|
|
|
and stat_datetime = #{video.statDatetime}
|
|
|
and account_id = #{video.accountId} and id!=#{video.id};
|
|
|
</delete>
|
|
|
- <select id="queryVideoInfoByMaterialId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryVideoInfoByMaterialId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
signature AS md5,
|
|
|
video_url AS url
|
|
@@ -244,7 +251,7 @@
|
|
|
material_id = #{materialId}
|
|
|
limit 1
|
|
|
</select>
|
|
|
- <select id="queryMaterialVideoByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryMaterialVideoByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
`name` as materialName,
|
|
|
url,
|
|
@@ -256,7 +263,7 @@
|
|
|
md5 = #{md5}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
- <select id="queryMaterialVideoByMd5Old" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryMaterialVideoByMd5Old" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
material_name as materialName,
|
|
|
url,
|
|
@@ -268,7 +275,7 @@
|
|
|
code = #{md5}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
- <select id="queryRelatePersonByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryRelatePersonByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
clip_id clipId,
|
|
|
clip_name clipaname,
|
|
@@ -282,7 +289,7 @@
|
|
|
video_md5 = #{md5}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
- <select id="queryRelatePersonByMd5Old" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryRelatePersonByMd5Old" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
clip_id clipId,
|
|
|
(select realname from sys_user where id=clip_id) as clipName,
|
|
@@ -296,7 +303,7 @@
|
|
|
code = #{md5}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
- <select id="queryAccountDetailByAccountId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="queryAccountDetailByAccountId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
t1.advertiser_id as advertiserId,
|
|
|
(SELECT `name` from ctop_advertiser where id=t1.advertiser_id limit 1) as advertiserName,
|
|
@@ -310,7 +317,7 @@
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryETLData" resultType="cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo">
|
|
|
+ <select id="queryETLData" resultType="cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo">
|
|
|
SELECT
|
|
|
t1.*,
|
|
|
t3.clip_id clipId,
|
|
@@ -355,10 +362,11 @@
|
|
|
etl_report_bytedance_video video
|
|
|
LEFT JOIN ctop_material_ascription cmi ON video.md5 = cmi.
|
|
|
CODE LEFT JOIN sys_user u ON u.id = cmi.clip_id
|
|
|
- WHERE
|
|
|
- cmi.clip_id IS NOT NULL
|
|
|
+ WHERE video.stat_datetime >= #{date}
|
|
|
+ and cmi.clip_id IS NOT NULL
|
|
|
AND video.clip_id = ''
|
|
|
AND u.realname IS NOT NULL
|
|
|
+
|
|
|
</select>
|
|
|
<select id="getBytedanceVideoShotInfo"
|
|
|
resultType="cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo">
|