From a6447fc6ed81e56fba3fadf1a6a582317feac015 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 18 Feb 2025 16:31:31 +0800 Subject: [PATCH] =?UTF-8?q?add=20workflow=20=E5=A4=A9=E6=B6=A6Smart-ccc?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E6=95=B0=E6=8D=AE,dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccc客户会话记录信息/cust_chat_record_info_agi.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql b/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql index afc0173..76b302e 100644 --- a/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql +++ b/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql @@ -4,11 +4,11 @@ /*Brilliance stems from wisdoms. */ /*************Head Section**************************************************************************/ /*Script Use: Periodically load data to :cust_chat_record_info(ccc客户会话记录信息) */ -/*Create Date:2025-02-14 09:58:24 */ +/*Create Date:2025-02-18 16:30:41 */ /*SDM Developed By: dev */ /*SDM Developed Date: 2024-08-14 */ /*SDM Checked By: dev */ -/*SDM Checked Date: 2025-02-14 */ +/*SDM Checked Date: 2025-02-18 */ /*Script Developed By: dev */ /*Script Checked By: dev */ /*Source table 1: :COMMDB.select replace(jsonb_array_elements(visitor_ids::jsonb)::text,'"','') as visitor_id ,row_number() over(partition by replace(jsonb_array_elements(visitor_ids::jsonb)::text,'"','') order by id desc) rn ,* from p30_common.d_ccc_cust_info dcci @@ -79,7 +79,7 @@ INSERT INTO cust_chat_record_info_agi_CUR_I ( ,Src_Table /*来源表*/ ) SELECT - COALESCE(TRIM(p0.chat_unique_id),'') /*chat_unique_id*/ + p0.contact_account /*chat_unique_id*/ ,'Smart CCC' /*chat_channel*/ ,coalesce(p2.data_detail,'') /*contact_channel*/ ,COALESCE(TRIM(p0.contact_app_id),'') /*contact_app_id*/ @@ -122,7 +122,7 @@ and p1.rn=1 LEFT JOIN :PDMDB.t99_ccc_code p2 ON p2.code_type ='chat_contact_channel' and p0.contact_channel =p2.data_code - +where p0 .chat_valid_session <>'流失会话' ;