|
@@ -123,11 +123,12 @@ def get_hs_order_task(start, end, account):
|
|
|
|
|
|
channel_data = response_result_json['data']
|
|
channel_data = response_result_json['data']
|
|
|
|
|
|
- print(f"花生账号:{account[2]} 有channel{len(channel_data)}个:{str([i['merchant_name'] for i in channel_data])}")
|
|
|
|
|
|
+ # print(f"{account[2]} 有channel{len(channel_data)}个:{str([i['merchant_name'] for i in channel_data])}")
|
|
|
|
|
|
li = []
|
|
li = []
|
|
for merchant in channel_data:
|
|
for merchant in channel_data:
|
|
- get_huasheng_order(start, end, account, merchant, li)
|
|
|
|
|
|
+ orders = get_huasheng_order(start, end, account, merchant)
|
|
|
|
+ li.extend(orders)
|
|
|
|
|
|
if len(li) > 0:
|
|
if len(li) > 0:
|
|
print(f"花生账号:{account[2]} 有order{len(li)}个")
|
|
print(f"花生账号:{account[2]} 有order{len(li)}个")
|
|
@@ -137,8 +138,8 @@ def get_hs_order_task(start, end, account):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-def get_huasheng_order(start,end, account, merchant,li):
|
|
|
|
-
|
|
|
|
|
|
+def get_huasheng_order(start,end, account, merchant):
|
|
|
|
+ li =[]
|
|
apiKey = str(account[0])
|
|
apiKey = str(account[0])
|
|
apiSecurity = account[1]
|
|
apiSecurity = account[1]
|
|
stage = account[2]
|
|
stage = account[2]
|
|
@@ -169,6 +170,7 @@ def get_huasheng_order(start,end, account, merchant,li):
|
|
|
|
|
|
response_result_json = r.json()
|
|
response_result_json = r.json()
|
|
|
|
|
|
|
|
+
|
|
if 'data' not in response_result_json.keys():
|
|
if 'data' not in response_result_json.keys():
|
|
print('花生账号【{key}】, 查询时间【{date}】, 渠道【{merchant_id}:{merchant_name}】本次请求数据异常,响应报文【{result}】'
|
|
print('花生账号【{key}】, 查询时间【{date}】, 渠道【{merchant_id}:{merchant_name}】本次请求数据异常,响应报文【{result}】'
|
|
.format(key=apiKey, date=date, merchant_id=merchant_id, merchant_name=merchant_name,
|
|
.format(key=apiKey, date=date, merchant_id=merchant_id, merchant_name=merchant_name,
|
|
@@ -203,7 +205,7 @@ def get_huasheng_order(start,end, account, merchant,li):
|
|
break
|
|
break
|
|
else:
|
|
else:
|
|
page = page + 1
|
|
page = page + 1
|
|
-
|
|
|
|
|
|
+ return li
|
|
|
|
|
|
|
|
|
|
def save_hs_data(data):
|
|
def save_hs_data(data):
|