From 9df9cd0a24ada01739efa4501732cb36de2bfb38 Mon Sep 17 00:00:00 2001 From: kjh Date: Mon, 30 Sep 2024 16:12:58 +0900 Subject: [PATCH] =?UTF-8?q?docs=20:=20=EB=82=98=EC=9D=B4=EC=8A=A4=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=ED=86=A1=20=EC=97=85=EB=AC=B4=20=EC=BF=BC?= =?UTF-8?q?=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/mens-iup-query.sql | 50 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/db/mens-iup-query.sql b/db/mens-iup-query.sql index 5b1eda4..9737aa7 100644 --- a/db/mens-iup-query.sql +++ b/db/mens-iup-query.sql @@ -81,4 +81,52 @@ SELECT * -- 2. bill 생성 -- 3. 카카오 청구서 생성 -- 4. tb_input_data_xit 테이블 pay_url 에 청구서 URL UPDATE --- 5. tb_input_xit 테이블 prcs_cd='GRUC' / 실패 시 prcs_cd='TGRF' \ No newline at end of file +-- 5. tb_input_xit 테이블 prcs_cd='GRUC' / 실패 시 prcs_cd='TGRF' + + +/* ********************************************** +* 나이스 알림톡 send +********************************************** */ +-- 1. 대상 조회 +SELECT * +FROM tb_input_xit tix +WHERE tix.send_type='NI' + AND tix.prcs_cd='GRUC' + AND tix.RUN_DT < SYSDATE; + +-- 2. 나이스 연계 + +-- 3. tb_input_xit 테이블 prcs_cd='IPCP' / 실패 시 prcs_cd='FAIL' + + +/* ********************************************** +* 나이스 알림톡 status +********************************************** */ +-- 1. 대상 조회 +SELECT * +FROM tb_input_xit tix +WHERE tix.send_type='NI' + AND tix.prcs_cd='IPCP'; + +-- 2.결과 INSERT OR UPDATE tb_send_result +SELECT * FROM tb_send_result; + +/* ********************************************** +** send_sttus_cd 발송 처리 코드 +* TALK_SEND 카카오 알림톡 발송 성공 +* SMS_SEND KT 문자 발송 성공 +* FAIL 발송 실패 +********************************************** */ + + +/* ********************************************** +* 나이스 알림톡 close +********************************************** */ +-- 1. 대상 조회 +SELECT * +FROM tb_input_xit tix +WHERE tix.send_type='NI' + AND tix.prcs_cd='IPCP' + AND tix.expires_dt < SYSDATE - 1; + +-- 2. tb_input_xit 테이블 prcs_cd='CLOS' / 실패 시 prcs_cd='FAIL'