Explorar el Código

项目自动化调试,优化应用sql

zhaoxian hace 4 años
padre
commit
84349609b1

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/KuaishouProjectStrategyMapper.xml

@@ -67,7 +67,7 @@
             IFNULL(ROUND(SUM(t2.charge)/SUM(t2.aclick)*1000,2),0) as 'impression1kCost',
             IFNULL(ROUND(SUM(t2.charge)/SUM(t2.photo_click),2),0) as 'photoClickCost',
             IFNULL(ROUND(SUM(t2.charge)/SUM(t2.bclick),2),0) as 'actionCost',
-            t2.create_time as 'createTime'
+            (SELECT MIN(stat_date) FROM ctop_kuaishou_report_daily_account where account_id = t1.account_id AND charge >0) as 'statDate'
         FROM ctop_user_allocation t1
                  LEFT JOIN ctop_etl_kuaishou_report_account_daily t2 ON t2.account_id = t1.account_id
                  LEFT JOIN ctop_project t3 ON t1.project_id = t3.id