From 56da9aa4341432e3c4ca977a02bd52d3b27f7bd9 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Jul 2024 10:48:23 +0800 Subject: [PATCH] =?UTF-8?q?add=20workflow=20=E5=A4=A9=E6=B6=A6Smart-ccc?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=95=B0=E6=8D=AE,dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../获取工单记录列表/tickets_list_feign.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py b/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py index 16eae62..16b0a20 100644 --- a/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py +++ b/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py @@ -72,15 +72,19 @@ def request_data_signature_post(): url_param = build_query_string(param) print(f'url_param: {url_param}') url_param = f'POSTapi-bj.clink.cn/ticket/list_ticket?{url_param}' - print(f'url_param2: {url_param}') + print(f'待计算字符串: {url_param}') signature= generate_signature(url_param,'5g027B6w06630Y5240c1') - print(f'signature: {signature}') - url = f'{url}?{url_path}&Signature={signature}' + print(f'计算签名: {signature}') + print(f'编码后签名: {urllib.parse.quote_plus(signature)}') + url = f'{url}?{url_path}&Signature={urllib.parse.quote_plus(signature)}' print(f'url: {url}') + body={'endTime':formatted2_previous_hour(1),'startTime':'2024-01-01 00:00:00'} #body={'endTime':formatted2_previous_hour(0),'startTime':formatted2_previous_hour(1)} - print(f'body: {body}') - dataReqL=requests.post(url,headers=header,data=json.dumps(body)) + jsonData = json.dumps(body) + print(f'body: {jsonData}') + dataReqL=requests.post(url,headers=header,data=jsonData) + i = 0 while 'error' in dataReqL and i < 5: time.sleep(1)