2 Commit-ok 0c98efa3e3 ... b14731a593

Szerző SHA1 Üzenet Dátum
  renyupeng0920 b14731a593 n 3 hete
  renyupeng0920 d1a155abe0 n 1 hónapja

+ 6 - 2
Apietl/kwai_etl/report/AppKuaiShouAgentReport.py

@@ -108,8 +108,12 @@ report.industry,
 report.second_industry,
 report.union_event_pay_purchase_amount_7d,
 report.union_event_pay_purchase_amount_7d_roi
-from (select * from media_api.kuaishou_agent_report_daily where stat_date={date_time}) report
-LEFT JOIN (
+from (select * from media_api.kuaishou_agent_report_daily where stat_date={date_time}
+and  advertiser_id in(
+select advertiser_id from media_api.kuaishou_account_report_daily where stat_date={date_time}
+and charge>0
+) report
+inner JOIN (
 SELECT
 cua.account_id id,
 cua.account_id account_id,

+ 2 - 2
Apietl/test/project_material_report.py

@@ -27,7 +27,7 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-        select project_id,replace(project_name,'/','-') from application.kuaishou_account_report_daily_dw  where  stat_date>=20250101 and stat_date<=20250331
+        select project_id,replace(project_name,'/','-') from application.kuaishou_account_report_daily_dw  where  stat_date>=20250601 and stat_date<=20250630
 and charge>0 and project_id is not null
 group by project_id
         """
@@ -70,7 +70,7 @@ END) as '公司',
 application.kuaishou_material_video_report_daily_dw a
 left join `jeecg-boot`.sys_user b
 on a.user_id=b.id
-where stat_date>=20250101 and stat_date<=20250331 and project_id={project_id}
+where stat_date>=20250601 and stat_date<=20250630 and project_id={project_id}
 group by signature) a
 left join
 application.material_farst_cost_time b

+ 4 - 3
Apietl/test/toutiaoproject_material_image_report.py

@@ -28,7 +28,8 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20250101 and stat_datetime<=20250331
+    select project_id,project_name from application.bytedance_advertiser_report_daily_dw    where stat_datetime >= 20250601
+  and stat_datetime <= 20250630
 and cost>0 and project_id is not null
 group by project_id
         """
@@ -47,8 +48,8 @@ select project_name,
                        ''), '9', '') as aa,
         cost
 from application.bytedance_material_image_report_daily_dw
-where stat_datetime >= 20250101
-  and stat_datetime <= 20250331
+where stat_datetime >= 20250601
+  and stat_datetime <= 20250630
   and project_id={project_id}
     and cost>0
 )t

+ 2 - 2
Apietl/test/toutiaoproject_material_report.py

@@ -28,7 +28,7 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20250101 and stat_datetime<=20250331
+    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20250601 and stat_datetime<=20250630
 and cost>0 and project_id is not null
 group by project_id
         """
@@ -71,7 +71,7 @@ END) as '公司',
 application.bytedance_material_video_report_daily_dw a
 left join `jeecg-boot`.sys_user b
 on a.user_id=b.id
-where stat_datetime >= 20250101 and stat_datetime<=20250331 and project_id={project_id}
+where stat_datetime>=20250601 and stat_datetime<=20250630 and project_id={project_id}
 group by signature) a
 left join
 application.bytedance_material_farst_cost_time b