ck 4 years ago
parent
commit
645946ff37
2 changed files with 4 additions and 1 deletions
  1. 4 1
      app/api_data/order_util.py
  2. 0 0
      app/api_data/platform_order/__init__.py

+ 4 - 1
app/api_data/order_util.py

@@ -503,7 +503,8 @@ def get_zzy_order_task(start, end, account):
         order_list = get_zzy_channel_order(start, end, account, channel)
         total_order_list.extend(order_list)
     print(f"{stage} [{start}]~[{end}] 有订单{total_order_list.__len__()}")
-    if total_order_list > 0:
+
+    if len(total_order_list) > 0:
         save_order(total_order_list)
 
 
@@ -531,7 +532,9 @@ def get_zzy_channel_order(start, end, account, channel):
         params = 'channel_id=' + str(channel_id) + '&' + gte + '&' + lt + '&page=' + str(
             page) + '&per_page=' + per_page + '&status=' + status + '&key=' + key + '&sign=' + sign
         while True:
+
             r = requests.get(order_url + params)
+
             if r.status_code == 200:
                 response_result_json = r.json()
                 break

+ 0 - 0
app/api_data/platform_order/__init__.py