add workflow 天润Smart-ccc通话记录,dev
This commit is contained in:
parent
54cf1099e7
commit
7a4476792d
|
@ -78,7 +78,7 @@ insert into p10_sa.S98_S_tr_cc_cdr_ib_list
|
|||
, etl_tx_dt
|
||||
from p00_tal.S98_S_tr_cc_cdr_ib_list
|
||||
;
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ib_list
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ib_list where main_unique_id in (select main_unique_id from S98_S_tr_cc_cdr_ib_list)
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_tr_cc_cdr_ib_list
|
||||
|
|
|
@ -52,7 +52,7 @@ insert into p10_sa.S98_S_tr_cc_cdr_ob_detail
|
|||
, etl_tx_dt
|
||||
from p00_tal.S98_S_tr_cc_cdr_ob_detail
|
||||
;
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ob_detail
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ob_detail where unique_id in (select unique_id from p10_sa.S98_S_tr_cc_cdr_ob_detail)
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_tr_cc_cdr_ob_detail
|
||||
|
|
|
@ -126,7 +126,7 @@ insert into p10_sa.S98_S_tr_cc_cdr_ob_list
|
|||
, etl_tx_dt
|
||||
from p00_tal.S98_S_tr_cc_cdr_ob_list
|
||||
;
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ob_list
|
||||
delete from p12_sfull.S98_S_tr_cc_cdr_ob_list where main_unique_id in (select main_unique_id from p10_sa.S98_S_tr_cc_cdr_ob_list)
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_tr_cc_cdr_ob_list
|
||||
|
|
|
@ -65,8 +65,8 @@ def build_query_string(params):
|
|||
def request_data_signature_get():
|
||||
print(f'开始请求外呼记录数据')
|
||||
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'}
|
||||
param={'Timestamp':current_time_utc,'Expires':86400,'startTime':1717516800,'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177'}
|
||||
param={'Timestamp':current_time_utc,'Expires':86400,'startTime':previous_hour_timestamp(1),'startTimeEnd':previous_hour_timestamp(0),'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177'}
|
||||
# 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)
|
||||
url_param = url_path
|
||||
|
@ -148,7 +148,7 @@ def load_detail_data_to_db(ids, dataList):
|
|||
json_object = json.dumps(dataList)
|
||||
idstr = ','.join(ids)
|
||||
cur=conn.cursor()
|
||||
sql="update data_api.cc_details_ids_exp set is_loaded = '1' where api_id = '7a38de24858a40ed9837f61ca7f80b08' and id in (%s); INSERT INTO data_api.cc_cdr_ob_details (id,api_id,data,total_num,is_loaded,status,request_tm,execute_tm,remark) values (%s,%s,%s,%s,'0','0',current_timestamp(0),current_timestamp(0),'')"
|
||||
sql="update data_api.cc_details_ids_exp set is_loaded = '1' where api_id = '7a38de24858a40ed9837f61ca7f80b08' and id in (%s);update data_api.cc_cdr_ob_details set is_loaded = '1' where api_id = '7a38de24858a40ed9837f61ca7f80b08'; INSERT INTO data_api.cc_cdr_ob_details (id,api_id,data,total_num,is_loaded,status,request_tm,execute_tm,remark) values (%s,%s,%s,%s,'0','0',current_timestamp(0),current_timestamp(0),'')"
|
||||
cur.execute(sql,[idstr,dataId,'7a38de24858a40ed9837f61ca7f80b08', json_object, total])
|
||||
conn.commit()
|
||||
cur.close()
|
||||
|
|
Loading…
Reference in New Issue