ck 4 anos atrás
pai
commit
fe43e906a1
2 arquivos alterados com 18 adições e 2 exclusões
  1. 15 2
      app/api_data/get_order.py
  2. 3 0
      app/api_data/order_util.py

+ 15 - 2
app/api_data/get_order.py

@@ -139,6 +139,19 @@ def zhangzhongyun(start=None,end=None,new=None):
     executor.shutdown()
 
 
+def yueweng(start=None,end=None,new=None):
+    if start is None:
+        start = end = du.getNow()
+
+    executor = ThreadPoolExecutor(max_workers=5)
+    accounts = get_account("阅文") if new is None else get_new_account('阅文')
+    if len(accounts) == 0:
+        return
+    else:
+        print(f'阅文有账号{len(accounts)}个')
+    for account in accounts:
+        executor.submit(get_yueweng_order_task,start, end, account)
+    executor.shutdown()
 
 
 
@@ -171,6 +184,6 @@ if __name__ == '__main__':
     # qiyue()
     # wending()
 
-    # zhangdu('2020-12-20','2021-02-22')
-    zhangzhongyun('2021-02-10', '2021-02-23')
+    zhangdu('2020-11-01', '2020-12-20')
+    # zhangzhongyun('2020-11-01', '2021-02-23')
     """要是只跑一个账号 把 get_yg_acccount() 里面的sql where 条件加上 id=xxx"""

+ 3 - 0
app/api_data/order_util.py

@@ -571,5 +571,8 @@ def get_zzy_channel_order(start, end, account, channel):
     return order_list
 
 
+def get_yueweng_order_task(start, end, account):
+    pass
+
 if __name__ == '__main__':
     get_qiyue_order_task('2021-02-01','2021-02-19',['趣程15期','eyJpdiI6ImluVWxoRUl3VTR6QU5hamlYOFBvXC9BPT0iLCJ2YWx1ZSI6Ik5IZ0N4dm5GcmJ0Zklsd0tNZ1JVSVE9PSIsIm1hYyI6IjJjODUzMjdlZTc2ODI2ZjFmY2QyYmU5MGViYTkzOGU4MDEwZTIyODIxOTE4NzgzYTNhOGQ1YWM4OGJkMDAzMmIifQ=='])