ck 4 tahun lalu
induk
melakukan
b6fd826662
3 mengubah file dengan 9 tambahan dan 7 penghapusan
  1. 4 2
      app/api_data/get_order.py
  2. 1 1
      app/etl/data_stat_run.py
  3. 4 4
      app/etl/data_stat_task.py

+ 4 - 2
app/api_data/get_order.py

@@ -214,6 +214,8 @@ def daily():
     wending(st, et)
     zhangdu(st, et)
     zhangzhongyun(st, et)
+    yueweng(st, et)
+    youshuge(st, et)
 
 
 def daily_yg():
@@ -236,5 +238,5 @@ if __name__ == '__main__':
     # zhangdu('2020-11-01', '2020-12-20')
 
     # zhangzhongyun('2021-04-01', '2021-04-21')
-    youshuge()
-    # yueweng()
+    # youshuge()
+    yueweng()

+ 1 - 1
app/etl/data_stat_run.py

@@ -4,7 +4,7 @@ from model.DingTalkUtils import DingTalkUtils
 from data_stat_task import *
 from sync_to_ck_task import *
 from app.etl.dm.dm_pitcher_daily_overview import dm_pitcher_daily_overview
-from app.etl.dw.dw_channel_daily import dw_daily_channel,dw_channel
+from app.etl.dw.dw_channel_daily import dw_channel
 from app.etl.dw.dw_pitcher_daily import dw_pitcher_trend
 from app.etl.src.src_book_info import src_book_info
 from app.etl.dw.dw_book_trend import book_trend

+ 4 - 4
app/etl/data_stat_task.py

@@ -165,7 +165,7 @@ def ods_order(dt):
             case when platform='掌中云' then DATE_FORMAT(STR_TO_DATE(reg_time,'%Y-%m-%dT%H:%i:%s'),'%Y-%m-%d %H:%i:%s') 
             when platform='掌读' then from_unixtime(reg_time, '%Y-%m-%d %H:%i:%s') 
             ELSE reg_time end reg_time,
-			amount,from_novel,order_id from `order` where date=UNIX_TIMESTAMP('{}')
+			amount,from_novel,order_id,2 from `order` where date=UNIX_TIMESTAMP('{}')
 			""".format(dt)
     db.quchen_text.execute(sql)
 
@@ -178,10 +178,10 @@ def order_account_text():
             db.quchen_text.execute("insert into order_account_text(platform,text) values ('文鼎','{}')".format(i))
 
 if __name__ == '__main__':
-    channel_info_daily('2021-02-06')
+    # channel_info_daily('2021-02-06')
 
-    channel_by_account_daily('2021-02-05')
+    # channel_by_account_daily('2021-02-05')
     # for i in dt.getDateLists('2020-04-23','2021-02-05'):
     #     print(i)
     #     dw_daily_channel_cost(i)
-
+    ods_order('2021-05-06')