From dfab5adecbacec4696f403c4790a5ca68c5c86d2 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Feb 2025 17:26:49 +0800 Subject: [PATCH] =?UTF-8?q?add=20workflow=20=E5=A4=A9=E6=B6=A6Smart-ccc?= =?UTF-8?q?=E9=80=9A=E8=AF=9D=E8=AE=B0=E5=BD=95,dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../smart_ccc_cdr/查询外呼记录列表/cc_cdr_ob_list_feign.py | 4 +++- .../查询客户来电记录列表/cc_cdr_ib_list_feign.py | 5 ++++- .../查询座席接听记录列表/cc_cdr_ib_agent_list_feign.py | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dev/workflow/TK_Cust/smart_ccc_cdr/查询外呼记录列表/cc_cdr_ob_list_feign.py b/dev/workflow/TK_Cust/smart_ccc_cdr/查询外呼记录列表/cc_cdr_ob_list_feign.py index 5bf7e61..5ad49ab 100644 --- a/dev/workflow/TK_Cust/smart_ccc_cdr/查询外呼记录列表/cc_cdr_ob_list_feign.py +++ b/dev/workflow/TK_Cust/smart_ccc_cdr/查询外呼记录列表/cc_cdr_ob_list_feign.py @@ -61,11 +61,12 @@ def build_query_string(params): ) for k, v in sorted_params.items()) return query_string +current_end_time = previous_hour_timestamp(0) #计算签名,get请求 def request_data_signature_get(offset, pageSize): print(f'开始请求外呼记录数据,偏移量:{offset}') url='https://api-bj.clink.cn/cc/list_cdr_ob' - param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} + param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':current_end_time,'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} # param={'Timestamp':current_time_utc,'Expires':86400,'startTime':1717516800,'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177'} print(f'param: {param}') url_path = build_query_string(param) @@ -177,6 +178,7 @@ if __name__ == "__main__": print(f'{formatted2_previous_hour(0)}开始请求外呼记录列表') offset = 0 pageSize = 100 + current_end_time = previous_hour_timestamp(0) resL = request_data_signature_get(offset, pageSize) print(resL) if 'error' in resL: diff --git a/dev/workflow/TK_Cust/smart_ccc_cdr/查询客户来电记录列表/cc_cdr_ib_list_feign.py b/dev/workflow/TK_Cust/smart_ccc_cdr/查询客户来电记录列表/cc_cdr_ib_list_feign.py index dbe6c57..af72fdb 100644 --- a/dev/workflow/TK_Cust/smart_ccc_cdr/查询客户来电记录列表/cc_cdr_ib_list_feign.py +++ b/dev/workflow/TK_Cust/smart_ccc_cdr/查询客户来电记录列表/cc_cdr_ib_list_feign.py @@ -60,12 +60,14 @@ def build_query_string(params): urllib.parse.quote_plus(str(v)) ) for k, v in sorted_params.items()) return query_string + +current_end_time = previous_hour_timestamp(0) #计算签名,get请求 def request_data_signature_get(offset, pageSize): print(f'开始请求客服来电记录数据') url='https://api-bj.clink.cn/cc/list_cdr_ib' - param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} + param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':current_end_time,'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} # param={'Timestamp':current_time_utc,'Expires':86400,'startTime':1712332800,'startTimeEnd':1714838400,'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} print(f'param: {param}') @@ -113,6 +115,7 @@ if __name__ == "__main__": print(f'{formatted2_previous_hour(0)}开始请求客户来电记录信息') offset = 0 pageSize = 100 + current_end_time = previous_hour_timestamp(0) resL = request_data_signature_get(offset,pageSize) print(resL) if 'error' in resL: diff --git a/dev/workflow/TK_Cust/smart_ccc_cdr/查询座席接听记录列表/cc_cdr_ib_agent_list_feign.py b/dev/workflow/TK_Cust/smart_ccc_cdr/查询座席接听记录列表/cc_cdr_ib_agent_list_feign.py index aef49f0..9b32f11 100644 --- a/dev/workflow/TK_Cust/smart_ccc_cdr/查询座席接听记录列表/cc_cdr_ib_agent_list_feign.py +++ b/dev/workflow/TK_Cust/smart_ccc_cdr/查询座席接听记录列表/cc_cdr_ib_agent_list_feign.py @@ -61,11 +61,12 @@ def build_query_string(params): ) for k, v in sorted_params.items()) return query_string +current_end_time = previous_hour_timestamp(0) #计算签名,get请求 def request_data_signature_get(offset, pageSize): print(f'开始请求座席接听记录数据') url='https://api-bj.clink.cn/cc/list_cdr_ib_agent' - param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} + param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':current_end_time,'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} # param={'Timestamp':current_time_utc,'Expires':86400,'startTime':1712332800,'startTimeEnd':1714838400,'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','limit':pageSize,'offset':offset} print(f'param: {param}') @@ -116,6 +117,7 @@ if __name__ == "__main__": print(f'{formatted2_previous_hour(0)}开始请求座席接听记录信息') offset = 0 pageSize = 100 + current_end_time = previous_hour_timestamp(0) resL = request_data_signature_get(offset, pageSize) print(resL) if 'error' in resL: