diff --git a/db/mens_traffic_oracle.sql b/db/mens_traffic_oracle.sql index b31fb6a..1f79c96 100644 --- a/db/mens_traffic_oracle.sql +++ b/db/mens_traffic_oracle.sql @@ -89,7 +89,7 @@ where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc='; ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2') AND tesm.unity_sndng_mastr_id = '3094' - AND IFNULL(tekmd.document_binder_uuid, '') != '' + AND NVL(tekmd.document_binder_uuid, '') != '' AND tesm.signgu_code = '51110' AND tesm.ffnlg_code = '11'; @@ -99,3 +99,71 @@ select * from ENS_SND_DTL_KT_GBS; select * from TB_ELCTRN_NTIC_SNDNG; select * from TB_ELCTRN_NTIC_SNDNG_DETAIL; + +SELECT signgu_code, /* 시군구코드 */ + ffnlg_code, /* 과태료코드 */ + client_id, /* nice client id */ + client_secret, /* app security code */ + product_id, /* 상품 코드 */ + access_token, /* access token */ + expires_in, /* access token 만료일시(초)*/ + token_type, /* token type */ + scope, /* token scope */ + site_code, /* 공개키 사이트 코드 */ + key_version, /* 공개키 버전 */ + public_key, /* 공개키 */ + TO_CHAR(TO_DATE(null, 'YYYYMMDDHH24MISS') - INTERVAL '1' HOUR, 'YYYYMMDDHH24MISS') AS validDtim, /* 공개키 만료일시 */ + cur_symkey_version, /* 현재 대칭키 버전 */ + TO_CHAR(TO_DATE('', 'YYYYMMDDHH24MISS') - INTERVAL '1' HOUR, 'YYYYMMDDHH24MISS') AS curSymkeyValidDtim, /* 현재 대칭키 만료일시 */ + cur_symkey_key, /* 현재 대칭키 - key */ + cur_symkey_iv, /* 현재 대칭키 - iv */ + cur_symkey_hmac_key, /* 현재 대칭키 - hmac_key */ + bef_symkey_version, /* 이전 대칭키 버전 */ + bef_symkey_valid_dtim, /* 이전 대칭키 만료일시 */ + bef_symkey_key, /* 이전 대칭키 - key */ + bef_symkey_iv, /* 이전 대칭키 - iv */ + bef_symkey_hmac_key /* 이전 대칭키 - hmac_key */ + FROM tb_cmm_nice_instn_crtf_info; +-- WHERE signgu_code = #{signguCode} +-- AND ffnlg_code = #{ffnlgCode} + + +select * from tb_cmm_nice_instn_crtf_info; +select * from tb_ens_rlaybsnm_manage; + + + SELECT signgu_code, /* 시군구코드 */ + ffnlg_code, /* 과태료코드 */ + signgu_nm, /* 시군구 명 */ + ffnlg_nm, /* 과태료 명 */ + kakao_client_id, /* 카카오 Client ID */ + kakao_product_cd, /* 카카오 상품 코드 */ + kakao_access_token, /* 카카오 access token */ + kakao_contract_uuid, /* 카카오 contract uuid */ + kakao_partner_rest_api_key, /* 카카오 partner key */ + kakao_dealer_rest_api_key, /* 카카오 dealer key */ + -- CASE WHEN #{profile} = 'prod' THEN kakao_prod_settle_id ELSE kakao_dev_settle_id END AS kakaoSettleId, /* 카카오 settle id */ + kt_client_id, /* KT client id */ + kt_client_tp, /* KT client tp */ + kt_scope, /* KT scope */ + kt_service_code, /* KT service code */ + -- CASE WHEN #{profile} = 'prod' THEN kt_prod_client_id ELSE kt_dev_client_id END AS ktSvcClientId, /* KT client service ID */ + -- CASE WHEN #{profile} = 'prod' THEN kt_prod_client_secret ELSE kt_dev_client_secret END AS ktSvcClientSecret, /* KT client service secret */ + TO_DATE(updt_dt INTERVAL IF(#{profile} = 'prod', kt_prod_token_expires_in, kt_dev_token_expires_in) - 86400 SECOND) + END AS ktTokenExpiresIn, /* KT 토큰 유효기간 : (7775999)(90일) */ + epost_service_key, /* epost service key */ + pplus_api_key, /* postplus api key */ + sender_nm, /* 발송인 명 */ + sender_zip_no, /* 발송인 우편 번호 */ + sender_addr, /* 발송인 주소 */ + sender_detail_addr /* 발송인 상세 주소 */ + FROM tb_ens_rlaybsnm_manage; + + +select updt_dt,kt_prod_token_expires_in,kt_dev_token_expires_in, +updt_dt + ( + CASE + WHEN '' = 'prod' THEN kt_prod_token_expires_in + ELSE kt_dev_token_expires_in + END - 86400) / 86400 +from tb_ens_rlaybsnm_manage; diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-oracle-mapper.xml new file mode 100644 index 0000000..3b951a4 --- /dev/null +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-oracle-mapper.xml @@ -0,0 +1,73 @@ + + + + + + + + + diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-mysql-mapper.xml index 5801b18..6a60779 100644 --- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-mysql-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-mysql-mapper.xml @@ -43,8 +43,7 @@ - - /** ens-mysql-mapper|saveCntcSndngResult-연계발송결과반영|julim */ + /** ens-kt-mysql-mapper|saveCntcSndngResult-연계발송결과반영|julim */ SELECT tesn.signgu_code AS signguCode , tesn.ffnlg_code AS ffnlgCode diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-oracle-mapper.xml new file mode 100644 index 0000000..d3892ee --- /dev/null +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-kt-oracle-mapper.xml @@ -0,0 +1,92 @@ + + + + + + /** ens-kt-oracle-mapper|updateRlaybsnmKtInfo-kt token 정보 갱신|julim */ + UPDATE tb_ens_rlaybsnm_manage + SET kt_scope = #{ktScope}, + + + kt_prod_access_token = #{ktAccessToken}, + kt_prod_token_expires_in = #{ktTokenExpiresIn}, + kt_prod_token_jti = #{ktTokenJti}, + + + kt_dev_access_token = #{ktAccessToken}, + kt_dev_token_expires_in = #{ktTokenExpiresIn}, + kt_dev_token_jti = #{ktTokenJti}, + + + updt_dt = sysdate, + updusr = 'api-biz' + WHERE signgu_code = #{signguCode} + AND ffnlg_code = #{ffnlgCode} + + + + /** ens-kt-oracle-mapper|updateKtBcDtl-kt 메세지 수신결과 상세 반영|julim */ + UPDATE tb_ens_kt_bc_detail + SET mms_sndg_rslt_sqno = #{mmsSndgRsltSqno} /* MMS 발송 결과 상태 순번 - 1:수신시, 2:발송시*/ + , prcs_dt = #{prcsDt} /* 처리일자 */ + , mbl_bzowr_dvcd = #{mblBzowrDvcd} /* 모바일 사업자 구분 : 01:KT, 02:SKT, 03:LGT */ + , rl_mms_sndg_telno = #{rlMmsSndgTelno} /* 실제 발송 번호 */ + , mms_sndg_rslt_dvcd = #{mmsSndgRsltDvcd} /* 발송결과코드 */ + , mms_sndg_rslt_dvcd_msg = #{mmsSndgRsltDvcdMsg} /* 발송결과코드 메세지 */ + , mms_sndg_tmst = NVL(#{mmsSndgTmst}, mms_sndg_tmst) /* 발송 타임 스탬프 */ + , mms_rcv_tmst = NVL(#{mmsRcvTmst}, mms_rcv_tmst) /* 수신 타임 스탬프 */ + , mms_rdg_tmst = NVL(#{mmsRdgTmst}, mms_rdg_tmst) /* 열람 타임 스탬프 */ + , updt_dt = sysdate + , updusr = 'api_inbound' + WHERE unity_sndng_detail_id = #{srcKey} + + + + /** ens-kt-oracle-mapper|saveCntcSndngResult-연계발송결과반영|julim */ + + SELECT tesn.signgu_code AS signguCode + , tesn.ffnlg_code AS ffnlgCode + , tesn.sndng_se_code AS sndngSeCode + FROM tb_ens_sndng_mastr tesn + JOIN tb_cntc_sndng_detail tcsnd + ON tesn.unity_sndng_mastr_id = tcsnd.unity_sndng_mastr_id + WHERE tcsnd.unity_sndng_detail_id = #{srcKey} + + INSERT + INTO tb_cntc_sndng_result ( + unity_sndng_detail_id, /* 통합 발송 상세 ID*/ + sndng_se_code, /* 발송구분코드 */ + signgu_code, /* 시군구코드 */ + ffnlg_code, /* 과태료코드 */ + sndng_result_sttus, + requst_dt, /* 송신(요청) 일시 */ + inqire_dt, /* 수신(조회) 일시 */ + readng_dt, /* 최초열람일시 */ + error_cn, /* 에러내용 */ + regist_dt, + register + ) VALUES ( + #{srcKey} + , #{sndngSeCode} /* 발송구분코드 - KAKAO-MY-DOC|KT-BC */ + , #{signguCode} /* 시군구코드 */ + , #{ffnlgCode} /* 과태료코드 */ + , #{mmsSndgRsltDvcd} + , #{mmsSndgTmst} /* 송신(요청) 일시 */ + , #{mmsRcvTmst} /* 수신(조회) 일시 */ + , #{mmsRdgTmst} /* 최초열람일시 */ + , #{mmsSndgRsltDvcdMsg} /* 에러내용 */ + , sysdate + , 'batch' + ) + ON DUPLICATE KEY UPDATE + sndng_result_sttus = NVL(#{mmsSndgRsltDvcd}, sndng_result_sttus) + , requst_dt = NVL(#{mmsSndgTmst}, requst_dt) /* 송신(요청) 일시 */ + , inqire_dt = NVL(#{mmsRcvTmst}, inqire_dt) /* 수신(조회) 일시 */ + , readng_dt = NVL(#{mmsRdgTmst}, readng_dt) /* 최초열람일시 */ + , error_cn = NVL(#{mmsSndgRsltDvcdMsg}, error_cn) + , updt_dt = sysdate + , updusr = 'batch' + + + diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-mysql-mapper.xml index 7859612..3da1074 100644 --- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-mysql-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-mysql-mapper.xml @@ -4,7 +4,7 @@ - /** ens-cmm-mysql-mapper|updateNiceCrtfToken-Nice token 정보 갱신|julim */ + /** ens-nice-mysql-mapper|updateNiceCrtfToken-Nice token 정보 갱신|julim */ UPDATE tb_cmm_nice_instn_crtf_info SET access_token = #{accessToken}, token_type = #{tokenType}, @@ -17,7 +17,7 @@ - /** ens-cmm-mysql-mapper|updateNiceCrtfPublickey-Nice publickey 인증정보 갱신|julim */ + /** ens-nice-mysql-mapper|updateNiceCrtfPublickey-Nice publickey 인증정보 갱신|julim */ UPDATE tb_cmm_nice_instn_crtf_info SET site_code = #{siteCode}, key_version = #{keyVersion}, @@ -30,7 +30,7 @@ - /** ens-cmm-mysql-mapper|updateNiceCrtfSymkey-Nice symkey 인증정보 갱신|julim */ + /** ens-nice-mysql-mapper|updateNiceCrtfSymkey-Nice symkey 인증정보 갱신|julim */ UPDATE tb_cmm_nice_instn_crtf_info SET cur_symkey_version = #{curSymkeyVersion}, cur_symkey_valid_dtim = #{curSymkeyValidDtim}, diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-oracle-mapper.xml new file mode 100644 index 0000000..369829e --- /dev/null +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-nice-oracle-mapper.xml @@ -0,0 +1,51 @@ + + + + + + /** ens-nice-oracle-mapper|updateNiceCrtfToken-Nice token 정보 갱신|julim */ + UPDATE tb_cmm_nice_instn_crtf_info + SET access_token = #{accessToken}, + token_type = #{tokenType}, + expires_in = #{expiresIn}, + scope = #{scope}, + updt_dt = sysdate, + updusr = 'api-biz' + WHERE signgu_code = #{signguCode} + AND ffnlg_code = #{ffnlgCode} + + + + /** ens-nice-oracle-mapper|updateNiceCrtfPublickey-Nice publickey 인증정보 갱신|julim */ + UPDATE tb_cmm_nice_instn_crtf_info + SET site_code = #{siteCode}, + key_version = #{keyVersion}, + public_key = #{publicKey}, + valid_dtim = #{validDtim}, + updt_dt = sysdate, + updusr = 'api-biz' + WHERE signgu_code = #{signguCode} + AND ffnlg_code = #{ffnlgCode} + + + + /** ens-nice-oracle-mapper|updateNiceCrtfSymkey-Nice symkey 인증정보 갱신|julim */ + UPDATE tb_cmm_nice_instn_crtf_info + SET cur_symkey_version = #{curSymkeyVersion}, + cur_symkey_valid_dtim = #{curSymkeyValidDtim}, + cur_symkey_key = #{curSymkeyKey}, + cur_symkey_iv = #{curSymkeyIv}, + cur_symkey_hmac_key = #{curSymkeyHmacKey}, + bef_symkey_version = #{befSymkeyVersion}, + bef_symkey_valid_dtim = #{befSymkeyValidDtim}, + bef_symkey_key = #{befSymkeyKey}, + bef_symkey_iv = #{befSymkeyIv}, + bef_symkey_hmac_key = #{befSymkeyHmacKey}, + updt_dt = sysdate, + updusr = 'api-biz' + WHERE signgu_code = #{signguCode} + AND ffnlg_code = #{ffnlgCode} + + +