renyupeng vor 3 Jahren
Ursprung
Commit
22801f0a1b

+ 3 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouVideoReportBusi.py

@@ -21,8 +21,9 @@ class AppKuaishouVideoReportBusi:
 
     def taskHandler(self):
         try:
-            sql_porject = """select account_id from `jeecg-boot`.ctop_user_allocation where media_id=2
-group by account_id """
+            sql_porject = """select advertiser_id from media_api.kuaishou_material_video_report_daily 
+where  stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')
+group by advertiser_id """.format(date_time=self.date_time,day_count=self.day_count)
             account_list = TidbConn.quary(self.conn, sql_porject)
             for account_id in account_list:
                 try:

+ 3 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouVideoReportBusiMonth.py

@@ -21,8 +21,9 @@ class AppKuaishouVideoReportBusiMonth:
 
     def taskHandler(self):
         try:
-            sql_porject = """select account_id from `jeecg-boot`.ctop_user_allocation where media_id=2
-group by account_id """
+            sql_porject = """select advertiser_id from media_api.kuaishou_material_video_report_daily 
+            where  stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count})  DAY),'%Y%m%d')
+            group by advertiser_id """.format(date_time=self.date_time,day_count=self.day_count)
             account_list = TidbConn.quary(self.conn, sql_porject)
             for account_id in account_list:
                 try: