|
@@ -5,18 +5,17 @@
|
|
<select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
|
|
SELECT * from (SELECT
|
|
SELECT * from (SELECT
|
|
t1.signature,
|
|
t1.signature,
|
|
- t2.url,
|
|
|
|
|
|
+ t1.video_url as url,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1),'') AS clip,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1),'') AS clip,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1),'') AS shot,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1),'') AS shot,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1),'') AS plan,
|
|
IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1),'') AS plan,
|
|
- t2.cover_url as converUrl,
|
|
|
|
- t2.material_name AS materialName,
|
|
|
|
|
|
+ (select t2.cover_url from ctop_material_info t2 where t2.code=t1.signature limit 1) AS converUrl,
|
|
|
|
+ (select t2.material_name from ctop_material_info t2 where t2.code=t1.signature limit 1) AS materialName,
|
|
(SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
|
|
(SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
|
|
- t2.create_time as createTime,
|
|
|
|
|
|
+ (select t2.create_time from ctop_material_info t2 where t2.code=t1.signature limit 1) as createTime,
|
|
${filed}
|
|
${filed}
|
|
FROM
|
|
FROM
|
|
ctop_bytedance_video_report_daily t1
|
|
ctop_bytedance_video_report_daily t1
|
|
- left join ctop_material_info t2 on t1.signature=t2.code
|
|
|
|
LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
|
|
LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
|
|
WHERE
|
|
WHERE
|
|
t1.stat_datetime >= #{startDate}
|
|
t1.stat_datetime >= #{startDate}
|
|
@@ -28,7 +27,6 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- AND t2.url!=""
|
|
|
|
GROUP BY t1.signature
|
|
GROUP BY t1.signature
|
|
) t
|
|
) t
|
|
WHERE (t.clip LIKE '%${clip}%')
|
|
WHERE (t.clip LIKE '%${clip}%')
|
|
@@ -41,9 +39,9 @@
|
|
SELECT
|
|
SELECT
|
|
t1.stat_datetime as statDate,
|
|
t1.stat_datetime as statDate,
|
|
t1.signature,
|
|
t1.signature,
|
|
- t2.url,
|
|
|
|
- t2.cover_url as converUrl,
|
|
|
|
- t2.material_name AS materialName,
|
|
|
|
|
|
+ t1.video_url as url,
|
|
|
|
+ (select t2.cover_url from ctop_material_info t2 where t2.code=t1.signature limit 1) AS converUrl,
|
|
|
|
+ (select t2.material_name from ctop_material_info t2 where t2.code=t1.signature limit 1) AS materialName,
|
|
(
|
|
(
|
|
SELECT
|
|
SELECT
|
|
project_name
|
|
project_name
|
|
@@ -60,11 +58,10 @@
|
|
WHERE
|
|
WHERE
|
|
t4.id = t3.project_id limit 1
|
|
t4.id = t3.project_id limit 1
|
|
) AS advertiserName,
|
|
) AS advertiserName,
|
|
- t2.create_time as createTime,
|
|
|
|
|
|
+ (select t2.create_time from ctop_material_info t2 where t2.code=t1.signature limit 1) as createTime,
|
|
${filed}
|
|
${filed}
|
|
FROM
|
|
FROM
|
|
ctop_bytedance_video_report_daily t1
|
|
ctop_bytedance_video_report_daily t1
|
|
- left join ctop_material_info t2 on t1.signature=t2.code
|
|
|
|
LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
|
|
LEFT JOIN ctop_user_allocation t3 ON t3.account_id=t1.account_id
|
|
WHERE t1.signature=#{signature}
|
|
WHERE t1.signature=#{signature}
|
|
AND t1.stat_datetime >= #{startDate}
|
|
AND t1.stat_datetime >= #{startDate}
|
|
@@ -76,7 +73,6 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- AND t2.url!=""
|
|
|
|
GROUP BY t1.signature,t1.stat_datetime
|
|
GROUP BY t1.signature,t1.stat_datetime
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|