yumeng 2 years ago
parent
commit
1174074ecc

+ 5 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml

@@ -5,7 +5,7 @@
     <select id="queryVideoReportBy" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         t1.signature,
-        IFNULL(t2.url,t1.video_url)  AS url,
+        IFNULL(t2.url,t1.video_url) AS url,
         t1.cover_url AS converUrl,
         IFNULL(t1.clip_name,'-') AS clip,
         IFNULL(t1.shot_name,'-') AS shot,
@@ -16,15 +16,16 @@
         DATE_FORMAT(stat_datetime,'%Y-%m-%d') AS createTime,
         sum( t1.SHOW ) AS showMaterial,
         IFNULL(t1.leader_name,'-') AS 'teamLeader',
-        CASE WHEN t1.convert != 0 THEN concat( CAST( round(sum(t1.in_app_pay)/sum(t1.convert)* 100, 2 ) AS CHAR ), '%' ) ELSE '0.00%' end AS 'firstPurchase',
+        CASE WHEN t1.convert != 0 THEN concat( CAST( round(sum(t1.in_app_pay)/sum(t1.convert)* 100, 2 ) AS CHAR ), '%' )
+        ELSE '0.00%' end AS 'firstPurchase',
         ${filed}
         FROM
         application.bytedance_material_video_report_daily_dw t1
         left join (
-        select distinct code,url from ctop_material_info
+        select code,url from ctop_material_info group code
         ) t2 on t1.signature = t2.code
         WHERE
-        t1.stat_datetime >= DATE_FORMAT(#{startDate}, '%Y%m%d' )
+        t1.stat_datetime &gt;= DATE_FORMAT(#{startDate}, '%Y%m%d' )
         AND t1.stat_datetime &lt;= DATE_FORMAT(#{endDate}, '%Y%m%d' )
         <if test="accountIds != null">
             AND t1.account_id in