|
@@ -226,16 +226,15 @@
|
|
|
|
|
|
<select id="queryBytedanceTopMaterial" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
- t1.md5 signature,
|
|
|
- IFNULL(t1.toutiao_url, '') AS url,
|
|
|
- t1.cover_url AS coverUrl,
|
|
|
- t1.material_name AS materialName,
|
|
|
- sum(t1.cost) as cost,
|
|
|
- (SELECT GROUP_CONCAT(tag_name) from ctop_material_tag_info where code=t1.md5 and status=1) as tag
|
|
|
+ t1.*,
|
|
|
+ IFNULL((SELECT GROUP_CONCAT(tag_name) from ctop_material_tag_info where code=signature and status=1),"塑造") as tag
|
|
|
FROM
|
|
|
- etl_report_bytedance_video t1
|
|
|
- WHERE
|
|
|
- 1=1
|
|
|
+ (SELECT md5 signature,
|
|
|
+ IFNULL(toutiao_url, '') AS url,
|
|
|
+ cover_url AS coverUrl,
|
|
|
+ material_name AS materialName,
|
|
|
+ sum(cost) AS cost from etl_report_bytedance_video
|
|
|
+ where 1=1
|
|
|
<if test="projects !=null">
|
|
|
AND project_id IN
|
|
|
<foreach collection="projects" item="item" separator=","
|
|
@@ -245,9 +244,11 @@
|
|
|
</if>
|
|
|
AND stat_datetime >= #{startDate}
|
|
|
AND stat_datetime <= #{endDate}
|
|
|
- GROUP BY t1.md5
|
|
|
- ORDER BY cost desc
|
|
|
- limit 5
|
|
|
+ AND md5!=''
|
|
|
+ GROUP BY md5
|
|
|
+ ORDER BY cost DESC
|
|
|
+ LIMIT 5) t1
|
|
|
+ ORDER BY cost DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="queryBytedanceMaterialReport" resultType="com.alibaba.fastjson.JSONObject">
|