Ver Fonte

MOD:添加订单类型,

cxyu há 3 anos atrás
pai
commit
83ac7bcd22

+ 3 - 3
app/api_data/platform_order/order_data_change.py

@@ -26,7 +26,7 @@ def insert_order_data(ymd):
     left join db_mp.mp_mp_conf c on b.advertiser_conf_id =c.id 
     left join db_mp.h_game d on a.app_id =d.id 
     left join db_mp.h_member f on a.mem_id = f.id
-    where c.`type` =7
+    where c.`type` in (6,7)
     and a.create_time<{timestamp_tom} and a.create_time>{timestamp_ymd}
     '''
     # print(sql)
@@ -48,8 +48,8 @@ def insert_order_data_hourly():
 
 
 def insert_order_data_daily():
-    for i in du.getDateLists(du.get_n_days(-10), du.get_n_days(0)):
-        # print(i)
+    for i in du.getDateLists(du.get_n_days(-40), du.get_n_days(0)):
+        print(i)
         insert_order_data(i)
 
 

+ 2 - 1
app/etl/data_stat_run.py

@@ -80,7 +80,8 @@ if __name__ == '__main__':
         level=logging.INFO,
         format="%(asctime)s - %(levelname)s %(filename)s %(funcName)s %(lineno)s - %(message)s"
     )
-    hourly()
+    main(du.get_n_days(-200), du.getNow())
+    # hourly()
     # daily()
     # daily('2021-06-30','2021-07-04')
 

+ 2 - 1
app/etl/data_stat_task.py

@@ -298,7 +298,8 @@ if __name__ == '__main__':
     # channel_info_daily('2021-02-06')
 
     # channel_by_account_daily('2021-02-05')
-    for i in dt.getDateLists('2021-04-08', '2021-10-27'):
+    for i in dt.getDateLists('2021-09-18', '2021-10-28'):
+        print(i)
         # channel_info_daily(i)
 
         dw_daily_channel_cost(i)

+ 1 - 0
app/etl/dw/dw_book_trend.py

@@ -38,6 +38,7 @@ def book_trend():
     from dw_channel a 
     left join dw_channel_amount_daily b on a.dt=b.dt and a.channel=b.channel 
     left join dw_channel_amount_daily_reverse c on a.dt=c.dt and a.channel=c.channel 
+    where book !=''
     GROUP BY dt,book,type"""
 
 

+ 1 - 1
app/etl/sync_to_ck_task.py

@@ -74,7 +74,7 @@ def campaign_vx():
 if __name__ == '__main__':
     # order_sync_ck('2021-06-03')
     # dw_order_channel_cost_sync_ck(dt.get_n_days(-2))
-    for i in dt.getDateLists('2021-03-19','2021-10-26'):
+    for i in dt.getDateLists('2021-03-19','2021-10-28'):
     # #     order(i)
     #     dw_order_channel_sync_ck(i)
         print(i)