Compare commits

..

No commits in common. 'main' and 'dev' have entirely different histories.
main ... dev

6
.gitignore vendored

@ -33,9 +33,3 @@ build/
### Mac OS ###
.DS_Store
/mens-api/.idea/.gitignore
/mens-api/.idea/cody_history.xml
/mens-api/.idea/encodings.xml
/mens-api/.idea/git_toolbox_blame.xml
/mens-api/.idea/misc.xml
/mens-api/.idea/vcs.xml

@ -1,26 +0,0 @@
### intellij multi-project 설정 : mens-api의 profile local-ccn 인 경우
![](.\md_image\before-launch.png)
1. Edit configurations > 설정할 mens-api 모듈 선택
2. Modify options 클릭 > 하단의 'Before Launch' 항목의 'Add before launch task' 선택
3. Run maven goal 선택
![](.\md_image\maven-goals.png)
4. Working directoy > 멀티프로젝트의 해당 모듈 선택
5. Command line > 아래의 maven task 입력
```text
resources:resources -P local-ccn
```
6. OK 선택 저장
7. Modify options > Operating System 항목의 'Working directory' 선택
8. 아래의 내용 입력
```text
$MODULE_WORKING_DIR$
```

@ -1,110 +0,0 @@
/**
INSERT INTO tb_elctrn_ntic_sndng
(`ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `NHT_TMPLAT_ID`, `SNDNG_TY_CODE`, `SNDNG_CO`, `SNDNG_PROCESS_STTUS`, `SNDNG_DT`, `CLOS_DT`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `error_cn`, `error_dtls`)
VALUES
('202400000001', '51110', 'JU001', '1', 1, '01', '20240805141253', '20240930235959', '2024-08-05 14:10:53', NULL, '2024-08-07 18:05:51', 'ENS_SYS', NULL, NULL);
INSERT INTO tb_elctrn_ntic_sndng_detail
(`ELCTRN_NTIC_SNDNG_DETAIL_ID`, `ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `MAIN_CODE`, `IHIDNUM`, `CN_DETAIL`, `MOBILE_PAGE_CN`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `external_document_uuid`)
VALUES
('51110202400335801001', '202400000001', '51110', '5111020240033580', 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=', NULL, '{"details":[{"title":"주정차 위반 과태료 사전통지서","item_type":"TEXT","elements":[""]},{"title":"단속사진","item_type":"IMAGE","print_type":"SLIDE","elements":[{"key":"사진0","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580A.jpg","level":0},{"key":"사진1","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580B.jpg","level":1},{"key":"사진2","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580C.jpg","level":2},{"key":"사진3","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580D.jpg","level":3}]},{"title":"위반내역","item_type":"KEY_VALUE","properties":{"hyperlink":["https://www.wetax.go.kr"],"style":{"highlight":{"562-245-79175307":{"use-clipboard":"true"}}}},"elements":[{"key":"차량번호","value":"56거4441","level":1},{"key":"성명","value":"김정우","level":1},{"key":"위반일시","value":"2024-08-04 10:37","level":1},{"key":"위반내용","value":"주정차금지 구역","level":1},{"key":"위반장소","value":"퇴계동 퇴계로 부근","level":1},{"key":"납부금액","value":"32,000원","level":1},{"key":"단속구분","value":"이동형CCTV 033-250-3194,3800","level":1},{"key":"가상계좌","value":"신한 : 56224579175307\\n농협 : 79027653322219\\n우리 : 73171602792160\\n하나 : 61809652351237","level":1},{"key":"자진납부 및 의견제출기한","value":"2024-09-04\\n위 납부 기한이 경과시에는 과태료 감경 혜택을 받으실 수 없습니다.","level":1},{"key":"위택스","value":"https://www.wetax.go.kr","level":1}]},{"title":"자동차 등록별 과태료 부과 및 감경기준","item_type":"TABLE","elements":{"head":["구분","승용\\\\n부과금액","승용\\\\n감경후금액","승합\\\\n부과금액","승합\\\\n감경후금액"],"rows":[["주정차금지구역\\\\n(어린이보호구역 내)","40,000원\\\\n(120,000원)","32,000원\\\\n(96,000원)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)"],["같은 장소 2시간 초과\\\\n(어린이보호구역 내)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)","60,000원\\\\n(140,000원)","48,000원\\\\n(112,000원)"]]}},{"title":"질서위반행위 규제법 시행령 규정 감경 대상","item_type":"TABLE","elements":{"head":["감경대상자","시행일 및 적용대상","감경율(%)","비고"],"rows":[["○ 국민기초생활 수급자\\\\n○ 한부모가족 보호대상자\\\\n○ 장애의 정도가 심한 장애인\\\\n○ 국가유공자(상이등급 3급 이상)\\\\n○ 미성년자","○ 시행일 : 2010년 1월 16일 부터\\\\n○ 적용 : 시행일 이후 단속된 차량","○ 과태료 부과금액의 50%","※ 자진 납부 시 추가감경 가능"]]}}]}', '2024-08-05 14:10:53', NULL, NULL, NULL, 'B-202408051411000827Wmtv000000001');
commit;
*/
select *
from tb_elctrn_ntic_sndng;
select *
from tb_elctrn_ntic_sndng_detail;
select *
from tb_ens_unity_sndng_mastr;
select *
from tb_ens_unity_sndng_detail;
select *
from tb_ens_ci;
select *
from tb_ens_tmplat_manage;
/** 접수 reset */
select * from tb_elctrn_ntic_sndng;
select * from tb_ens_unity_sndng_mastr;
select * from tb_ens_unity_sndng_detail;
select * from tb_ens_ci;
select * from tb_ens_sndng_mastr;
select * from tb_ens_ihidnum_manage;
select * from tb_ens_ci_manage;
select *
from tb_ens_ci_manage;
select *
from tb_ens_ihidnum_manage;
select *
from tb_ens_ci_manage;
select tecm.ci
from tb_ens_ihidnum_manage teim
LEFT join tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = '8312181157213';
SELECT teim.ihidnum_manage_id AS ihidnumManageId
, tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id
, tesm.tmplat_id
, tesm.sndng_co
, tesm.try_seq
, tesm.sndng_process_sttus
, teusm.try1
, teusm.try2
, teusm.try3
, teusm.try_cnt
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_unity_sndng_mastr teusm
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
AND tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
SELECT tekmd.document_binder_uuid
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kakao_my_doc tekmd
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 tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
select * from ens_snd_mast;
select * from ENS_SND_DTL_KT_GBS;
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00'
AND tekmd.external_id = '4413311202408230033';

@ -1,201 +0,0 @@
/**
INSERT INTO tb_elctrn_ntic_sndng
(`ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `NHT_TMPLAT_ID`, `SNDNG_TY_CODE`, `SNDNG_CO`, `SNDNG_PROCESS_STTUS`, `SNDNG_DT`, `CLOS_DT`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `error_cn`, `error_dtls`)
VALUES
('202400000001', '51110', 'JU001', '1', 1, '01', '20240805141253', '20240930235959', '2024-08-05 14:10:53', NULL, '2024-08-07 18:05:51', 'ENS_SYS', NULL, NULL);
INSERT INTO tb_elctrn_ntic_sndng_detail
(`ELCTRN_NTIC_SNDNG_DETAIL_ID`, `ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `MAIN_CODE`, `IHIDNUM`, `CN_DETAIL`, `MOBILE_PAGE_CN`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `external_document_uuid`)
VALUES
('51110202400335801001', '202400000001', '51110', '5111020240033580', 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=', NULL, '{"details":[{"title":"주정차 위반 과태료 사전통지서","item_type":"TEXT","elements":[""]},{"title":"단속사진","item_type":"IMAGE","print_type":"SLIDE","elements":[{"key":"사진0","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580A.jpg","level":0},{"key":"사진1","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580B.jpg","level":1},{"key":"사진2","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580C.jpg","level":2},{"key":"사진3","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580D.jpg","level":3}]},{"title":"위반내역","item_type":"KEY_VALUE","properties":{"hyperlink":["https://www.wetax.go.kr"],"style":{"highlight":{"562-245-79175307":{"use-clipboard":"true"}}}},"elements":[{"key":"차량번호","value":"56거4441","level":1},{"key":"성명","value":"김정우","level":1},{"key":"위반일시","value":"2024-08-04 10:37","level":1},{"key":"위반내용","value":"주정차금지 구역","level":1},{"key":"위반장소","value":"퇴계동 퇴계로 부근","level":1},{"key":"납부금액","value":"32,000원","level":1},{"key":"단속구분","value":"이동형CCTV 033-250-3194,3800","level":1},{"key":"가상계좌","value":"신한 : 56224579175307\\n농협 : 79027653322219\\n우리 : 73171602792160\\n하나 : 61809652351237","level":1},{"key":"자진납부 및 의견제출기한","value":"2024-09-04\\n위 납부 기한이 경과시에는 과태료 감경 혜택을 받으실 수 없습니다.","level":1},{"key":"위택스","value":"https://www.wetax.go.kr","level":1}]},{"title":"자동차 등록별 과태료 부과 및 감경기준","item_type":"TABLE","elements":{"head":["구분","승용\\\\n부과금액","승용\\\\n감경후금액","승합\\\\n부과금액","승합\\\\n감경후금액"],"rows":[["주정차금지구역\\\\n(어린이보호구역 내)","40,000원\\\\n(120,000원)","32,000원\\\\n(96,000원)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)"],["같은 장소 2시간 초과\\\\n(어린이보호구역 내)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)","60,000원\\\\n(140,000원)","48,000원\\\\n(112,000원)"]]}},{"title":"질서위반행위 규제법 시행령 규정 감경 대상","item_type":"TABLE","elements":{"head":["감경대상자","시행일 및 적용대상","감경율(%)","비고"],"rows":[["○ 국민기초생활 수급자\\\\n○ 한부모가족 보호대상자\\\\n○ 장애의 정도가 심한 장애인\\\\n○ 국가유공자(상이등급 3급 이상)\\\\n○ 미성년자","○ 시행일 : 2010년 1월 16일 부터\\\\n○ 적용 : 시행일 이후 단속된 차량","○ 과태료 부과금액의 50%","※ 자진 납부 시 추가감경 가능"]]}}]}', '2024-08-05 14:10:53', NULL, NULL, NULL, 'B-202408051411000827Wmtv000000001');
commit;
*/
select *
from tb_elctrn_ntic_sndng;
select *
from tb_elctrn_ntic_sndng_detail;
select *
from tb_ens_unity_sndng_mastr;
select *
from tb_ens_unity_sndng_detail;
select *
from tb_ens_ci;
select *
from tb_ens_tmplat_manage;
/** 접수 reset */
select * from tb_elctrn_ntic_sndng;
select * from tb_ens_unity_sndng_mastr;
select * from tb_ens_unity_sndng_detail;
select * from tb_ens_ci;
select * from tb_ens_sndng_mastr;
select * from tb_ens_ihidnum_manage;
select * from tb_ens_ci_manage;
select *
from tb_ens_ci_manage;
select *
from tb_ens_ihidnum_manage;
select *
from tb_ens_ci_manage;
select tecm.ci
from tb_ens_ihidnum_manage teim
LEFT join tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = '8312181157213';
SELECT teim.ihidnum_manage_id AS ihidnumManageId
, tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id
, tesm.tmplat_id
, tesm.sndng_co
, tesm.try_seq
, tesm.sndng_process_sttus
, teusm.try1
, teusm.try2
, teusm.try3
, teusm.try_cnt
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_unity_sndng_mastr teusm
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
AND tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
SELECT tekmd.document_binder_uuid
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kakao_my_doc tekmd
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 NVL(tekmd.document_binder_uuid, '') != ''
AND tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
select * from ens_snd_mast;
select * from TB_ELCTRN_NTIC_SNDNG_RESULT;
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_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;
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00'
AND tekmd.external_id = '4413311202408230033';
UPDATE tb_ens_kt_gbs
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_rslt_dvcd = '#{mmsRsltDvcd} ' /* 발송결과코드 */
--, mms_sndg_rslt_dvcd_msg = #{mmsRsltDvcdMsg} /* 발송결과코드 메세지 */
, mms_sndg_tmst = mms_sndg_tmst /* 발송 타임 스탬프 */
, mms_rcv_tmst = mms_rcv_tmst /* 수신 타임 스탬프 */
, mms_rdg_tmst = mms_rdg_tmst /* 열람 타임 스탬프 */
, updt_dt = sysdate
, updusr = 'api_inbound'
WHERE unity_sndng_detail_id = '';
select * from tb_ens_rlaybsnm_manage;

@ -1,124 +0,0 @@
insert into tb_ens_mobile_page_manage
select concat('KKO', send_detail_id)
, 'KKO-MY-DOC'
, details
, regist_dt
, 'system'
from ens_snd_dtl_mbl_page;
insert into tb_ens_unity_sndng_mastr
select (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id limit 1)
, '51110'
, '11'
, tmplt_cd
, 'ENS'
, send_cnt
, 'send_ok' -- stat_cd
, date_format(send_dt, '%Y%m%d%H%i%S')
, ''
, ''
, 'KKO-MY-DOC'
, ''
, ''
, '1'
, date_format(close_dt, '%Y%m%d%H%i%S')
, ''
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt');
insert into tb_ens_unity_sndng_detail
select (select b.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail b where a.prop_external_document_uuid=b.external_document_uuid)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id limit 1)
, '51110'
, '11'
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, (select mobile_page_cn from tb_ens_mobile_page_manage b where b.sndng_detail_id=concat('KKO', a.send_detail_id))
, ''
, prop_external_document_uuid
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_dtl_kko_md a
where send_mast_id in (select send_mast_id from ens_snd_mast where stat_cd IN ('open', 'sendcmplt'));
insert into tb_ens_sndng_mastr
select concat('KKO', send_mast_id)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id limit 1)
, '51110'
, '11'
, tmplt_cd
, 'ENS'
, 'KKO-MY-DOC'
, send_cnt
, '1'
, '1'
, 'send_ok' -- stat_cd
, date_format(send_dt, '%Y%m%d%H%i%S')
, date_format(close_dt, '%Y%m%d%H%i%S')
, ''
, ''
, ''
, null
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt');
insert into tb_ens_kakao_my_doc
select concat('KKO', send_detail_id)
, (select b.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail b where a.prop_external_document_uuid=b.external_document_uuid)
, concat('KKO', send_mast_id)
, '51110'
, '11'
, title
, hash
, common_categories
, read_expiread_at
, recv_ci
, ''
, ''
, ''
, recv_is_require_vfy_name
, prop_link
, prop_payload
, prop_message
, prop_cs_number
, prop_cs_name
, prop_external_document_uuid
, document_binder_uuid
, error_code
, error_message
, kko_doc_stat
, unix_timestamp(kko_doc_sent_dt)
, unix_timestamp(kko_doc_received_dt)
, unix_timestamp(kko_doc_auth_frst_dt)
, unix_timestamp(kko_doc_token_vrfy_frst_dt)
, unix_timestamp(kko_doc_read_frst_dt)
, unix_timestamp(kko_doc_user_notied_dt)
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_dtl_kko_md a
where send_mast_id in (select send_mast_id from ens_snd_mast where stat_cd IN ('open', 'sendcmplt'));

@ -1,362 +0,0 @@
create table TB_ENS_KT_GBS
(
SNDNG_MASTR_ID VARCHAR2(20) not null,
SNDNG_DETAIL_ID VARCHAR2(20) not null,
UNITY_SNDNG_DETAIL_ID VARCHAR2(20),
SIGNGU_CODE CHAR(5),
FFNLG_CODE VARCHAR2(2),
SERVICE_CD VARCHAR2(5),
MSG_CD VARCHAR2(5),
MAKE_DT VARCHAR2(14),
DATA_CNT NUMBER(8),
SNDN_EX_TIME VARCHAR2(14),
EX_TIME VARCHAR2(14),
SND_TEL_NO VARCHAR2(20),
M_TYPE VARCHAR2(10),
MSG_TYPE VARCHAR2(1),
OPT_TYPE VARCHAR2(1),
SRC_KEY VARCHAR2(50),
SRC_SEQ VARCHAR2(8),
SCI VARCHAR2(88),
MMS_DTL_CNTS VARCHAR2(4000),
MMS_TITLE VARCHAR2(40),
RCS_DTL_CNTS VARCHAR2(4000),
URL VARCHAR2(1000),
DOC_HASH VARCHAR2(100),
MDN VARCHAR2(11),
MMS_SNDG_RSLT_SQNO VARCHAR2(8),
PRCS_DT VARCHAR2(8),
MMS_BSNS_DVCD VARCHAR2(5),
MBL_BZOWR_DVCD VARCHAR2(2),
RL_MMS_SNDG_TELNO VARCHAR2(20),
MMS_RSLT_DVCD VARCHAR2(20),
MMS_SNDG_TMST VARCHAR2(14),
MMS_RCV_TMST VARCHAR2(14),
MMS_RDG_TMST VARCHAR2(14),
PREV_APPROVE_YN VARCHAR2(4),
RESULT_CD VARCHAR2(2),
RESULT_DT VARCHAR2(14),
ERROR_MSG VARCHAR2(255),
REGIST_DT DATE,
REGISTER VARCHAR2(20),
UPDT_DT DATE,
UPDUSR VARCHAR2(20),
constraint PK_TB_ENS_KT_BC_GBS
primary key (SNDNG_MASTR_ID, SNDNG_DETAIL_ID)
);
comment on table TB_ENS_KT_GBS is 'GBS 공인 알림 문자';
comment on column TB_ENS_KT_GBS.SNDNG_MASTR_ID is '발송 마스터 ID';
comment on column TB_ENS_KT_GBS.SNDNG_DETAIL_ID is '발송 상세 ID';
comment on column TB_ENS_KT_GBS.UNITY_SNDNG_DETAIL_ID is '통합 발송 상세 ID';
comment on column TB_ENS_KT_GBS.SIGNGU_CODE is '시군구 코드';
comment on column TB_ENS_KT_GBS.FFNLG_CODE is '과태료 코드';
comment on column TB_ENS_KT_GBS.SERVICE_CD is '기관코드';
comment on column TB_ENS_KT_GBS.MSG_CD is '문서코드';
comment on column TB_ENS_KT_GBS.MAKE_DT is '생성일시';
comment on column TB_ENS_KT_GBS.DATA_CNT is '회차전체데이터건수';
comment on column TB_ENS_KT_GBS.SNDN_EX_TIME is '발송마감시간';
comment on column TB_ENS_KT_GBS.EX_TIME is '열람마감시간';
comment on column TB_ENS_KT_GBS.SND_TEL_NO is '발신번호(서비스기관)(발송전화번호)';
comment on column TB_ENS_KT_GBS.M_TYPE is '문서종류(sms,lms,mms)';
comment on column TB_ENS_KT_GBS.MSG_TYPE is '발송메세지타입';
comment on column TB_ENS_KT_GBS.OPT_TYPE is '메시지 발송구분';
comment on column TB_ENS_KT_GBS.SRC_KEY is '관리키';
comment on column TB_ENS_KT_GBS.SRC_SEQ is 'SRC_SEQ';
comment on column TB_ENS_KT_GBS.SCI is 'CI';
comment on column TB_ENS_KT_GBS.MMS_DTL_CNTS is 'MMS상세내용';
comment on column TB_ENS_KT_GBS.MMS_TITLE is 'MMS제목';
comment on column TB_ENS_KT_GBS.RCS_DTL_CNTS is 'RCS 메시지 상세내용';
comment on column TB_ENS_KT_GBS.URL is '연결URL';
comment on column TB_ENS_KT_GBS.DOC_HASH is '문서해시';
comment on column TB_ENS_KT_GBS.MDN is '개인휴대전화번호';
comment on column TB_ENS_KT_GBS.MMS_SNDG_RSLT_SQNO is 'MMS발송결과상태순번 (1:수신,2:열람)';
comment on column TB_ENS_KT_GBS.PRCS_DT is '처리일자';
comment on column TB_ENS_KT_GBS.MMS_BSNS_DVCD is '문서코드';
comment on column TB_ENS_KT_GBS.MBL_BZOWR_DVCD is '모바일사업자구분 (01:KT,02:SKT,03:LGT)';
comment on column TB_ENS_KT_GBS.RL_MMS_SNDG_TELNO is '실제발송번호(일부)';
comment on column TB_ENS_KT_GBS.MMS_RSLT_DVCD is '발송결과코드';
comment on column TB_ENS_KT_GBS.MMS_SNDG_TMST is '발송 타임 스탬프';
comment on column TB_ENS_KT_GBS.MMS_RCV_TMST is '수신 타임 스탬프';
comment on column TB_ENS_KT_GBS.MMS_RDG_TMST is '열람 타임 스탬프';
comment on column TB_ENS_KT_GBS.PREV_APPROVE_YN is '기동의발송여부';
comment on column TB_ENS_KT_GBS.RESULT_CD is '처리결과';
comment on column TB_ENS_KT_GBS.RESULT_DT is '응답처리일자';
comment on column TB_ENS_KT_GBS.ERROR_MSG is '오류 메시지';
comment on column TB_ENS_KT_GBS.REGIST_DT is '등록 일시';
comment on column TB_ENS_KT_GBS.REGISTER is '등록자';
comment on column TB_ENS_KT_GBS.UPDT_DT is '수정 일시';
comment on column TB_ENS_KT_GBS.UPDUSR is '수정자';
-- 자료 이관
insert into tb_ens_mobile_page_manage
select concat('KKO', send_detail_id)
, 'KKO-MY-DOC'
, details
, to_char(regist_dt, 'yyyymmddhh24miss')
, 'system'
from ens_snd_dtl_mbl_page
where post_se='kkoMydoc';
insert into tb_ens_mobile_page_manage
select concat('KTG', send_detail_id)
, 'KT-GBS'
, details
, to_char(regist_dt, 'yyyymmddhh24miss')
, 'system'
from ens_snd_dtl_mbl_page
where post_se='ktGibis';
insert into tb_ens_unity_sndng_mastr
select (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum = 1)
, org_cd
, '11'
, tmplt_cd
, 'ENS'
, send_cnt
, 'send_ok' -- stat_cd
, to_char(send_dt, 'yyyymmddhh24miss')
, ''
, ''
, 'KKO-MY-DOC'
, ''
, ''
, '1'
, to_char(close_dt, 'yyyymmddhh24miss')
, ''
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt')
and tmplt_cd like '%2';
insert into tb_ens_unity_sndng_mastr
select (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kt_gbs b inner join tb_elctrn_ntic_sndng_detail c on b.LINKED_UUID=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum = 1)
, org_cd
, '11'
, tmplt_cd
, 'ENS'
, send_cnt
, 'send_ok' -- stat_cd
, to_char(send_dt, 'yyyymmddhh24miss')
, ''
, ''
, 'KT-GBS'
, ''
, ''
, '1'
, to_char(close_dt, 'yyyymmddhh24miss')
, ''
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt')
and tmplt_cd like '%3';
insert into tb_ens_unity_sndng_detail
select (select b.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail b where a.prop_external_document_uuid=b.external_document_uuid)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum= 1)
, bb.org_cd
, '11'
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, (select mobile_page_cn from tb_ens_mobile_page_manage c where c.sndng_detail_id=concat('KKO', a.send_detail_id))
, ''
, a.prop_external_document_uuid
, a.regist_dt
, 'system'
, a.last_updt_dt
, 'system'
from ens_snd_dtl_kko_md a
inner join ens_snd_mast bb on (a.SEND_MAST_ID=bb.send_mast_id)
where bb.stat_cd IN ('open', 'sendcmplt') and bb.tmplt_cd like '%2';
insert into tb_ens_unity_sndng_detail
select (select b.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail b where a.LINKED_UUID=b.external_document_uuid)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kt_gbs b inner join tb_elctrn_ntic_sndng_detail c on b.LINKED_UUID=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum= 1)
, bb.org_cd
, '11'
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, ''
, (select mobile_page_cn from tb_ens_mobile_page_manage c where c.sndng_detail_id=concat('KTG', a.send_detail_id))
, ''
, a.LINKED_UUID
, null
, 'system'
, null
, 'system'
from ens_snd_dtl_kt_gbs a
inner join ens_snd_mast bb on (a.SEND_MAST_ID=bb.send_mast_id)
where bb.stat_cd IN ('open', 'sendcmplt') and bb.tmplt_cd like '%3';
insert into tb_ens_sndng_mastr
select concat('KKO', send_mast_id)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kko_md b inner join tb_elctrn_ntic_sndng_detail c on b.prop_external_document_uuid=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum=1)
, org_cd
, '11'
, tmplt_cd
, 'ENS'
, 'KKO-MY-DOC'
, send_cnt
, '1'
, '1'
, 'send_ok'
, to_char(send_dt, 'yyyymmddhh24miss')
, to_char(close_dt, 'yyyymmddhh24miss')
, ''
, ''
, ''
, null
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt')
and tmplt_cd like '%2';
insert into tb_ens_sndng_mastr
select concat('KTG', send_mast_id)
, (select c.elctrn_ntic_sndng_id from ens_snd_dtl_kt_gbs b inner join tb_elctrn_ntic_sndng_detail c on b.LINKED_UUID=c.external_document_uuid where a.send_mast_id = b.send_mast_id and rownum=1)
, org_cd
, '11'
, tmplt_cd
, 'ENS'
, 'KT-GBS'
, send_cnt
, '1'
, '1'
, 'send_ok'
, to_char(send_dt, 'yyyymmddhh24miss')
, to_char(close_dt, 'yyyymmddhh24miss')
, ''
, ''
, ''
, null
, ''
, regist_dt
, 'system'
, last_updt_dt
, 'system'
from ens_snd_mast a
where stat_cd IN ('open', 'sendcmplt')
and tmplt_cd like '%3';
insert into tb_ens_kakao_my_doc
select concat('KKO', a.send_detail_id)
, (select b.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail b where a.prop_external_document_uuid=b.external_document_uuid)
, concat('KKO', a.send_mast_id)
, bb.org_cd
, '11'
, a.title
, a.hash
, a.common_categories
, a.read_expiread_at
, a.recv_ci
, ''
, ''
, ''
, a.recv_is_require_vfy_name
, a.prop_link
, a.prop_payload
, a.prop_message
, a.prop_cs_number
, a.prop_cs_name
, a.prop_external_document_uuid
, a.document_binder_uuid
, a.error_code
, a.error_message
, a.kko_doc_stat
, FN_GET_DATETOUNIXTIME(a.kko_doc_sent_dt)
, FN_GET_DATETOUNIXTIME(a.kko_doc_received_dt)
, FN_GET_DATETOUNIXTIME(a.kko_doc_auth_frst_dt)
, FN_GET_DATETOUNIXTIME(a.kko_doc_token_vrfy_frst_dt)
, FN_GET_DATETOUNIXTIME(a.kko_doc_read_frst_dt)
, FN_GET_DATETOUNIXTIME(a.kko_doc_user_notied_dt)
, a.regist_dt
, 'system'
, a.last_updt_dt
, 'system'
from ens_snd_dtl_kko_md a
inner join ens_snd_mast bb on (a.SEND_MAST_ID=bb.send_mast_id)
where bb.stat_cd IN ('open', 'sendcmplt') and bb.tmplt_cd like '%2';
insert into tb_ens_kt_gbs
select concat('KTG', b.SEND_MAST_ID)
, concat('KTG', b.send_detail_id)
, (select bb.elctrn_ntic_sndng_detail_id from tb_elctrn_ntic_sndng_detail bb where b.LINKED_UUID=bb.external_document_uuid)
, E.ORG_CD
, '11'
, E.KT_ST_SERVICE_CD
, ''
, ''
, A.SEND_CNT
, TO_CHAR(A.CLOSE_DT, 'YYYYMMDDHH24MISS')
, TO_CHAR(A.CLOSE_DT, 'YYYYMMDDHH24MISS')
, ''
, D.M_TYPE
, D.MSG_TYPE
, D.OPT_TYPE
, B.SRC_KEY
, B.SRC_SEQ
, B.CI
, B.MMS_DTL_CNTS
, B.MMS_TITLE
, ''
, B.URL
, B.HASH
, ''
, ''
, ''
, ''
, ''
, ''
, B.DOC_STAT
, B.DOC_SENT_DT
, B.DOC_RECEIVED_DT
, B.DOC_READ_FRST_DT
, ''
, ''
, ''
, ''
, sysdate
, ''
, ''
, ''
FROM ENS_SND_MAST A
INNER JOIN ENS_SND_DTL_KT_GBS B ON (A.SEND_MAST_ID=B.SEND_MAST_ID)
INNER JOIN ENS_TMPLT_MNG C ON (A.TMPLT_CD=C.TMPLT_CD)
INNER JOIN ENS_TMPLT_MNG_KT_GBS D ON (A.TMPLT_CD=D.TMPLT_CD)
INNER JOIN ENS_ORG_MNG E ON (A.ORG_CD=E.ORG_CD)
where a.STAT_CD in ('open', 'sendcmplt');

@ -1,107 +0,0 @@
<?xml version="1.0"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0">
<localRepository>C:/repo</localRepository>
<servers>
<server>
<id>nexus</id>
<username>xituser</username>
<password>5811807</password>
</server>
<server>
<id>maven-snapshots</id>
<username>xituser</username>
<password>5811807</password>
</server>
<server>
<id>maven-releases</id>
<username>xituser</username>
<password>5811807</password>
</server>
<server>
<id>maven-public</id>
<username>xituser</username>
<password>5811807</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>nexus</mirrorOf>
<url>https://nas.xit.co.kr:8888</url>
</mirror>
<mirror>
<id>maven-snapshots</id>
<mirrorOf>maven-snapshots</mirrorOf>
<url>https://nas.xit.co.kr:8888/repository/maven-snapshots/</url>
</mirror>
<mirror>
<id>maven-releases</id>
<mirrorOf>maven-releases</mirrorOf>
<url>https://nas.xit.co.kr:8888/repository/maven-releases/</url>
</mirror>
<mirror>
<id>maven-public</id>
<mirrorOf>maven-public</mirrorOf>
<url>https://nas.xit.co.kr:8888/repository/maven-public/</url>
</mirror>
<!-- http nexus 접근 허용이 필요한 경우 -->
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:dont-match-anything-mate:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP</name>
<url>http://0.0.0.0/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-snapshots</id>
<url>https://nas.xit.co.kr:8888/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>maven-releases</id>
<url>https://nas.xit.co.kr:8888/repository/maven-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>maven-public</id>
<url>https://nas.xit.co.kr:8888/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>kr.xit</groupId>
<artifactId>mens-traffic-parent</artifactId>
<artifactId>mens-parent</artifactId>
<version>1.0.0</version>
</parent>
@ -25,12 +25,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.apache.tomcat.embed</groupId>-->
<!-- <artifactId>tomcat-embed-core</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<exclusions>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -58,22 +58,6 @@
<systemPath>${basedir}/lib/ojdbc6.jar</systemPath>
</dependency>
<!-- spring 3.0 이상 javax.servlet:jstl이 아닌 jakarta servlet -->
<!-- <dependency>-->
<!-- <groupId>org.glassfish.web</groupId>-->
<!-- <artifactId>jakarta.servlet.jsp.jstl</artifactId>-->
<!-- <version>2.0.0</version>-->
<!-- </dependency>-->
<!-- spring 3.0 이상 javax.servlet:jstl이 아닌 jakarta servlet -->
<!-- jsp set -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<!-- jsp set -->
</dependencies>
@ -88,38 +72,16 @@
<include>*</include>
<include>static/**/*</include>
<include>egovframework/**/*</include>
<include>config/application-${env}.yml</include>
<include>config/application.yml</include>
<include>config/application-app.yml</include>
<include>config/application-ens.yml</include>
<include>config/application-ens*</include>
<include>config/application-jpa.yml</include>
<include>config/application-${env}.yml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/static</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- dependency 추가 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -161,16 +123,7 @@
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-javadoc-plugin</artifactId>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jxr-plugin</artifactId>-->
<!-- </plugin>-->
</plugins>
</build>
</project>

@ -1,16 +1,15 @@
package kr.xit.biz.kt.mapper;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.mapper
* fileName : IBizKtBcMapper
* fileName : IBizKtMmsMapper
* author : limju
* date : 2023-10-12
* ======================================================================
@ -21,8 +20,8 @@ import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
* </pre>
*/
@Mapper
public interface IBizKtBcMapper {
void updateRlaybsnmKtBcInfo(final CmmEnsRlaybsnmDTO dto);
public interface IBizKtMmsMapper {
int updateRlaybsnmKtInfo(final CmmEnsRlaybsnmDTO dto);
int updateKtBcDtl(final KtMsgRsltReqData dto);
void saveKtBcCntcSndngResult(final KtMsgRsltReqData dto);
int saveKtCntcSndngResult(final KtMsgRsltReqData dto);
}

@ -1,11 +1,6 @@
package kr.xit.biz.kt.service;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
@ -16,23 +11,26 @@ import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
import kr.xit.biz.kt.mapper.IBizKtBcMapper;
import kr.xit.biz.kt.mapper.IBizKtMmsMapper;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import kr.xit.ens.kt.service.IKtBcService;
import kr.xit.ens.kt.web.KtBcInboundController;
import kr.xit.ens.kt.service.IKtMmsService;
import kr.xit.ens.kt.web.KtMmsInboundController;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.service
* fileName : BizKtBcService
* fileName : BizKtMmsService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -44,10 +42,10 @@ import lombok.RequiredArgsConstructor;
*/
@RequiredArgsConstructor
@Service
public class BizKtBcService extends AbstractService implements IBizKtBcService {
private final IKtBcService ktMmsService;
public class BizKtMmsService extends AbstractService implements IBizKtMmsService {
private final IKtMmsService ktMmsService;
private final ICmmEnsCacheService cacheService;
private final IBizKtBcMapper mapper;
private final IBizKtMmsMapper mapper;
/**
* <pre>
@ -66,11 +64,11 @@ public class BizKtBcService extends AbstractService implements IBizKtBcService {
if(StringUtils.isEmpty(resDTO.getAccessToken())){
throw BizRuntimeException.create("fail.api.kt.token.request");
}
mapper.updateRlaybsnmKtBcInfo(
mapper.updateRlaybsnmKtInfo(
CmmEnsRlaybsnmDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(paramDTO.getProfile())
.profile(ApiConstants.PROFILE)
.ktAccessToken(resDTO.getAccessToken())
.ktTokenExpiresIn(resDTO.getExpiresIn())
.ktScope(resDTO.getScope())
@ -92,7 +90,7 @@ public class BizKtBcService extends AbstractService implements IBizKtBcService {
* / /
* - KT
* - http://{각대행사(IP:Port)}/api/ag/message/result
* {@link KtBcInboundController#messageResult messageResult}
* {@link KtMmsInboundController#messageResult messageResult}
*
*
* -> 1 ,
@ -122,7 +120,7 @@ public class BizKtBcService extends AbstractService implements IBizKtBcService {
String.format("존재 하지 않는 발송 대상(src_key[%s], mms_sndg_rslt_sqno[%s]) 입니다",
dto.getSrcKey(), dto.getMmsSndgRsltSqno())));
}
mapper.saveKtBcCntcSndngResult(dto);
mapper.saveKtCntcSndngResult(dto);
}
return KtCommonResponse.builder()

@ -12,7 +12,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
* description :
*
* packageName : kr.xit.biz.kt.service
* fileName : IBizKtBcService
* fileName : IBizKtMmsService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -22,7 +22,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
*
* </pre>
*/
public interface IBizKtBcService {
public interface IBizKtMmsService {
KtTokenResponse requestToken(final KtMnsRequest paramDTO);
// KtCommonResponse mainSend(final KtMnsRequest reqDTO);

@ -1,28 +1,27 @@
package kr.xit.biz.kt.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.web
* fileName : BizKtBcController
* fileName : BizKtMmsController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -32,12 +31,12 @@ import lombok.extern.slf4j.Slf4j;
*
* </pre>
*/
@Tag(name = "BizKtBcController", description = "KT BC 업무처리 Controller")
@Tag(name = "BizKtMmsController", description = "KT MMS 업무처리 Controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/biz/kt/v1")
@Slf4j
public class BizKtBcController {
public class BizKtMmsController {
private static final String PARAM1 = """
{
"signguCode": "88328",
@ -53,7 +52,7 @@ public class BizKtBcController {
}
""";
private final IBizKtBcService service;
private final IBizKtMmsService service;
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(

@ -1,28 +0,0 @@
package kr.xit.biz.ktgbs.mapper;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.ktgbs.mapper
* fileName : IBizKtGbsMapper
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@Mapper
public interface IBizKtGbsMapper {
void updateRlaybsnmKtGbsInfo(final CmmEnsRlaybsnmDTO dto);
int updateKtGbsDtl(final KtGbsDTO.MsgRsltReqsData dto);
void saveKtGbsCntcSndngResult(final KtGbsDTO.MsgRsltReqsData dto);
}

@ -1,149 +0,0 @@
package kr.xit.biz.ktgbs.service;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.ktgbs.mapper.IBizKtGbsMapper;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import kr.xit.ens.kt.web.KtBcInboundController;
import kr.xit.ens.ktgbs.service.IKtGbsService;
import lombok.RequiredArgsConstructor;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.ktgbs.service
* fileName : BizKtGbsService
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@RequiredArgsConstructor
@Service
public class BizKtGbsService extends AbstractService implements IBizKtGbsService {
private final IKtGbsService ktGbsService;
private final ICmmEnsCacheService cacheService;
private final IBizKtGbsMapper mapper;
/**
* <pre>
* kt Access token
* 1. kt Access token
* 2. DB
* 3.
* @param paramDTO KtMnsRequest
* @return KtTokenResponse
* </pre>
*/
@Override
public KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO) {
KtGbsDTO.TokenResponse resDTO = ktGbsService.requestToken(paramDTO);
if(StringUtils.isEmpty(resDTO.getAccessToken())){
throw BizRuntimeException.create("fail.api.kt.token.request");
}
mapper.updateRlaybsnmKtGbsInfo(
CmmEnsRlaybsnmDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(paramDTO.getProfile())
.ktAccessToken(resDTO.getAccessToken())
.build()
);
cacheService.removeRlaybsnmInfoCache(
CmmEnsRequestDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(paramDTO.getProfile())
.build()
);
return resDTO;
}
/**
* <pre>
* / /
* - KT
* - http://{각대행사(IP:Port)}/api/ag/message/result
* {@link KtBcInboundController#messageResult messageResult}
*
*
* -> 1 ,
* ->
*
* @param reqDTO KtMsgRsltRequest
* @return KtCommonResponse
* </pre>
*/
@Override
@TraceLogging
@Transactional
public KtCommonDTO.KtCommonResponse messageResult(final KtGbsDTO.MsgRsltRequest reqDTO) {
List<ErrorMsg> errors = CmmEnsUtils.getValidateErrors(reqDTO);
if(!errors.isEmpty()) return throwError(errors);
for(KtGbsDTO.MsgRsltReqsData dto : reqDTO.getReqs()){
// 결과코드가 '40' 이고 열람타임스탬프가 있는 경우 -> 결과코드 '열람확인:60'으로 reset
if("40".equals(dto.getMmsRsltDvcd()) && Checks.isNotEmpty(dto.getMmsRdgTmst())){
dto.setMmsRsltDvcd("60");
}
dto.setMmsRsltDvcdMsg(messageUtil.getMessage("info.api.kt.msg.rslt."+dto.getMmsRsltDvcd()));
if(mapper.updateKtGbsDtl(dto) != 1) {
errors.add(new ErrorMsg(
String.format("존재 하지 않는 발송 대상(src_key[%s], mms_rslt_sqno[%s]) 입니다",
dto.getSrcKey(), dto.getMmsSndgRsltSqno())));
}
// 업무 테이블에 발송 결과 상태 적용
if (("40").equals(dto.getMmsRsltDvcd())) {
dto.setMmsRsltDvcd("RECEIVED");
} else if (("60").equals(dto.getMmsRsltDvcd())) {
dto.setMmsRsltDvcd("READ");
} else if (("4N").equals(dto.getMmsRsltDvcd())) {
dto.setMmsRsltDvcd("FORBIDDEN");
} else if (("4T").equals(dto.getMmsRsltDvcd())) {
dto.setMmsRsltDvcd("UNIDENTIFIED_USER");
} else {
dto.setMmsRsltDvcd("FAIL");
}
mapper.saveKtGbsCntcSndngResult(dto);
}
return KtCommonDTO.KtCommonResponse.builder()
.resultCd("00")
.resultDt(DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_EMPTY_DLT))
.build();
}
private static KtCommonDTO.KtCommonResponse throwError(List<ErrorMsg> errors) {
return KtCommonDTO.KtCommonResponse.builder()
.resultCd("01")
.resultDt(DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_EMPTY_DLT))
.errors(errors)
.build();
}
}

@ -1,26 +0,0 @@
package kr.xit.biz.ktgbs.service;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.ktgbs.service
* fileName : IBizKtGbsService
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
public interface IBizKtGbsService {
KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse messageResult(final KtGbsDTO.MsgRsltRequest reqDTO);
}

@ -1,75 +0,0 @@
package kr.xit.biz.ktgbs.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ktgbs.service.IBizKtGbsService;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.ktgbs.web
* fileName : BizKtGbsController
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@Tag(name = "BizKtGbsController", description = "KT GIBIS 업무처리 Controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/biz/ktgbs/v1")
@Slf4j
public class BizKtGbsController {
private static final String PARAM1 = """
{
"signguCode": "44131",
"ffnlgCode": "11",
"profile": "local"
}
""";
private static final String PARAM2 = """
{
"signguCode": "44133",
"ffnlgCode": "11",
"profile": "local"
}
""";
private final IBizKtGbsService service;
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(
mediaType = "application/json",
examples = {
@ExampleObject(
name = "천안시동남구청",
value = PARAM1),
@ExampleObject(
name = "천안시서북구청",
value = PARAM2)
})
})
@Operation(deprecated = true, summary = "기관용 토큰 발급 요청-batch에서 호출", description = "기관용 토큰 발급 요청-batch에서 호출")
@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestToken(@RequestBody final KtMnsRequest paramDTO) {
return ApiResponseDTO.success(service.requestToken(paramDTO));
}
}

@ -1,9 +1,8 @@
package kr.xit.biz.mbl.mapper;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.biz.mbl.model.MobilePageDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.mbl.model.MobilePageDTO.MobilePageManage;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
@ -22,9 +21,6 @@ import kr.xit.biz.mbl.model.MobilePageDTO.MobilePageManage;
*/
@Mapper
public interface IMobilePageMapper {
MobilePageManage selectKkopayMobilePage(final MobilePageDTO.KakaoValidTokenRequest dto);
MobilePageManage selectKkotalkMobilePage(final MobilePageDTO.KakaoValidTokenRequest dto);
<T> MobilePageManage selectKtBcMobilePage(final T t);
<T> MobilePageManage selectKtGbsMobilePage(final T t);
MobilePageManage selectKkoMobilePage(final OneTimeToken dto);
<T> MobilePageManage selectKtMobilePage(final T t);
}

@ -1,14 +1,9 @@
package kr.xit.biz.mbl.model;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -69,36 +64,4 @@ public class MobilePageDTO {
*/
private String register;
}
@Schema(name = "KakaoValidTokenRequest DTO", description = "카카오페이/톡 전자문서 토큰 유효성 검증 파라메터 DTO")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KakaoValidTokenRequest {
/**
* ID
*/
private String envelopeId;
/**
* ID
*/
private String externalId;
/**
*
*/
private String documentBinderUuid;
/**
* ( - max:40)
*/
private String externalDocumentUuid;
/**
* / :
*/
private String token;
}
}

@ -1,8 +1,8 @@
package kr.xit.biz.mbl.service;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenConfirmRequest;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.mbl.model.MobilePageDTO;
import kr.xit.core.model.IApiResponse;
/**
* <pre>
@ -20,9 +20,8 @@ import kr.xit.biz.mbl.model.MobilePageDTO;
* </pre>
*/
public interface IMobilePageService {
String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKtBcMblPage(final KtTokenConfirmRequest reqDTO);
String findKtGbsMblPage(final KtGbsDTO.TokenConfirmRequest reqDTO);
IApiResponse findKkoMyDocReadyAndMblPage(OneTimeToken reqDTO);
IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO);
}

@ -1,28 +1,22 @@
package kr.xit.biz.mbl.service;
import org.springframework.stereotype.Service;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.talk.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.kt.KtTokenDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.mbl.mapper.IMobilePageMapper;
import kr.xit.biz.mbl.model.MobilePageDTO;
import kr.xit.biz.mbl.model.MobilePageDTO.MobilePageManage;
import kr.xit.core.consts.ErrorCode;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.ens.kakao.pay.service.IKkopayEltrcDocService;
import kr.xit.ens.kakao.talk.service.IKkotalkEltrcDocService;
import kr.xit.ens.kt.service.IKtBcService;
import kr.xit.ens.ktgbs.service.IKtGbsService;
import kr.xit.ens.kakao.service.IKkopayEltrcDocService;
import kr.xit.ens.kt.service.IKtMmsService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* <pre>
@ -44,51 +38,8 @@ import lombok.extern.slf4j.Slf4j;
@Service
public class MobilePageService extends AbstractService implements IMobilePageService {
private final IMobilePageMapper mapper;
private final IKkopayEltrcDocService kkopayService;
private final IKkotalkEltrcDocService kkotalkService;
private final IKtBcService ktBcService;
private final IKtGbsService ktGbsService;
/**
* <pre>
* </h3>
* - : (bulks-) document_binder_uuid
* - redirect url
* ->
* -> > >
*
*
* 1. (redirect url /
* 2.
*
* @param reqDTO KkopayDocDTO.OneTimeToken
* </pre>
*/
//@Override
@TraceLogging
public String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getDocumentBinderUuid()) || Checks.isEmpty(reqDTO.getExternalDocumentUuid()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "카카오페이 정상 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
final MobilePageManage mobilePageManage = mapper.selectKkopayMobilePage(reqDTO);
if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오페이 내문서함 정보가 없습니다]");
// FIXME: 테스트를 위해 임시로 주석처리
final ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> res = kkopayService.findKkopayReadyAndMblPage(
KkopayDocDTO.OneTimeToken.builder()
.document_binder_uuid(reqDTO.getDocumentBinderUuid())
.external_document_uuid(reqDTO.getExternalDocumentUuid())
.token(reqDTO.getToken())
.signguCode(mobilePageManage.getSignguCode())
.ffnlgCode(mobilePageManage.getFfnlgCode())
.build()
);
if(!res.isSuccess()){
throw BizRuntimeException.create(res.getCode(), res.getMessage());
}
return mobilePageManage.getMobilePageCn();
}
private final IKkopayEltrcDocService kkoService;
private final IKtMmsService ktMmsService;
/**
* <pre>
@ -107,32 +58,27 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public IApiResponse findKkoMyDocReadyAndMblPage(KkopayDocDTO.OneTimeToken reqDTO) {
if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getEnvelopeId()) || Checks.isEmpty(reqDTO.getExternalId()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "카카오톡 정상 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getDocument_binder_uuid()) || Checks.isEmpty(reqDTO.getExternal_document_uuid()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
// document_binder_uuid와 external_document_uuid로 데이타 검증
final MobilePageManage mobilePageManage = mapper.selectKkoMobilePage(reqDTO);
if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[내문서함 문서가 없습니다]");
final MobilePageManage mobilePageManage = mapper.selectKkotalkMobilePage(reqDTO);
if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오톡 인증 문서 정보가 없습니다]");
reqDTO.setSignguCode(mobilePageManage.getSignguCode());
reqDTO.setFfnlgCode(mobilePageManage.getFfnlgCode());
// FIXME: 테스트를 위해 임시로 주석처리
final ApiResponseDTO<KkotalkApiDTO.ValidTokenResponse> res = kkotalkService.findKkotalkReadyAndMblPage(
KkotalkApiDTO.ValidTokenRequest.builder()
.envelopeId(reqDTO.getEnvelopeId())
.token(reqDTO.getToken())
.signguCode(mobilePageManage.getSignguCode())
.ffnlgCode(mobilePageManage.getFfnlgCode())
.build()
);
final ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> res = kkoService.findMyDocReadyAndMblPage(reqDTO);
if(!res.isSuccess()){
throw BizRuntimeException.create(res.getCode(), res.getMessage());
return res;
}
return mobilePageManage.getMobilePageCn();
return ApiResponseDTO.success(mobilePageManage.getMobilePageCn());
}
/**
* <pre>
* KT BC
* KT
* - (BC-AG-SN-002) API
* -> url(callback)
* -> callback url ? token=...
@ -147,16 +93,21 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public String findKtBcMblPage(final KtTokenDTO.KtTokenConfirmRequest reqDTO) {
public IApiResponse findKtMblPage(final KtTokenDTO.KtTokenConfirmRequest reqDTO) {
//TODO::테스트
//MobilePageManage mblDTO = mapper.selectKtMobilePage("DPDKT202311080000111");
//return ApiResponseDTO.success(mblDTO.getMobilePageCn());
//TODO::실운영시 코멘트 제거
if (Checks.isEmpty(reqDTO.getAccessToken()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "KT BC 안심문자 정상 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
final String signguCode = reqDTO.getSignguCode();
final String ffnlgCode = reqDTO.getFfnlgCode();
final KtTokenDTO.KtTokenConfirmResponse cfmRes = ktBcService.cfmToken(reqDTO);
final KtTokenDTO.KtTokenConfirmResponse cfmRes = ktMmsService.cfmToken(reqDTO);
if(cfmRes.getResultCd().equals("00")){
KtCommonDTO.KtCommonResponse readRes = ktBcService.readToken(
KtCommonDTO.KtCommonResponse readRes = ktMmsService.readToken(
KtTokenDTO.KtTokenReadRequest.builder()
.signguCode(signguCode)
.ffnlgCode(ffnlgCode)
@ -166,53 +117,8 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
if(readRes.getResultCd().equals("00")){
String srcKey = cfmRes.getSrcKey();
final MobilePageManage mobilePageManage = mapper.selectKtBcMobilePage(srcKey);
return mobilePageManage.getMobilePageCn();
}
throw BizRuntimeException.create(readRes.getResultCd(), readRes.toStringErrorMsg());
}
throw BizRuntimeException.create(cfmRes.getResultCd(), cfmRes.toStringErrorMsg());
}
/**
* <pre>
* KT GIBIS
* - API
* -> url(callback)
* -> callback url ? token=...
* 1. API call
* 2. API call
* -> srcKey
* 3. kt BIBIS
* -> return
* @param reqDTO KtTokenConfirmRequest
* @return
* </pre>
*/
@Override
@TraceLogging
public String findKtGbsMblPage(final KtGbsDTO.TokenConfirmRequest reqDTO) {
if (Checks.isEmpty(reqDTO.getToken()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "KT GIBIS 안심문자 정상 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
final String signguCode = reqDTO.getSignguCode();
final String ffnlgCode = reqDTO.getFfnlgCode();
final KtCommonDTO.KtCommonResponse cfmRes = ktGbsService.cfmToken(reqDTO);
if(cfmRes.getResultCd().equals("00")){
KtCommonDTO.KtCommonResponse readRes = ktGbsService.readToken(
KtGbsDTO.TokenReadRequest.builder()
.signguCode(signguCode)
.ffnlgCode(ffnlgCode)
.accessToken(reqDTO.getToken())
.mmsRdgTmst(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"))
.build()
);
if(readRes.getResultCd().equals("00")){
String srcKey = reqDTO.getSrcKey();
final MobilePageManage mobilePageManage = mapper.selectKtGbsMobilePage(srcKey);
return mobilePageManage.getMobilePageCn();
final MobilePageManage mobilePageManage = mapper.selectKtMobilePage(srcKey);
return ApiResponseDTO.success(mobilePageManage.getMobilePageCn());
}
throw BizRuntimeException.create(readRes.getResultCd(), readRes.toStringErrorMsg());
}

@ -1,16 +0,0 @@
package kr.xit.biz.mbl.web;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class CustomErrorController implements ErrorController {
@RequestMapping("/error")
public ModelAndView handleError() {
// 에러 페이지로 이동
return new ModelAndView("/error");
}
}

@ -1,27 +1,21 @@
package kr.xit.biz.mbl.web;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import javax.servlet.http.HttpServletRequest;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.SignguCode;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO;
import kr.xit.biz.ens.model.kt.KtTokenDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.mbl.model.MobilePageDTO;
import kr.xit.biz.mbl.service.IMobilePageService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
@ -41,7 +35,7 @@ import lombok.RequiredArgsConstructor;
@Tag(name = "MobilePageController", description = "전자문서 중개자 모바일 페이지 API Controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/biz/mbl")
@RequestMapping(value = "/api/biz/mbl/v1")
public class MobilePageController {
private final IMobilePageService service;
@ -55,40 +49,14 @@ public class MobilePageController {
* </pre>
*/
@Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)")
@RequestMapping(
value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE)
public ModelAndView findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId()))
|| StringUtils.isEmpty(reqDTO.getToken())) {
throw BizRuntimeException.create("정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
}
ModelAndView mav = new ModelAndView();
mav.setViewName("/notiprnt");
try {
if(StringUtils.isNotEmpty(reqDTO.getDocumentBinderUuid())) {
mav.addObject("details", service.findKkopayReadyAndMblPage(reqDTO));
}else{
mav.addObject("details", service.findKkotalkReadyAndMblPage(reqDTO));
}
} catch (BizRuntimeException e){
mav.addObject("errCode", e.getErrorCode());
mav.addObject("errMsg", e.getMessage());
}catch (Exception e){
mav.addObject("errCode", e.getMessage());
mav.addObject("errMsg", e.getMessage());
}
return mav;
@PostMapping(value = "/kko/mblPage", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findKkoMyDocReadyAndMblData(@RequestBody final KkopayDocDTO.OneTimeToken reqDTO) {
return service.findKkoMyDocReadyAndMblPage(reqDTO);
}
/**
* <pre>
* KT
* /kt/mblPage/old - ( API )
* /kt/mblPage/canES -
* /kt/mblPage/canWB -
* - (BC-AG-SN-002) API
* -> url(callback)
* -> callback url ? token=...
@ -106,72 +74,20 @@ public class MobilePageController {
* </pre>
*/
@Operation(summary = "KT 모바일 데이타 요청(모바일 페이지에서 호출)", description = "KT 모바일 데이타 요청(모바일 페이지에서 호출)")
@RequestMapping(
value = {"/kt/mblPage/old", "/kt/mblPage/canES", "/kt/mblPage/canWN"},
method = {RequestMethod.POST, RequestMethod.GET},
@PostMapping(
value = {"/kt/dpMblPage", "/kt/meMblPage"},
produces = MediaType.APPLICATION_JSON_VALUE)
public ModelAndView findKtMblPage(@RequestParam final String token, @RequestParam final String src_key, final HttpServletRequest request) {
public IApiResponse findKtMblPage(@RequestParam final String token, final HttpServletRequest request) {
final String uri = request.getRequestURI();
String mblCnts = "";
ModelAndView mav = new ModelAndView();
mav.setViewName("/notiprnt");
try{
switch (uri) {
case "/api/biz/mbl/kt/mblPage/canES":
mblCnts = service.findKtGbsMblPage(
KtGbsDTO.TokenConfirmRequest.builder()
.signguCode(SignguCode.CHEONAN_ES.getCode())
.ffnlgCode(ApiConstants.FFNLN_CODE)
.token(token)
.srcKey(src_key)
.build()
);
break;
case "/api/biz/mbl//kt/mblPage/canWN":
mblCnts = service.findKtGbsMblPage(
KtGbsDTO.TokenConfirmRequest.builder()
.signguCode(SignguCode.CHEONAN_WN.getCode())
.ffnlgCode(ApiConstants.FFNLN_CODE)
.token(token)
.srcKey(src_key)
.build()
);
break;
case "/api/biz/mbl/kt/mblPage/old":
String signguCode = "";
if(("CDO01").equals(request.getParameter("service_cd"))){
signguCode = SignguCode.CHEONAN_ES.getCode();
} else if(("CSO01").equals(request.getParameter("service_cd"))){
signguCode = SignguCode.CHEONAN_WN.getCode();
} else {
throw BizRuntimeException.create(String.format("정상적인 요청이 아닙니다. 요청 url을 확인해 주세요.\n(요청 URL: %s)", uri));
}
mblCnts = service.findKtGbsMblPage(
KtGbsDTO.TokenConfirmRequest.builder()
.signguCode(signguCode)
.ffnlgCode(ApiConstants.FFNLN_CODE)
.token(token)
.srcKey(src_key)
.build()
);
default:
throw BizRuntimeException.create(String.format("정상적인 요청이 아닙니다. 요청 url을 확인해 주세요.\n(요청 URL: %s)", uri));
}
mav.addObject("details", mblCnts);
} catch (BizRuntimeException e){
mav.addObject("errCode", e.getErrorCode());
mav.addObject("errMsg", e.getMessage());
} catch (Exception e){
mav.addObject("errCode", e.getMessage());
mav.addObject("errMsg", e.getMessage());
final KtTokenDTO.KtTokenConfirmRequest cfmReqDTO = KtTokenDTO.KtTokenConfirmRequest.builder()
.signguCode(SignguCode.TRAFFIC.getCode())
.ffnlgCode(ApiConstants.FFNLN_CODE)
.accessToken(token)
.build();
if(uri.contains("meMblPage")){
cfmReqDTO.setSignguCode(SignguCode.FUNERAL.getCode());
}
return mav;
return service.findKtMblPage(cfmReqDTO);
}
}

@ -1,9 +1,5 @@
package kr.xit.biz.nice.service;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.biz.cmm.service.CmmEnsCacheService;
import kr.xit.biz.common.ApiConstants.NiceCiWrkDiv;
import kr.xit.biz.common.ApiConstants.SignguCode;
@ -26,6 +22,9 @@ import kr.xit.ens.nice.cmm.CmmNiceCiUtils;
import kr.xit.ens.nice.service.INiceCiService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* <pre>
@ -106,7 +105,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
// 공개키 정보 캐쉬 삭제
cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode());
//updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN);
updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN);
//----------------------------------------------------------------------------------
}
@ -146,7 +145,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
// 공개키 정보 캐쉬 삭제
cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode());
//updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN);
updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN);
}else{
throw BizRuntimeException.create("토큰을 폐기하지 못했습니다.");
}
@ -184,7 +183,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
// 공개키 정보 캐쉬 삭제
cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode());
//updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.PUBLIC_KEY);
updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.PUBLIC_KEY);
return dataBody;
}
@ -228,7 +227,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
// 공개키 정보 캐쉬 삭제
cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode());
//updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.SYM_KEY);
updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.SYM_KEY);
return symkeyStatInfo;
}
@ -247,7 +246,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
/**
* <pre>
* Nice CI sync
* Nice CI sync
* @param niceDTO NiceCiInfo
* @param reqDTO NiceCiRequest
* @param wrkDiv NiceCiWrkDiv
@ -255,12 +254,12 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi
*/
private void updateNiceCerfInfoSync(final NiceCiInfo niceDTO, final NiceCiRequest reqDTO, final NiceCiWrkDiv wrkDiv) {
// 교통시설운영처 또는 장사시설인 경우 sync ----------------------------------------
if(SignguCode.CHEONAN_ES.getCode().equals(reqDTO.getSignguCode())){
niceDTO.setSignguCode(SignguCode.CHEONAN_WN.getCode());
if(SignguCode.TRAFFIC.getCode().equals(reqDTO.getSignguCode())){
niceDTO.setSignguCode(SignguCode.FUNERAL.getCode());
}
if(SignguCode.CHEONAN_WN.getCode().equals(reqDTO.getSignguCode())){
niceDTO.setSignguCode(SignguCode.CHEONAN_ES.getCode());
if(SignguCode.FUNERAL.getCode().equals(reqDTO.getSignguCode())){
niceDTO.setSignguCode(SignguCode.TRAFFIC.getCode());
}
switch(wrkDiv){

@ -0,0 +1,27 @@
package kr.xit.biz.other.mapper;
import kr.xit.biz.other.model.ElecnoticeDTO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.util.List;
/**
* <pre>
* description : mapper
*
* packageName : kr.xit.biz.other.mapper
* fileName : IBizOtherMapper
* author : seojh
* date : 2024-01-03
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-03 seojh
*
* </pre>
*/
@Mapper
public interface IBizOtherMapper {
List<ElecnoticeDTO.Elecnoticemst> selectElecnoticemst();
}

@ -0,0 +1,122 @@
package kr.xit.biz.other.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description : DTO
*
* packageName : kr.xit.biz.other.model
* fileName : ElecnoticeDTO
* author : seojh
* date : 2024-01-03
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-03 seojh
*
* </pre>
*/
public class ElecnoticeDTO {
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public static class Elecnoticemst {
/**
*
*/
private String unitysndngmastrid;
/**
*
*/
private String sndngco;
/**
*
*/
private String sndngprocesssttus;
/**
*
*/
private String insuser;
/**
*
*/
private String insdate;
/**
*
*/
private String upduser;
/**
*
*/
private String upddate;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public static class Elecnoticedtl extends Elecnoticemst {
/**
*
*/
private String unitysndngdetailid;
/**
*
*/
private String sndngdt;
/**
*
*/
private String tmplatid;
/**
*
*/
private String gojidepth;
/**
*
*/
private String taxnum1;
/**
*
*/
private String taxnum2;
/**
*
*/
private String taxnum3;
/**
*
*/
private String taxnum4;
/**
*
*/
private String worker;
/**
*
*/
private String serialno;
/**
*
*/
private String recvdt;
/**
*
*/
private String readdt;
/**
*
*/
private String resultcode;
}
}

@ -0,0 +1,38 @@
package kr.xit.biz.sisul.mapper;
import java.util.List;
import java.util.Optional;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO;
import kr.xit.biz.ens.model.cmm.TmplatManage;
import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description : File mapper
*
* packageName : kr.xit.biz.sisul.mapper
* fileName : IBizSisulMapper
* author : seojh
* date : 2023-10-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-19 seojh
*
* </pre>
*/
@Mapper
public interface IBizSisulMapper {
Optional<TmplatManage> selectDeptInfoByTmplId(final String tmplatId);
int insertCntcSndngMst(CntcDTO.SndngMst dto);
int insertCntcSndngDtl(CntcDTO.SndngDtl dto);
int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto);
int insertPostPlusJson(CntcDTO.PostPlusJson dto);
Optional<RsltSisulResMstData> selectSndngResultMaster(final RsltSisulRequest dto);
List<RsltSisulResDtlData> selectSndngResultDetails(final RsltSisulRequest dto);
}

@ -0,0 +1,146 @@
package kr.xit.biz.sisul.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sisul.model
* fileName : SisulSndngResultDTO
* author : limju
* date : 2023-11-02
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-11-02 limju
*
* </pre>
*/
public class SisulSndngResultDTO {
@Schema(name = "RsltSisulRequest", description = "발송결과정보 조회 request DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class RsltSisulRequest {
/**
* ID -
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "파일유일키", example = "DPMKK271000000777777")
@Size(min = 1, max = 20, message = "파일유일키는 필수 입니다(max:20)")
private String unitySndngMastrId;
/**
* ID -
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "우편물 일련번호", example = " ")
@Size(max = 20, message = "우편물 일련번호는 20자를 넘을 수 없습니다.")
private String unitySndngDetailId;
}
@Schema(name = "RsltSisulResMstData", description = "발송결과정보 master 조회 response DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class RsltSisulResMstData {
/**
* ID -
*/
private String unitySndngMastrId;
/**
* - KKO-MY-DOC|KT-BC|POST-PLUS
*/
private String sndngSeCode;
/**
* 릿ID
*/
private String tmplatId;
/**
*
*/
private Integer sndngCo;
/**
*
*/
private String sndngProcessSttus;
/**
* : yyyyMMddHHmiss
*/
private String sndngDt;
}
@Schema(name = "RsltSisulResDtlData", description = "발송결과정보 details 조회 response DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class RsltSisulResDtlData {
/**
* ID -
*/
private String unitySndngMastrId;
/**
* ID -
*/
private String unitySndngDetailId;
/**
* - KKO-MY-DOC|KT-BC|POST-PLUS
*/
private String sndngSeCode;
/**
* 릿ID
*/
private String tmplatId;
/**
* : yyyyMMddHHmiss
*/
@JsonProperty("sndngDt")
private String requstDt;
/**
* : yyyyMMddHHmiss
* recvDt
*/
@JsonProperty("recvDt")
private String inqireDt;
/**
* : yyyyMMddHHmiss
* readDt
*/
@JsonProperty("readDt")
private String readngDt;
/**
*
*/
private String rgistno;
/**
* - resultCode
*/
@JsonProperty("resultCode")
private String sndngResultSttus;
}
}

@ -0,0 +1,30 @@
package kr.xit.biz.sisul.service;
import java.util.List;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sisul.service
* fileName : IBizSisulService
* author : limju
* date : 2023-09-05
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-05 limju
*
* </pre>
*/
public interface IBizSisulService {
String fmcExcelUpload(final FmcExcelUpload fileReq);
RsltSisulResMstData findSndngResultMaster(final RsltSisulRequest dto);
List<RsltSisulResDtlData> findSndngResultDetails(final RsltSisulRequest dto);
}

@ -0,0 +1,66 @@
package kr.xit.biz.sisul.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.service.IBizSisulService;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sisul.web
* fileName : BizSisulController
* author : limju
* date : 2023-09-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-04 limju
*
* </pre>
*/
@Slf4j
@Tag(name = "BizSisulController", description = "전자고지 시설관리 시스템 연계 관련 처리")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/biz/sisul/v1")
public class BizSisulController {
private final IBizSisulService service;
/**
* (Facility Management Corporation)
* @param fileReq
* @return
*/
@Operation(summary = "시설관리공단 전자고지 대상 엑셀업로드 처리", description = "시설관리공단 전자고지 대상 엑셀업로드 처리<br><a href='http://localhost:8082/fmcExcelUpload.html'>전자고지연계파일처리</a>")
@PostMapping(value = "/fmcExcelUpload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse fmcExcelUpload(@ModelAttribute FmcExcelUpload fileReq) {
String msg = service.fmcExcelUpload(fileReq);
return ApiResponseDTO.success(fileReq, msg);
}
@Operation(summary = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/master", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultMaster(@RequestBody RsltSisulRequest reqDTO) {
return ApiResponseDTO.success(service.findSndngResultMaster(reqDTO));
}
@Operation(summary = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/details", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultDetails(@RequestBody RsltSisulRequest reqDTO) {
return ApiResponseDTO.success(service.findSndngResultDetails(reqDTO));
}
}

@ -8,9 +8,18 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import javax.servlet.http.HttpServletRequest;
import kr.xit.core.biz.model.LoggingDTO;
import kr.xit.core.biz.service.IApiLoggingService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.exception.ErrorParse;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.support.slack.SlackWebhookPush;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.core.support.utils.LogUtils;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
@ -29,18 +38,6 @@ import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import kr.xit.core.biz.model.LoggingDTO;
import kr.xit.core.biz.service.IApiLoggingService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.exception.ErrorParse;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.support.slack.SlackWebhookPush;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.core.support.utils.LogUtils;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
/**
* <pre>
* description : logging trace aspect
@ -185,14 +182,14 @@ public class TraceLoggerAspect {
log.info("@@@@@@@@@@@@@@@@@로깅 start : [\n{}\n]",MDC.getCopyOfContextMap());
String params = resetJsonMasking(json);
String systemId = Checks.isNotEmpty(uri)? ApiSystemId.compareByUri(uri).getCode(): ApiSystemId.valueOf("NONE").getCode();
MDC.put("systemId", "MENS-TRAFFIC");
MDC.put("systemId", "ENS");
MDC.put("reqSystemId", systemId);
MDC.put("param", params);
MDC.put("accessToken", "");
LoggingDTO loggingDTO = LoggingDTO.builder()
.requestId(MDC.getCopyOfContextMap().get(REQUEST_TRACE_ID))
.systemId("MENS-TRAFFIC")
.systemId("ENS")
.reqSystemId(systemId)
.method(MDC.getCopyOfContextMap().get("method"))
.uri(MDC.getCopyOfContextMap().get("uri"))
@ -380,7 +377,10 @@ log.info("@@@@@@@@@@@@@@@@@로깅 start : [\n{}\n]",MDC.getCopyOfContextMap());
private enum ApiSystemId {
KAKAO("KAKAO", "카카오", "/kakao/"),
KT_BC("KT-BC", "공공알림문자", "/kt/"),
PPLUS("POST-PLUS", "Post Plus", "/pplus/"),
NICE("NICE", "NICE CI", "/nice/"),
EPOST("EPOST", "E-POST", "/ag/"),
SISUL("SISUL", "시설공단", "/sisul/"),
BATCH("BATCH", "미정의", "/미정의/"),
;

@ -39,17 +39,7 @@ public class SpringDocsApiConfig {
return GroupedOpenApi.builder()
.group("2. 문서중계자 API")
.pathsToMatch(
"/api/ens/**"
)
.build();
}
@Bean
public GroupedOpenApi inboudnApiDoc() {
return GroupedOpenApi.builder()
.group("3. 문서중계자 API(Inbound)")
.pathsToMatch(
"/api/msg/**",
"/api/ens/**",
"/api/ag/**"
)
.build();

@ -1,15 +1,14 @@
package kr.xit.core.spring.util;
import org.springframework.context.ApplicationContext;
import kr.xit.biz.cmm.service.CmmEnsCacheService;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.biz.nice.service.IBizNiceCiService;
import kr.xit.core.spring.config.support.ApplicationContextProvider;
import kr.xit.ens.nice.service.INiceCiService;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.springframework.context.ApplicationContext;
/**
* <pre>
@ -59,7 +58,7 @@ public class ApiSpringUtils {
return (IBizNiceCiService)getBean(IBizNiceCiService.class);
}
public static IBizKtBcService getBizKtMmsService(){
return (IBizKtBcService)getBean(IBizKtBcService.class);
public static IBizKtMmsService getBizKtMmsService(){
return (IBizKtMmsService)getBean(IBizKtMmsService.class);
}
}

@ -1,67 +0,0 @@
package kr.xit.core.spring.util;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
public class MapDeserailizer implements JsonDeserializer<Map<String, Object>> {
@Override @SuppressWarnings("unchecked")
public Map<String, Object> deserialize(JsonElement json, Type typeOfT,
JsonDeserializationContext context) throws JsonParseException {
return (Map<String, Object>) read(json);
}
public Object read(JsonElement in) {
if(in.isJsonArray()){
List<Object> list = new ArrayList<Object>();
JsonArray arr = in.getAsJsonArray();
for (JsonElement anArr : arr) {
list.add(read(anArr));
}
return list;
}else if(in.isJsonObject()){
Map<String, Object> map = new HashMap<String, Object>();
JsonObject obj = in.getAsJsonObject();
Set<Map.Entry<String, JsonElement>> entitySet = obj.entrySet();
for(Map.Entry<String, JsonElement> entry: entitySet){
map.put(entry.getKey(), read(entry.getValue()));
}
return map;
}else if( in.isJsonPrimitive()){
JsonPrimitive prim = in.getAsJsonPrimitive();
if(prim.isBoolean()){
return prim.getAsBoolean();
}else if(prim.isString()){
return prim.getAsString();
}else if(prim.isNumber()){
Number num = prim.getAsNumber();
if(Math.ceil(num.doubleValue()) == num.longValue())
return num.longValue();
else{
return num.doubleValue();
}
}
}
return null;
}
}

@ -15,7 +15,6 @@ import java.util.Locale;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
@ -27,11 +26,6 @@ import javax.crypto.spec.SecretKeySpec;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Base64Utils;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
@ -39,7 +33,7 @@ import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.util.ApiSpringUtils;
import kr.xit.core.spring.util.CoreSpringUtils;
@ -47,6 +41,9 @@ import kr.xit.core.spring.util.MessageUtil;
import kr.xit.core.support.utils.DateUtils;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Base64Utils;
/**
* <pre>
@ -68,7 +65,7 @@ import lombok.NoArgsConstructor;
public class CmmEnsUtils {
private static final MessageUtil messageUtil = CoreSpringUtils.getMessageUtil();
private static final ICmmEnsCacheService cacheService = ApiSpringUtils.getCmmEnsCacheService();
private static final IBizKtBcService bizKtService = ApiSpringUtils.getBizKtMmsService();
private static final IBizKtMmsService bizKtService = ApiSpringUtils.getBizKtMmsService();
/**
*
@ -82,15 +79,14 @@ public class CmmEnsUtils {
CmmEnsRequestDTO ensDTO = CmmEnsRequestDTO.builder()
.signguCode(signguCode)
.ffnlgCode(ffnlgCode)
.profile(ApiConstants.IS_PROFILE_LOCAL? "local" : "prod")
.profile(ApiConstants.PROFILE)
.build();
final CmmEnsRlaybsnmDTO dto = cacheService.getRlaybsnmInfoCache(ensDTO);
if(ObjectUtils.isEmpty(dto)) throw BizRuntimeException.create(messageUtil.getMessage("fail.api.rlaybsnm.info"));
// KT인 경우 토큰유효기간 check
// FIXME : 지비스의 경우 유효기간 리턴이 없으며 4개월 마다 갱신
/*if(SndngSeCode.KT_GIBIS.equals(seCode)){
if(SndngSeCode.KT_BC.equals(seCode)){
if(StringUtils.isNotEmpty(dto.getKtTokenExpiresIn())
&& DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_STD).compareTo(dto.getKtTokenExpiresIn()) < 0
@ -102,11 +98,11 @@ public class CmmEnsUtils {
KtMnsRequest.builder()
.signguCode(signguCode)
.ffnlgCode(ffnlgCode)
.profile(ApiConstants.IS_PROFILE_LOCAL? "local" : "prod")
.profile(ApiConstants.PROFILE)
.build()
);
return cacheService.getRlaybsnmInfoCache(ensDTO);
}*/
}
return dto;
}

@ -0,0 +1,70 @@
package kr.xit.ens.epost.service;
import java.util.HashMap;
import java.util.Map;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest;
import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.epost.service
* fileName : EpostService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@Slf4j
@RequiredArgsConstructor
@Service
public class EpostService extends AbstractService implements IEpostService {
@Value("${app.contract.epost.host}")
private String HOST;
@Value("${app.contract.epost.api.postTrackInfo}")
private String POST_TRACK_INFO;
private final ApiWebClientUtil webClient;
@Override
@TraceLogging
public EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(),
SndngSeCode.PPLUS);reqDTO.setServiceKey(ktMnsInfo.getEpostServiceKey());
final Map<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchange(
HOST + POST_TRACK_INFO + String.format("?serviceKey=%s&rgist=%s",reqDTO.getServiceKey(), reqDTO.getRgist()),
HttpMethod.GET,
reqDTO,
EpostTraceResponse.class,
headerMap
);
}
}

@ -0,0 +1,23 @@
package kr.xit.ens.epost.service;
import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest;
import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : IPplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
public interface IEpostService {
EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO);
}

@ -0,0 +1,43 @@
package kr.xit.ens.epost.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.epost.service.IEpostService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.epost.web
* fileName : EpostController
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@Tag(name = "EpostController", description = "EPost API")
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/ens/epost/v1")
public class EpostController {
private final IEpostService service;
@Operation(summary = "우편물 종적추적", description = "우편물 종적 추적")
@PostMapping(value = "/trace", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse postTrackInfo(@RequestBody final EpostTraceRequest paramDTO) {
return ApiResponseDTO.success(service.postTrackInfo(paramDTO));
}
}

@ -1,7 +1,5 @@
package kr.xit.ens.kakao.cmm;
import org.apache.commons.lang3.ObjectUtils;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
@ -11,6 +9,7 @@ import kr.xit.core.spring.util.CoreSpringUtils;
import kr.xit.core.spring.util.MessageUtil;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
/**
* <pre>

@ -1,178 +0,0 @@
// package kr.xit.ens.kakao.v1.web;
//
// import org.springframework.http.MediaType;
// import org.springframework.web.bind.annotation.PostMapping;
// import org.springframework.web.bind.annotation.RequestBody;
// import org.springframework.web.bind.annotation.RequestMapping;
// import org.springframework.web.bind.annotation.RestController;
//
// import io.swagger.v3.oas.annotations.Operation;
// import io.swagger.v3.oas.annotations.media.Content;
// import io.swagger.v3.oas.annotations.media.ExampleObject;
// import io.swagger.v3.oas.annotations.tags.Tag;
// import kr.xit.biz.ens.model.kakao.v1.KkopayDocAttrDTO;
// import kr.xit.biz.ens.model.kakao.v1.KkopayDocBulkDTO;
// import kr.xit.biz.ens.model.kakao.v1.KkopayDocDTO;
// import kr.xit.core.model.ApiResponseDTO;
// import kr.xit.core.model.IApiResponse;
// import kr.xit.ens.kakao.v1.service.IAsyncKkopayEltrcDocService;
// import lombok.RequiredArgsConstructor;
// import lombok.extern.slf4j.Slf4j;
//
// /**
// * <pre>
// * description : 카카오 페이 전자 문서 발송 비동기용 controller
// * packageName : kr.xit.ens.kakao.v1.web
// * fileName : AsyncKkopayEltrcDocController
// * author : julim
// * date : 2023-04-28
// * ======================================================================
// * 변경일 변경자 변경 내용
// * ----------------------------------------------------------------------
// * 2023-04-28 julim 최초 생성
// *
// * </pre>
// */
// @Tag(name = "AsyncKkopayEltrcDocController", description = "카카오페이 MyDoc API(비동기)")
// @Slf4j
// @RequiredArgsConstructor
// @RestController
// @RequestMapping(value = "/api/ens/kakao/v2")
// public class AsyncKkopayEltrcDocController {
//
// private final IAsyncKkopayEltrcDocService service;
//
// /**
// * <pre>
// * 모바일웹 연계 문서발송 요청
// * -.이용기관 서버에서 전자문서 서버로 문서발송 처리를 요청합니다.
// * </pre>
// * @param reqDTO KkopayDocDTO.SendRequest
// * @return ApiResponseDTO{@literal <KkopayDocDTO.SendResponse>}
// */
// @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
// @Content(mediaType = "application/json", examples = {
// @ExampleObject(value = """
// {
// "document": {
// "title": "문서 제목",
// "read_expired_sec": 3600,
// "hash": "6EFE827AC88914DE471C621AE",
// "common_categories": [
// "NOTICE"
// ],
// "receiver": {
// "phone_number": "01093414345",
// "name": "김지호",
// "birthday": "19831218",
// "is_required_verify_name": false
// },
// "property": {
// "link": "http://ip:8081/api/kakaopay/v1/ott",
// "cs_number": "02-123-4567",
// "cs_name": "콜센터",
// "payload": "payload 파라미터 입니다.",
// "message": "해당 안내문은 다음과 같습니다."
// }
// },
// "signguCode": "88328",
// "ffnlgCode": "11"
// }
// """)
// })
// })
// @Operation(hidden = true, summary = "문서발송 요청", description = "카카오페이 전자문서 서버로 문서발송 처리를 요청")
// @PostMapping(value = "/documents", produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse requestSend(
// @RequestBody final KkopayDocDTO.SendRequest reqDTO
// ) {
// return ApiResponseDTO.of(service.requestSend(reqDTO));
// }
//
//
// /**
// * <pre>
// * 토큰 유효성 검증(Redirect URL 접속 허용/불허)
// * </pre>
// * @param reqDTO KkopayDocDTO.ValidTokenRequest
// * @return ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>
// */
// @Operation(hidden = true, summary = "토큰 유효성 검증", description = "Redirect URL 접속 허용/불허")
// @PostMapping(value = "/validToken", produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse validToken(
// @RequestBody final KkopayDocDTO.ValidTokenRequest reqDTO
// ) {
// return ApiResponseDTO.of(service.validToken(reqDTO));
// }
//
// /**
// * <pre>
// * 문서 상태 변경 API
// * -.문서에 대해서 열람 상태로 변경. 사용자가 문서열람 시(OTT 검증 완료 후 페이지 로딩 완료 시점) 반드시 문서 열람 상태 변경 API를 호출해야 함.
// * -.미 호출 시 아래와 같은 문제 발생
// * 1)유통증명시스템을 사용하는 경우 해당 API를 호출한 시점으로 열람정보가 등록되어 미 호출 시 열람정보가 등록 되지 않음.
// * 2)문서상태조회 API(/v1/documents/{document_binder_uuid}/status) 호출 시 read_at최초 열람시간) 데이터가 내려가지 않음.
// * </pre>
// * @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
// * @return ApiResponseDTO<Void>
// */
// @Operation(hidden = true, summary = "문서 상태 변경", description = "문서 상태 변경")
// @PostMapping(value = "/modifyStatus", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse modifyStatus(
// @RequestBody final KkopayDocAttrDTO.DocumentBinderUuid reqDTO
// ) {
// return ApiResponseDTO.of(service.modifyStatus(reqDTO));
// }
//
// /**
// * <pre>
// * 문서 상태 조회 API
// * -.이용기관 서버에서 카카오페이 전자문서 서버로 문서 상태에 대한 조회를 요청 합니다.
// * : 발송된 문서의 진행상태를 알고 싶은 경우, flow와 상관없이 요청 가능
// * : polling 방식으로 호출할 경우, 호출 간격은 5초를 권장.
// * -.doc_box_status 상태변경순서
// * : SENT(송신) > RECEIVED(수신) > READ(열람)/EXPIRED(미열람자료의 기한만료)
// * </pre>
// * @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
// * @return ApiResponseDTO<KkopayDocDTO.DocStatusResponse>
// */
// @Operation(hidden = true, summary = "문서 상태 조회", description = "문서 상태 조회")
// @PostMapping(value = "/findStatus", produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse findStatus(
// @RequestBody final KkopayDocAttrDTO.DocumentBinderUuid reqDTO
// ) {
// return ApiResponseDTO.of(service.findStatus(reqDTO));
// }
//
//
// @Operation(hidden = true, summary = "대량 문서발송 요청", description = "카카오페이 전자문서 서버로 대량 문서발송 처리를 요청")
// @PostMapping(value = "/documents/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse requestSendBulk(
// @RequestBody final KkopayDocBulkDTO.BulkSendRequests reqDTO
// ) {
// return ApiResponseDTO.of(service.requestSendBulk(reqDTO));
// }
//
// /**
// * <pre>
// * 모바일웹 연계 문서발송 요청
// * -.이용기관 서버에서 전자문서 서버로 문서발송 처리를 요청합니다.
// * </pre>
// * @param reqDTO KkopayDocBulkDTO.BulkStatusRequests
// * @return ApiResponseDTOApiResponseDTO<BulkStatusResponses.BulkStatusResponses>
// */
// @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
// @Content(mediaType = "application/json", examples = {
// @ExampleObject(value = "{\"document_binder_uuids\": [\n"
// + " \"BIN-883246dbff7b11edb3bb7affed8a016d\"\n"
// + " ]}")
// })
// })
// @Operation(hidden = true, summary = "대량 문서 상태 조회 요청", description = "카카오페이 전자문서 서버로 대량 문서 상태 조회 요청")
// @PostMapping(value = "/documents/bulk/status", produces = MediaType.APPLICATION_JSON_VALUE)
// public IApiResponse findBulkStatus(
// @RequestBody final KkopayDocBulkDTO.BulkStatusRequests reqDTO
// ) {
// return ApiResponseDTO.of(service.findBulkStatus(reqDTO));
// }
// }

@ -1,25 +1,27 @@
package kr.xit.ens.kakao.pay.service;
package kr.xit.ens.kakao.service;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.RequestSend;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.service.AbstractService;
@ -30,11 +32,15 @@ import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.kakao.cmm.CmmKakaoUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.pay.service
* packageName : kr.xit.ens.kakao.service
* fileName : KkopayEltrcDocService
* author : julim
* date : 2023-04-28
@ -45,25 +51,26 @@ import lombok.extern.slf4j.Slf4j;
*
* </pre>
*/
@SuppressWarnings("unchecked")
@Slf4j
@RequiredArgsConstructor
@Component
public class AsyncKkopayEltrcDocService extends AbstractService implements
IAsyncKkopayEltrcDocService {
@Value("${app.contract.kakao.api.pay.host}")
@Value("${app.contract.kakao.host}")
private String HOST;
@Value("#{'${app.contract.kakao.api.pay.send}'.split(';')}")
@Value("#{'${app.contract.kakao.api.send}'.split(';')}")
private String[] API_SEND;
@Value("#{'${app.contract.kakao.api.pay.validToken}'.split(';')}")
@Value("#{'${app.contract.kakao.api.validToken}'.split(';')}")
private String[] API_VALID_TOKEN;
@Value("#{'${app.contract.kakao.api.pay.modifyStatus}'.split(';')}")
@Value("#{'${app.contract.kakao.api.modifyStatus}'.split(';')}")
private String[] API_MODIFY_STATUS;
@Value("#{'${app.contract.kakao.api.pay.findStatus}'.split(';')}")
@Value("#{'${app.contract.kakao.api.findStatus}'.split(';')}")
private String[] API_STATUS;
@Value("#{'${app.contract.kakao.api.pay.bulksend}'.split(';')}")
@Value("#{'${app.contract.kakao.api.bulksend}'.split(';')}")
private String[] API_BULKSEND;
@Value("#{'${app.contract.kakao.api.pay.bulkstatus}'.split(';')}")
@Value("#{'${app.contract.kakao.api.bulkstatus}'.split(';')}")
private String[] API_BULKSTATUS;
private final ApiWebClientUtil webClient;
@ -81,11 +88,11 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<KkopayDocDTO.SendResponse>> requestSend(final KkopayDocDTO.SendRequest reqDTO) {
public CompletableFuture<ApiResponseDTO<SendResponse>> requestSend(final SendRequest reqDTO) {
List<String> errors = new ArrayList<>();
errors = validate(reqDTO.getDocument(), errors);
final KkopayDocDTO.RequestSend reqSendDTO = reqDTO.getDocument();
final RequestSend reqSendDTO = reqDTO.getDocument();
if(reqSendDTO.getRead_expired_at() != null && reqSendDTO.getRead_expired_sec() != null){
Objects.requireNonNull(errors).add("처리마감시간(절대시간 또는 상대시간)은 하나만 지정해야 합니다.");
}
@ -94,7 +101,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
Objects.requireNonNull(errors).add("처리마감시간(절대시간 또는 상대시간)을 지정해야 합니다.");
}
final KkopayDocAttrDTO.Receiver receiver = reqSendDTO.getReceiver();
final Receiver receiver = reqSendDTO.getReceiver();
if(Checks.isEmpty(receiver.getCi())){
if(Checks.isEmpty(receiver.getName())) Objects.requireNonNull(errors).add("receiver.name=받는이 이름은 필수입니다.");
if(Checks.isEmpty(receiver.getPhone_number())) Objects.requireNonNull(errors).add("receiver.phone_number=받는이 전화번호는 필수입니다.");
@ -103,7 +110,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
if(Objects.requireNonNull(errors).size() > 0) throw BizRuntimeException.create(errors.toString());
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), KkopayDocDTO.SendResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), SendResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);
@ -122,7 +129,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>> validToken(final KkopayDocDTO.ValidTokenRequest reqDTO) {
public CompletableFuture<ApiResponseDTO<ValidTokenResponse>> validToken(final ValidTokenRequest reqDTO) {
validate(reqDTO, null);
final String url = HOST
@ -130,7 +137,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
.replace("{tokens}", reqDTO.getToken());
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, KkopayDocDTO.ValidTokenResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, ValidTokenResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);
@ -153,14 +160,14 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<Void>> modifyStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO){
public CompletableFuture<ApiResponseDTO<Void>> modifyStatus(final DocumentBinderUuid reqDTO){
validate(reqDTO, null);
final String body = "{\"document\": {\"is_detail_read\": true} }";
final String url = HOST + API_MODIFY_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid());
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);
@ -184,12 +191,12 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<KkopayDocDTO.DocStatusResponse>> findStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO){
public CompletableFuture<ApiResponseDTO<DocStatusResponse>> findStatus(final DocumentBinderUuid reqDTO){
validate(reqDTO, null);
final String url = HOST + API_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid());
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(url, HttpMethod.valueOf(API_STATUS[1]), null, KkopayDocDTO.DocStatusResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(url, HttpMethod.valueOf(API_STATUS[1]), null, DocStatusResponse.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);
@ -209,9 +216,9 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkSendResponses>> requestSendBulk(final KkopayDocBulkDTO.BulkSendRequests reqDTO) {
public CompletableFuture<ApiResponseDTO<BulkSendResponses>> requestSendBulk(final BulkSendRequests reqDTO) {
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), KkopayDocBulkDTO.BulkSendResponses.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), BulkSendResponses.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);
@ -235,7 +242,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
@Override
@TraceLogging
@Async("asyncExecutor")
public CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkStatusResponses>> findBulkStatus(final KkopayDocBulkDTO.BulkStatusRequests reqDTO) {
public CompletableFuture<ApiResponseDTO<BulkStatusResponses>> findBulkStatus(final BulkStatusRequests reqDTO) {
List<String> errors = new ArrayList<>();
final List<String> dtos = reqDTO.getDocument_binder_uuids();
@ -250,7 +257,7 @@ public class AsyncKkopayEltrcDocService extends AbstractService implements
}
return CompletableFuture.supplyAsync(() ->
webClient.exchangeKkopay(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), KkopayDocBulkDTO.BulkStatusResponses.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
webClient.exchangeKko(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), BulkStatusResponses.class, getEnsRlaybsnmDTO(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
.handle((r, e) -> {
if(e != null){
return webClient.sendError(e);

@ -1,16 +1,22 @@
package kr.xit.ens.kakao.pay.service;
package kr.xit.ens.kakao.service;
import java.util.concurrent.CompletableFuture;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse;
import kr.xit.core.model.ApiResponseDTO;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.pay.service
* packageName : kr.xit.ens.kakao.service
* fileName : IKkopayEltrcDocService
* author : julim
* date : 2023-04-28
@ -31,7 +37,7 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocDTO.SendRequest
* @return CompletableFuture<ApiResponseDTO<KkopayDocDTO.SendResponse>>
*/
CompletableFuture<ApiResponseDTO<KkopayDocDTO.SendResponse>> requestSend(final KkopayDocDTO.SendRequest reqDTO);
CompletableFuture<ApiResponseDTO<SendResponse>> requestSend(final SendRequest reqDTO);
/**
@ -41,7 +47,7 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocDTO.ValidTokenRequest
* @return CompletableFuture<ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>>
*/
CompletableFuture<ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>> validToken(final KkopayDocDTO.ValidTokenRequest reqDTO);
CompletableFuture<ApiResponseDTO<ValidTokenResponse>> validToken(final ValidTokenRequest reqDTO);
/**
* <pre>
@ -54,7 +60,7 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
* @return CompletableFuture<ApiResponseDTO<Void>>
*/
CompletableFuture<ApiResponseDTO<Void>> modifyStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO);
CompletableFuture<ApiResponseDTO<Void>> modifyStatus(final DocumentBinderUuid reqDTO);
/**
@ -69,7 +75,7 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
* @return CompletableFuture<ApiResponseDTO<KkopayDocDTO.DocStatusResponse>>
*/
CompletableFuture<ApiResponseDTO<KkopayDocDTO.DocStatusResponse>> findStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO);
CompletableFuture<ApiResponseDTO<DocStatusResponse>> findStatus(final DocumentBinderUuid reqDTO);
/**
* <pre>
@ -79,7 +85,7 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocBulkDTO.BulkSendRequests
* @return CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkSendResponses>>
*/
CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkSendResponses>> requestSendBulk(final KkopayDocBulkDTO.BulkSendRequests reqDTO);
CompletableFuture<ApiResponseDTO<BulkSendResponses>> requestSendBulk(final BulkSendRequests reqDTO);
/**
* <pre>
@ -93,6 +99,6 @@ public interface IAsyncKkopayEltrcDocService {
* @param reqDTO KkopayDocBulkDTO.BulkStatusRequests
* @return CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkStatusResponses>>
*/
CompletableFuture<ApiResponseDTO<KkopayDocBulkDTO.BulkStatusResponses>> findBulkStatus(final KkopayDocBulkDTO.BulkStatusRequests reqDTO);
CompletableFuture<ApiResponseDTO<BulkStatusResponses>> findBulkStatus(final BulkStatusRequests reqDTO);
}

@ -1,14 +1,22 @@
package kr.xit.ens.kakao.pay.service;
package kr.xit.ens.kakao.service;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse;
import kr.xit.core.model.ApiResponseDTO;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.pay.service
* packageName : kr.xit.ens.kakao.service
* fileName : IKkopayEltrcDocService
* author : julim
* date : 2023-04-28
@ -29,7 +37,7 @@ public interface IKkopayEltrcDocService {
* @param reqDTO KkopayDocDTO.SendRequest
* @return KkopayDocDTO.SendResponse
*/
KkopayDocDTO.SendResponse requestSend(final KkopayDocDTO.SendRequest reqDTO);
SendResponse requestSend(final SendRequest reqDTO);
/**
* <pre>
@ -38,7 +46,7 @@ public interface IKkopayEltrcDocService {
* @param reqDTO KkopayDocDTO.ValidTokenRequest
* @return ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>
*/
KkopayDocDTO.ValidTokenResponse validToken(final KkopayDocDTO.ValidTokenRequest reqDTO);
ValidTokenResponse validToken(final ValidTokenRequest reqDTO);
/**
* <pre>
@ -50,7 +58,7 @@ public interface IKkopayEltrcDocService {
* </pre>
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
*/
void modifyStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO);
void modifyStatus(final DocumentBinderUuid reqDTO);
/**
@ -65,7 +73,7 @@ public interface IKkopayEltrcDocService {
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
* @return KkopayDocDTO.DocStatusResponse
*/
KkopayDocDTO.DocStatusResponse findStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO);
DocStatusResponse findStatus(final DocumentBinderUuid reqDTO);
/**
* <pre>
@ -75,7 +83,7 @@ public interface IKkopayEltrcDocService {
* @param reqDTO KkopayDocBulkDTO.BulkSendRequests
* @return KkopayDocBulkDTO.BulkSendResponses
*/
KkopayDocBulkDTO.BulkSendResponses requestSendBulk(final KkopayDocBulkDTO.BulkSendRequests reqDTO);
BulkSendResponses requestSendBulk(final BulkSendRequests reqDTO);
/**
* <pre>
@ -89,9 +97,9 @@ public interface IKkopayEltrcDocService {
* @param reqDTO KkopayDocBulkDTO.BulkStatusRequests
* @return KkopayDocBulkDTO.BulkStatusResponses
*/
KkopayDocBulkDTO.BulkStatusResponses findBulkStatus(final KkopayDocBulkDTO.BulkStatusRequests reqDTO);
BulkStatusResponses findBulkStatus(final BulkStatusRequests reqDTO);
ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> findKkopayReadyAndMblPage(KkopayDocDTO.OneTimeToken reqDTO);
ApiResponseDTO<ValidTokenResponse> findMyDocReadyAndMblPage(OneTimeToken reqDTO);
}

@ -1,26 +1,30 @@
package kr.xit.ens.kakao.pay.service;
package kr.xit.ens.kakao.service;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayErrorDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendReq;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.DocStatusResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.RequestSend;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendResponse;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenResponse;
import kr.xit.biz.ens.model.kakao.KkopayErrorDTO;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.service.AbstractService;
@ -31,11 +35,15 @@ import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.pay.service
* packageName : kr.xit.ens.kakao.service
* fileName : KkopayEltrcDocService
* author : julim
* date : 2023-04-28
@ -52,27 +60,21 @@ import lombok.extern.slf4j.Slf4j;
public class KkopayEltrcDocService extends AbstractService implements
IKkopayEltrcDocService {
@Value("${app.contract.kakao.api.pay.host}")
@Value("${app.contract.kakao.host}")
private String HOST;
@Value("#{'${app.contract.kakao.api.pay.send}'.split(';')}")
@Value("#{'${app.contract.kakao.api.send}'.split(';')}")
private String[] API_SEND;
@Value("#{'${app.contract.kakao.api.pay.validToken}'.split(';')}")
@Value("#{'${app.contract.kakao.api.validToken}'.split(';')}")
private String[] API_VALID_TOKEN;
@Value("#{'${app.contract.kakao.api.pay.modifyStatus}'.split(';')}")
@Value("#{'${app.contract.kakao.api.modifyStatus}'.split(';')}")
private String[] API_MODIFY_STATUS;
@Value("#{'${app.contract.kakao.api.pay.bulksend}'.split(';')}")
@Value("#{'${app.contract.kakao.api.findStatus}'.split(';')}")
private String[] API_STATUS;
@Value("#{'${app.contract.kakao.api.bulksend}'.split(';')}")
private String[] API_BULKSEND;
@Value("#{'${app.contract.kakao.api.pay.bulkstatus}'.split(';')}")
@Value("#{'${app.contract.kakao.api.bulkstatus}'.split(';')}")
private String[] API_BULKSTATUS;
@Value("#{'${app.contract.kakao.api.pay.findStatus}'.split(';')}")
private String[] API_STATUS;
private final ApiWebClientUtil webClient;
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private static final CharSequence DOCUMENT_BINDER_UUID = "{document_binder_uuid}";
@ -88,11 +90,11 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public KkopayDocDTO.SendResponse requestSend(final KkopayDocDTO.SendRequest reqDTO) {
public SendResponse requestSend(final SendRequest reqDTO) {
List<String> errors = new ArrayList<>();
errors = validate(reqDTO.getDocument(), errors);
final KkopayDocDTO.RequestSend reqSendDTO = reqDTO.getDocument();
final RequestSend reqSendDTO = reqDTO.getDocument();
if(reqSendDTO.getRead_expired_at() != null && reqSendDTO.getRead_expired_sec() != null){
Objects.requireNonNull(errors).add("처리마감시간(절대시간 또는 상대시간)은 하나만 지정해야 합니다.");
}
@ -100,14 +102,14 @@ public class KkopayEltrcDocService extends AbstractService implements
Objects.requireNonNull(errors).add("처리마감시간(절대시간 또는 상대시간)을 지정해야 합니다.");
}
final KkopayDocAttrDTO.Receiver receiver = reqSendDTO.getReceiver();
final Receiver receiver = reqSendDTO.getReceiver();
if(Checks.isEmpty(receiver.getCi())){
if(Checks.isEmpty(receiver.getName())) Objects.requireNonNull(errors).add("receiver.name=받는이 이름은 필수입니다.");
if(Checks.isEmpty(receiver.getPhone_number())) Objects.requireNonNull(errors).add("receiver.phone_number=받는이 전화번호는 필수입니다.");
if(Checks.isEmpty(receiver.getBirthday())) Objects.requireNonNull(errors).add("receiver.birthday=받는이 생년월일은 필수입니다.");
}
if(!Objects.requireNonNull(errors).isEmpty()) throw BizRuntimeException.create(errors.toString());
return webClient.exchangeKkopay(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), KkopayDocDTO.SendResponse.class, getRlaybsnmInfo(reqDTO));
return webClient.exchangeKko(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), SendResponse.class, getRlaybsnmInfo(reqDTO));
}
/**
@ -119,13 +121,13 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public KkopayDocDTO.ValidTokenResponse validToken(final KkopayDocDTO.ValidTokenRequest reqDTO) {
public ValidTokenResponse validToken(final ValidTokenRequest reqDTO) {
validate(reqDTO, null);
final String url = HOST
+ API_VALID_TOKEN[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid())
.replace("{tokens}", reqDTO.getToken());
return webClient.exchangeKkopay(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, KkopayDocDTO.ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
return webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
}
/**
@ -140,13 +142,13 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public void modifyStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO){
public void modifyStatus(final DocumentBinderUuid reqDTO){
validate(reqDTO, null);
final String body = "{\"document\": {\"is_detail_read\": true} }";
final String url = HOST + API_MODIFY_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid());
webClient.exchangeKkopay(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, getRlaybsnmInfo(reqDTO));
webClient.exchangeKko(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, getRlaybsnmInfo(reqDTO));
}
/**
@ -163,11 +165,11 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public KkopayDocDTO.DocStatusResponse findStatus(final KkopayDocAttrDTO.DocumentBinderUuid reqDTO){
public DocStatusResponse findStatus(final DocumentBinderUuid reqDTO){
validate(reqDTO, null);
final String url = HOST + API_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid());
return webClient.exchangeKkopay(url, HttpMethod.valueOf(API_STATUS[1]), null, KkopayDocDTO.DocStatusResponse.class, getRlaybsnmInfo(reqDTO));
return webClient.exchangeKko(url, HttpMethod.valueOf(API_STATUS[1]), null, DocStatusResponse.class, getRlaybsnmInfo(reqDTO));
}
/**
@ -180,12 +182,12 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public KkopayDocBulkDTO.BulkSendResponses requestSendBulk(final KkopayDocBulkDTO.BulkSendRequests reqDTO) {
public BulkSendResponses requestSendBulk(final BulkSendRequests reqDTO) {
List<String> errors = new ArrayList<>();
List<KkopayDocBulkDTO.BulkSendReq> dtos = reqDTO.getDocuments();
List<BulkSendReq> dtos = reqDTO.getDocuments();
for(int idx = 0; idx < dtos.size(); idx++) {
final Set<ConstraintViolation<KkopayDocBulkDTO.BulkSendReq>> list = validator.validate(dtos.get(idx));
final Set<ConstraintViolation<BulkSendReq>> list = validator.validate(dtos.get(idx));
if (!list.isEmpty()) {
int finalIdx = idx;
@ -204,7 +206,7 @@ public class KkopayEltrcDocService extends AbstractService implements
errors.add("처리마감시간(절대시간 또는 상대시간)을 지정해야 합니다.");
}
final KkopayDocAttrDTO.Receiver receiver = dtos.get(idx).getReceiver();
final Receiver receiver = dtos.get(idx).getReceiver();
if (Checks.isEmpty(receiver.getCi())) {
if (Checks.isEmpty(receiver.getName())) errors.add(String.format("받는이 이름은 필수입니다(receiver.name[%d] 번째 오류)", idx+1));
if (Checks.isEmpty(receiver.getPhone_number())) errors.add(String.format("받는이 전화번호는 필수입니다(receiver.phone_number[%d] 번째 오류)", idx+1));
@ -224,7 +226,7 @@ public class KkopayEltrcDocService extends AbstractService implements
throw BizRuntimeException.create(errors.toString());
}
return webClient.exchangeKkopay(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), KkopayDocBulkDTO.BulkSendResponses.class, getRlaybsnmInfo(reqDTO));
return webClient.exchangeKko(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), BulkSendResponses.class, getRlaybsnmInfo(reqDTO));
}
/**
@ -241,7 +243,7 @@ public class KkopayEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
public KkopayDocBulkDTO.BulkStatusResponses findBulkStatus(final KkopayDocBulkDTO.BulkStatusRequests reqDTO) {
public BulkStatusResponses findBulkStatus(final BulkStatusRequests reqDTO) {
List<String> errors = new ArrayList<>();
List<String> dtos = reqDTO.getDocument_binder_uuids();
@ -254,17 +256,17 @@ public class KkopayEltrcDocService extends AbstractService implements
if(!errors.isEmpty()) {
throw BizRuntimeException.create(errors.toString());
}
return webClient.exchangeKkopay(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), KkopayDocBulkDTO.BulkStatusResponses.class, getRlaybsnmInfo(reqDTO));
return webClient.exchangeKko(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), BulkStatusResponses.class, getRlaybsnmInfo(reqDTO));
}
@Override
public ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> findKkopayReadyAndMblPage(final KkopayDocDTO.OneTimeToken reqDTO) {
public ApiResponseDTO<ValidTokenResponse> findMyDocReadyAndMblPage(final OneTimeToken reqDTO) {
final String url = HOST + API_VALID_TOKEN[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid())
.replace("{tokens}", reqDTO.getToken());
// 유효성 검증
final KkopayDocDTO.ValidTokenResponse validTokenRes = webClient.exchangeKkopay(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null,
KkopayDocDTO.ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
final ValidTokenResponse validTokenRes = webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null,
ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
if(!"USED".equals(validTokenRes.getToken_status())){
return ApiResponseDTO.error(validTokenRes.getError_code(), validTokenRes.getError_message());
@ -276,7 +278,7 @@ public class KkopayEltrcDocService extends AbstractService implements
// 정상 : HttpStatus.NO_CONTENT(204) return
// error : body에 error_code, error_message return
final KkopayErrorDTO errorDTO = webClient.exchangeKkopay(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, KkopayErrorDTO.class, getRlaybsnmInfo(reqDTO));
final KkopayErrorDTO errorDTO = webClient.exchangeKko(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, KkopayErrorDTO.class, getRlaybsnmInfo(reqDTO));
if(errorDTO != null){
return ApiResponseDTO.error(errorDTO.getErrorCode(), errorDTO.getErrorMessage());
}

@ -1,95 +0,0 @@
package kr.xit.ens.kakao.talk.service;
import kr.xit.biz.ens.model.kakao.talk.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.talk.KkotalkDTO;
import kr.xit.core.model.ApiResponseDTO;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.talk.service
* fileName : IKkopayEltrcDocService
* author : julim
* date : 2023-04-28
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-04-28 julim
*
* </pre>
*/
public interface IKkotalkEltrcDocService {
/**
* <pre>
*
* -. .
* </pre>
* @param reqDTO KkotalkApiDTO.SendRequest
* @return KkotalkApiDTO.SendResponse
*/
KkotalkDTO.SendResponse requestSend(final KkotalkDTO.SendRequest reqDTO);
/**
* <pre>
* (Redirect URL /)
* </pre>
* @param reqDTO KkotalkApiDTO.ValidTokenRequest
* @return KkotalkApiDTO.ValidTokenResponse>
*/
KkotalkApiDTO.ValidTokenResponse validToken(final KkotalkApiDTO.ValidTokenRequest reqDTO);
/**
* <pre>
* API
* -. . (OTT ) API .
* -.
* 1) API .
* 2) API(/v1/envelopes/${ENVELOPE_ID}/read) read_at ) .
* </pre>
* @param reqDTO KkotalkDTO.EnvelopeId
*/
void modifyStatus(final KkotalkDTO.EnvelopeId reqDTO);
/**
* <pre>
* API
* -. .
* : , flow
* : polling , 5 .
* -.doc_box_status
* : RECEIVE(, ) > READ()/EXPIRED
* </pre>
* @param reqDTO KkotalkDTO.EnvelopeId
* @return KkotalkApiDTO.EnvelopeStatusResponse
*/
KkotalkApiDTO.EnvelopeStatusResponse findStatus(final KkotalkApiDTO.EnvelopeId reqDTO);
/**
* <pre>
* (bulk)
* -. (bulk) .
* </pre>
* @param reqDTO KkopayDocBulkDTO.BulkSendRequests
* @return KkopayDocBulkDTO.BulkSendResponses
*/
KkotalkDTO.BulkSendResponse requestSendBulk(final KkotalkDTO.BulkSendRequest reqDTO);
/**
* <pre>
* (bulk) API
* -. .
* : , flow
* : polling , 5 .
* : RECEIVED(,) > READ()/EXPIRED
* </pre>
* @param reqDTO KkotalkDTO.BulkStatusRequest
* @return KkotalkDTO.BulkStatusResponse
*/
KkotalkDTO.BulkStatusResponse findBulkStatus(final KkotalkDTO.BulkStatusRequest reqDTO);
ApiResponseDTO<KkotalkApiDTO.ValidTokenResponse> findKkotalkReadyAndMblPage(KkotalkApiDTO.ValidTokenRequest reqDTO);
}

@ -1,327 +0,0 @@
package kr.xit.ens.kakao.talk.service;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kakao.talk.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.talk.KkotalkDTO;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
* <pre>
* description :
* packageName : kr.xit.ens.kakao.talk.service
* fileName : KkopayEltrcDocService
* author : julim
* date : 2023-04-28
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-04-28 julim
*
* </pre>
*/
@Slf4j
@RequiredArgsConstructor
@Component
public class KkotalkEltrcDocService extends AbstractService implements
IKkotalkEltrcDocService {
@Value("${app.contract.kakao.api.talk.host}")
private String HOST;
@Value("#{'${app.contract.kakao.api.talk.send}'.split(';')}")
private String[] API_SEND;
@Value("#{'${app.contract.kakao.api.talk.bulksend}'.split(';')}")
private String[] API_BULKSEND;
@Value("#{'${app.contract.kakao.api.talk.validToken}'.split(';')}")
private String[] API_VALID_TOKEN;
@Value("#{'${app.contract.kakao.api.talk.modifyStatus}'.split(';')}")
private String[] API_MODIFY_STATUS;
@Value("#{'${app.contract.kakao.api.talk.bulkstatus}'.split(';')}")
private String[] API_BULKSTATUS;
private final ApiWebClientUtil webClient;
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private static final CharSequence ENVELOPE_ID = "{ENVELOPE_ID}";
/**
* <pre>
* : POST
* -.
* </pre>
* @param reqDTO KkoPayEltrDocDTO.RequestSendReq
* @return ApiResponseDTO<KkopayDocDTO.SendResponse>
*/
@Override
@TraceLogging
public KkotalkDTO.SendResponse requestSend(final KkotalkDTO.SendRequest reqDTO) {
if(Checks.isEmpty(reqDTO.getProductCode())){
throw BizRuntimeException.create("상품 코드는 필수 입니다.");
}
List<String> errors = new ArrayList<>();
errors = validate(reqDTO.getEnvelope(), errors);
final KkotalkApiDTO.Envelope envelope = reqDTO.getEnvelope();
if(envelope.getReviewExpiresAt() != null){
if(envelope.getReviewExpiresAt().compareTo(envelope.getReadExpiresAt()) < 0){
errors.add("reviewExpiresAt=재열람 만료일시를 최조 열람 만료일시 보다 큰 날짜로 입력해주세요.");
}
}
if(Checks.isEmpty(envelope.getCi())){
if(Checks.isEmpty(envelope.getName())) Objects.requireNonNull(errors).add("name=받는이 이름은 필수입니다.");
if(Checks.isEmpty(envelope.getPhoneNumber())) Objects.requireNonNull(errors).add("phoneNumber=받는이 전화번호는 필수입니다.");
if(Checks.isEmpty(envelope.getBirthday())) Objects.requireNonNull(errors).add("birthday=받는이 생년월일은 필수입니다.");
}
if(!Objects.requireNonNull(errors).isEmpty()) throw BizRuntimeException.create(errors.toString());
return webClient.exchangeKkotalk(
HOST + API_SEND[0].replace("{PRODUCT_CODE}", reqDTO.getProductCode()),
HttpMethod.valueOf(API_SEND[1]),
JsonUtils.toJson(envelope),
KkotalkDTO.SendResponse.class,
getRlaybsnmInfo(reqDTO));
}
/**
* <pre>
* (Redirect URL /) : GET
* </pre>
* @param reqDTO KkopayDocDTO.ValidTokenRequest
* @return ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>
*/
@Override
@TraceLogging
public KkotalkApiDTO.ValidTokenResponse validToken(final KkotalkApiDTO.ValidTokenRequest reqDTO) {
validate(reqDTO, null);
return webClient.exchangeKkotalk(
HOST
+ API_VALID_TOKEN[0].replace(ENVELOPE_ID, reqDTO.getEnvelopeId())
.replace("{TOKEN}", reqDTO.getToken()),
HttpMethod.valueOf(API_VALID_TOKEN[1]),
null,
KkotalkApiDTO.ValidTokenResponse.class,
getRlaybsnmInfo(reqDTO));
}
/**
* <pre>
* API : POST
* -. . (OTT ) API .
* -.
* 1) API .
* 2) API(/v1/envelopes/${ENVELOPE_ID}/read) read_at ) .
* </pre>
* @param reqDTO KkopayDocAttrDTO.EnvelopeId
*/
@Override
@TraceLogging
public void modifyStatus(final KkotalkDTO.EnvelopeId reqDTO){
validate(reqDTO.getEnvelopeId(), null);
final String url = HOST + API_MODIFY_STATUS[0].replace(ENVELOPE_ID, reqDTO.getEnvelopeId());
webClient.exchangeKkotalk(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), null, Void.class, getRlaybsnmInfo(reqDTO));
}
/**
* <pre>
* API : GET
* -. .
* : , flow
* : polling , 5 .
* : RECEIVE(,) > READ()/EXPIRED
* </pre>
* @param reqDTO KkotalkDTO.EnvelopeId
* @return KkotalkApiDTO.EnvelopeStatusResponse
*/
@Override
@TraceLogging
public KkotalkApiDTO.EnvelopeStatusResponse findStatus(final KkotalkApiDTO.EnvelopeId reqDTO){
validate(reqDTO, null);
String param = "{\"envelopeIds\":" + JsonUtils.toJson(List.of(reqDTO.getEnvelopeId())) + "}";
KkotalkDTO.BulkStatusResponse res = webClient.exchangeKkotalk(
HOST + API_BULKSTATUS[0],
HttpMethod.valueOf(API_BULKSTATUS[1]),
param,
KkotalkDTO.BulkStatusResponse.class,
getRlaybsnmInfo(reqDTO));
return res.getEnvelopeStatus().get(0);
}
/**
* <pre>
* : POST
* -. .
* </pre>
* @param reqDTO KkotalkDTO.BulkSendRequest
* @return KkotalkDTO.BulkSendResponse
*/
@Override
@TraceLogging
public KkotalkDTO.BulkSendResponse requestSendBulk(final KkotalkDTO.BulkSendRequest reqDTO) {
if(Checks.isEmpty(reqDTO.getProductCode())){
throw BizRuntimeException.create("상품 코드는 필수 입니다.");
}
List<String> errors = new ArrayList<>();
List<KkotalkApiDTO.Envelope> envelopes = reqDTO.getEnvelopes();
for(int idx = 0; idx < envelopes.size(); idx++) {
final Set<ConstraintViolation<KkotalkApiDTO.Envelope>> list = validator.validate(envelopes.get(idx));
if (!list.isEmpty()) {
int finalIdx = idx;
errors.addAll(list.stream()
.map(row -> String.format("%s[%d]=%s", row.getPropertyPath(), finalIdx +1, row.getMessageTemplate()))
.toList()
);
}
}
for(int idx = 0; idx < envelopes.size(); idx++) {
final KkotalkApiDTO.Envelope envelope = envelopes.get(idx);
if(envelope.getReviewExpiresAt() != null){
if(envelope.getReviewExpiresAt().compareTo(envelope.getReadExpiresAt()) < 0){
errors.add("reviewExpiresAt=재열람 만료일시를 최조 열람 만료일시 보다 큰 날짜로 입력해주세요.");
}
}
if (Checks.isEmpty(envelope.getCi())) {
if (Checks.isEmpty(envelope.getName())) errors.add(String.format("받는이 이름은 필수입니다(name[%d] 번째 오류)", idx+1));
if (Checks.isEmpty(envelope.getPhoneNumber())) errors.add(String.format("받는이 전화번호는 필수입니다(phoneNumber[%d] 번째 오류)", idx+1));
if (Checks.isEmpty(envelope.getBirthday())) errors.add(String.format("받는이 생년월일은 필수입니다(birthday[%d] 번째 오류)", idx+1));
} else {
final StringBuilder sb = new StringBuilder()
.append(StringUtils.defaultString(envelope.getName(), StringUtils.EMPTY))
.append(StringUtils.defaultString(envelope.getPhoneNumber(), StringUtils.EMPTY))
.append(StringUtils.defaultString(envelope.getBirthday(), StringUtils.EMPTY));
if(Checks.isNotEmpty(sb.toString())){
errors.add(String.format("CI가 지정 되었습니다(받는이 정보 불필요:[%d] 번째 오류) .", idx+1));
}
}
}
if(!errors.isEmpty()){
throw BizRuntimeException.create(errors.toString());
}
String param = "{\"envelopes\":" + JsonUtils.toJson(envelopes) + "}";
return webClient.exchangeKkotalk(
HOST + API_BULKSEND[0].replace("{PRODUCT_CODE}", reqDTO.getProductCode()),
HttpMethod.valueOf(API_BULKSEND[1]),
param,
KkotalkDTO.BulkSendResponse.class,
getRlaybsnmInfo(reqDTO));
}
/**
* <pre>
* (bulk) API : POST
* -. .
* : , flow
* : polling , 5 .
* : RECEIVE(,) > READ()/EXPIRED
* </pre>
* @param reqDTO KkotalkDTO.BulkStatusRequest
* @return KkotalkDTO.BulkStatusResponse
*/
@Override
@TraceLogging
public KkotalkDTO.BulkStatusResponse findBulkStatus(final KkotalkDTO.BulkStatusRequest reqDTO) {
List<String> errors = new ArrayList<>();
List<String> envelopes = reqDTO.getEnvelopes();
for(int idx = 0; idx < envelopes.size(); idx++) {
final String binderUuid = envelopes.get(idx);
if (Checks.isEmpty(binderUuid) || binderUuid.length() > 40) {
errors.add(String.format("문서 식별 번호는 40자를 넘을 수 없습니다[%d번째]", idx+1));
}
}
if(!errors.isEmpty()) {
throw BizRuntimeException.create(errors.toString());
}
String param = "{\"envelopeIds\":" + JsonUtils.toJson(envelopes) + "}";
return webClient.exchangeKkotalk(
HOST + API_BULKSTATUS[0],
HttpMethod.valueOf(API_BULKSTATUS[1]),
param,
KkotalkDTO.BulkStatusResponse.class,
getRlaybsnmInfo(reqDTO));
}
@Override
public ApiResponseDTO<KkotalkApiDTO.ValidTokenResponse> findKkotalkReadyAndMblPage(final KkotalkApiDTO.ValidTokenRequest reqDTO) {
final String url = HOST + API_VALID_TOKEN[0].replace(ENVELOPE_ID, reqDTO.getEnvelopeId())
.replace("{TOKEN}", reqDTO.getToken());
// 유효성 검증
final KkotalkApiDTO.ValidTokenResponse validTokenRes = webClient.exchangeKkotalk(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null,
KkotalkApiDTO.ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
// 문서상태 변경
final String url2 = HOST + API_MODIFY_STATUS[0].replace(ENVELOPE_ID, reqDTO.getEnvelopeId());
// 정상 : HttpStatus.NO_CONTENT(204) return
// error : body에 error_code, error_message return
final KkotalkApiDTO.KkotalkErrorDTO errorDTO = webClient.exchangeKkotalk(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), null, KkotalkApiDTO.KkotalkErrorDTO.class, getRlaybsnmInfo(reqDTO));
if(errorDTO != null){
return ApiResponseDTO.error(errorDTO.getErrorCode(), errorDTO.getErrorMessage());
}
return ApiResponseDTO.success();
}
//-------------------------------------------------------------------------------------------------------------------
private static <T> List<String> validate(T t, List<String> errList) {
final Set<ConstraintViolation<T>> list = validator.validate(t);
if(!list.isEmpty()) {
final List<String> errors = list.stream()
.map(row -> String.format("%s=%s", row.getPropertyPath(), row.getMessageTemplate()))
.toList();
// 추가적인 유효성 검증이 필요 없는 경우
if(errList == null){
if(!errors.isEmpty()) throw BizRuntimeException.create(errors.toString());
return null;
}
errList.addAll(errors);
}
return errList;
}
private CmmEnsRlaybsnmDTO getRlaybsnmInfo(final CmmEnsRequestDTO request){
return CmmEnsUtils.getRlaybsnmInfo(request.getSignguCode(), request.getFfnlgCode(), SndngSeCode.KAKAO);
}
}

@ -1,261 +0,0 @@
package kr.xit.ens.kakao.talk.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kakao.talk.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.talk.KkotalkDTO;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kakao.talk.service.IKkotalkEltrcDocService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
* <pre>
* description : controller
* packageName : kr.xit.ens.kakao.talk.web
* fileName : KkotalkEltrcDocController
* author : julim
* date : 2024-08-12
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-12 julim
*
* </pre>
*/
@Tag(name = "KkotalkEltrcDocController", description = "카카오톡 전자문서 API")
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/kakao/v2")
public class KkotalkEltrcDocController {
private final IKkotalkEltrcDocService service;
/**
* <pre>
*
* -. .
* </pre>
* @param reqDTO KkopayDocDTO.SendRequest
* @return ApiResponseDTO<KkopayDocDTO.SendResponse>
*/
@Operation(summary = "문서발송 요청", description = "카카오톡 전자문서 서버로 문서발송 처리를 요청")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = {
@ExampleObject(
name = "D10",
value = """
{
"productCode": "D10_1",
"envelope": {
"title": "전자문서",
"content": {
"link": "https://nps.or.kr"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"payload": "이용기관 페이로드",
"readExpiresAt": "2023-12-31T10:00:00",
"reviewExpiresAt": "2023-12-31T13:00:00",
"useNonPersonalizedNotification": true,
"phoneNumber": "01099999999",
"name": "홍길동",
"birthday": "20000303",
"externalId": "external_id1"
},
"signguCode": "51110",
"ffnlgCode": "11"
}
"""),
@ExampleObject(
name = "D11",
value = """
{
"productCode": "D11_1",
"envelope": {
"title": "전자문서",
"content": {
"html": "<!DOCTYPEhtml><html><body><h1>MyFirstHeading</h1><p>Myfirstparagraph.</p></body></html>"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"readExpiresAt": "2023-12-31T10:00:00",
"reviewExpiresAt": "2023-12-31T13:00:00",
"ci": "${CI}"
},
"signguCode": "51110",
"ffnlgCode": "11"
}
""")
})
})
@PostMapping(value = "/envelopes", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSend(
@RequestBody final KkotalkDTO.SendRequest reqDTO
) {
return ApiResponseDTO.success(service.requestSend(reqDTO));
}
/**
* <pre>
* (Redirect URL /)
* </pre>
* @param reqDTO KkopayDocDTO.ValidTokenRequest
* @return ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>
*/
@Operation(summary = "토큰 유효성 검증", description = "Redirect URL 접속 허용/불허")
@PostMapping(value = "/validToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse validToken(
@RequestBody final KkotalkDTO.ValidTokenRequest reqDTO
) {
return ApiResponseDTO.success(service.validToken(reqDTO));
}
/**
* <pre>
* API
* -. . (OTT ) API .
* -.
* 1) API .
* 2) API(/v1/envelopes/${ENVELOPE_ID}/read) read_at ) .
* </pre>
* @param reqDTO KkotalkApiDTO.EnvelopeStatusResponse
* @return ApiResponseDTO<Void>
*/
@Operation(summary = "문서열람처리(문서 상태 변경)", description = "문서열람처리(문서 상태 변경)")
@PostMapping(value = "/modifyStatus", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse modifyStatus(
@RequestBody final KkotalkApiDTO.EnvelopeId reqDTO
) {
service.modifyStatus(reqDTO);
return ApiResponseDTO.empty();
}
/**
* <pre>
* API
* -. .
* : , flow
* : polling , 5 .
* -.doc_box_status
* : SENT() > RECEIVED() > READ()/EXPIRED( )
* </pre>
* @param reqDTO KkotalkDTO.EnvelopeId
* @return ApiResponseDTO<KkotalkApiDTO.EnvelopeStatusResponse>
*/
@Operation(summary = "문서 상태 조회", description = "문서 상태 조회")
@PostMapping(value = "/findStatus", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findStatus(
@RequestBody final KkotalkApiDTO.EnvelopeId reqDTO
) {
return ApiResponseDTO.success(service.findStatus(reqDTO));
}
@Operation(summary = "대량 문서발송 요청 -> batch sendBulks 에서 호출", description = "카카오페이 전자문서 서버로 대량 문서발송 처리를 요청 -> batch sendBulks 에서 호출")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = {
@ExampleObject(
name = "D10",
value = """
{
"productCode": "D10_1",
"signguCode": "51110",
"ffnlgCode": "11",
"envelopes": [
{
"title": "전자문서",
"content": {
"html": "<!DOCTYPEhtml><html><body><h1>MyFirstHeading</h1><p>Myfirstparagraph.</p></body></html>"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"readExpiresAt": "2024-12-31T10:00:00",
"reviewExpiresAt": "2025-03-31T13:00:00",
"phoneNumber": "01099999999",
"name": "홍길동",
"birthday": "20000303",
"externalId": "external_id1"
},
{
"title": "전자문서",
"content": {
"html": "<!DOCTYPEhtml><html><body><h1>MyFirstHeading</h1><p>Myfirstparagraph.</p></body></html>"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"readExpiresAt": "2024-12-31T10:00:00",
"reviewExpiresAt": "2025-03-31T13:00:00",
"hash": "b0c34fdc5e2ecb0335919fdad3b2ada28fa3ab90ec16e9055c3e9e05c431c6e8",
"ci": "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==",
"externalId": "external_id2"
}
]
}
"""),
@ExampleObject(
name = "D11",
value = """
{
"productCode": "D11_1",
"signguCode": "51110",
"ffnlgCode": "11",
"envelopes": [
{
"title": "전자문서",
"content": {
"link": "https://nps.or.kr"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"payload": "이용기관 페이로드",
"readExpiresAt": "2024-12-31T10:00:00",
"reviewExpiresAt": "2025-03-31T13:00:00",
"phoneNumber": "01099999999",
"name": "홍길동",
"birthday": "20000303",
"externalId": "external_id1"
},
{
"title": "전자문서",
"content": {
"link": "https://nps.or.kr"
},
"guide": "국민연금 공단에서 보내는 문서입니다.",
"payload": "이용기관 페이로드",
"readExpiresAt": "2024-12-31T10:00:00",
"reviewExpiresAt": "2025-03-31T13:00:00",
"ci": "${CI}",
"externalId": "external_id2"
}
]
}
""")
})
})
@PostMapping(value = "/envelopes/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSendBulk(
@RequestBody final KkotalkDTO.BulkSendRequest reqDTO
) {
return ApiResponseDTO.success(service.requestSendBulk(reqDTO));
}
/**
* <pre>
*
* -. .
* </pre>
* @param reqDTO KkotalkApiDTO.BulkStatusRequest
* @return KkotalkApiDTO.BulkStatusResponse
*/
@Operation(summary = "대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출", description = "카카오페이 전자문서 서버로 대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출")
@PostMapping(value = "/envelopes/bulk/status", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findBulkStatus(
@RequestBody final KkotalkDTO.BulkStatusRequest reqDTO
) {
return ApiResponseDTO.success(service.findBulkStatus(reqDTO));
}
}

@ -0,0 +1,179 @@
package kr.xit.ens.kakao.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kakao.service.IAsyncKkopayEltrcDocService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description : controller
* packageName : kr.xit.ens.kakao.web
* fileName : AsyncKkopayEltrcDocController
* author : julim
* date : 2023-04-28
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-04-28 julim
*
* </pre>
*/
@Tag(name = "AsyncKkopayEltrcDocController", description = "카카오페이 MyDoc API(비동기)")
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/kakao/v2")
public class AsyncKkopayEltrcDocController {
private final IAsyncKkopayEltrcDocService service;
/**
* <pre>
*
* -. .
* </pre>
* @param reqDTO KkopayDocDTO.SendRequest
* @return ApiResponseDTO<KkopayDocDTO.SendResponse>
*/
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = {
@ExampleObject(value = """
{
"document": {
"title": "문서 제목",
"read_expired_sec": 3600,
"hash": "6EFE827AC88914DE471C621AE",
"common_categories": [
"NOTICE"
],
"receiver": {
"phone_number": "01093414345",
"name": "김지호",
"birthday": "19831218",
"is_required_verify_name": false
},
"property": {
"link": "http://ip:8081/api/kakaopay/v1/ott",
"cs_number": "02-123-4567",
"cs_name": "콜센터",
"payload": "payload 파라미터 입니다.",
"message": "해당 안내문은 다음과 같습니다."
}
},
"signguCode": "88328",
"ffnlgCode": "11"
}
""")
})
})
@Operation(hidden = true, summary = "문서발송 요청", description = "카카오페이 전자문서 서버로 문서발송 처리를 요청")
@PostMapping(value = "/documents", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSend(
@RequestBody final SendRequest reqDTO
) {
return ApiResponseDTO.of(service.requestSend(reqDTO));
}
/**
* <pre>
* (Redirect URL /)
* </pre>
* @param reqDTO KkopayDocDTO.ValidTokenRequest
* @return ApiResponseDTO<KkopayDocDTO.ValidTokenResponse>
*/
@Operation(hidden = true, summary = "토큰 유효성 검증", description = "Redirect URL 접속 허용/불허")
@PostMapping(value = "/validToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse validToken(
@RequestBody final ValidTokenRequest reqDTO
) {
return ApiResponseDTO.of(service.validToken(reqDTO));
}
/**
* <pre>
* API
* -. . (OTT ) API .
* -.
* 1) API .
* 2) API(/v1/documents/{document_binder_uuid}/status) read_at ) .
* </pre>
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
* @return ApiResponseDTO<Void>
*/
@Operation(hidden = true, summary = "문서 상태 변경", description = "문서 상태 변경")
@PostMapping(value = "/modifyStatus", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse modifyStatus(
@RequestBody final DocumentBinderUuid reqDTO
) {
return ApiResponseDTO.of(service.modifyStatus(reqDTO));
}
/**
* <pre>
* API
* -. .
* : , flow
* : polling , 5 .
* -.doc_box_status
* : SENT() > RECEIVED() > READ()/EXPIRED( )
* </pre>
* @param reqDTO KkopayDocAttrDTO.DocumentBinderUuid
* @return ApiResponseDTO<KkopayDocDTO.DocStatusResponse>
*/
@Operation(hidden = true, summary = "문서 상태 조회", description = "문서 상태 조회")
@PostMapping(value = "/findStatus", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findStatus(
@RequestBody final DocumentBinderUuid reqDTO
) {
return ApiResponseDTO.of(service.findStatus(reqDTO));
}
@Operation(hidden = true, summary = "대량 문서발송 요청", description = "카카오페이 전자문서 서버로 대량 문서발송 처리를 요청")
@PostMapping(value = "/documents/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSendBulk(
@RequestBody final BulkSendRequests reqDTO
) {
return ApiResponseDTO.of(service.requestSendBulk(reqDTO));
}
/**
* <pre>
*
* -. .
* </pre>
* @param reqDTO KkopayDocBulkDTO.BulkStatusRequests
* @return ApiResponseDTOApiResponseDTO<BulkStatusResponses.BulkStatusResponses>
*/
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"document_binder_uuids\": [\n"
+ " \"BIN-883246dbff7b11edb3bb7affed8a016d\"\n"
+ " ]}")
})
})
@Operation(hidden = true, summary = "대량 문서 상태 조회 요청", description = "카카오페이 전자문서 서버로 대량 문서 상태 조회 요청")
@PostMapping(value = "/documents/bulk/status", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findBulkStatus(
@RequestBody final BulkStatusRequests reqDTO
) {
return ApiResponseDTO.of(service.findBulkStatus(reqDTO));
}
}

@ -1,28 +1,29 @@
package kr.xit.ens.kakao.pay.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
package kr.xit.ens.kakao.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocAttrDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.pay.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.ValidTokenRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kakao.pay.service.IKkopayEltrcDocService;
import kr.xit.ens.kakao.service.IKkopayEltrcDocService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description : controller
* packageName : kr.xit.ens.kakao.pay.web
* packageName : kr.xit.ens.kakao.web
* fileName : KkopayEltrcDocController
* author : julim
* date : 2023-04-28
@ -83,7 +84,7 @@ public class KkopayEltrcDocController {
})
@PostMapping(value = "/documents", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSend(
@RequestBody final KkopayDocDTO.SendRequest reqDTO
@RequestBody final SendRequest reqDTO
) {
return ApiResponseDTO.success(service.requestSend(reqDTO));
}
@ -98,7 +99,7 @@ public class KkopayEltrcDocController {
@Operation(summary = "토큰 유효성 검증", description = "Redirect URL 접속 허용/불허")
@PostMapping(value = "/validToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse validToken(
@RequestBody final KkopayDocDTO.ValidTokenRequest reqDTO
@RequestBody final ValidTokenRequest reqDTO
) {
return ApiResponseDTO.success(service.validToken(reqDTO));
}
@ -117,7 +118,7 @@ public class KkopayEltrcDocController {
@Operation(summary = "문서 상태 변경", description = "문서 상태 변경")
@PostMapping(value = "/modifyStatus", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse modifyStatus(
@RequestBody final KkopayDocAttrDTO.DocumentBinderUuid reqDTO
@RequestBody final DocumentBinderUuid reqDTO
) {
service.modifyStatus(reqDTO);
return ApiResponseDTO.empty();
@ -138,7 +139,7 @@ public class KkopayEltrcDocController {
@Operation(summary = "문서 상태 조회", description = "문서 상태 조회")
@PostMapping(value = "/findStatus", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findStatus(
@RequestBody final KkopayDocAttrDTO.DocumentBinderUuid reqDTO
@RequestBody final DocumentBinderUuid reqDTO
) {
return ApiResponseDTO.success(service.findStatus(reqDTO));
}
@ -163,7 +164,7 @@ public class KkopayEltrcDocController {
@Operation(summary = "대량 문서발송 요청 -> batch sendBulks 에서 호출", description = "카카오페이 전자문서 서버로 대량 문서발송 처리를 요청 -> batch sendBulks 에서 호출")
@PostMapping(value = "/documents/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestSendBulk(
@RequestBody final KkopayDocBulkDTO.BulkSendRequests reqDTO
@RequestBody final BulkSendRequests reqDTO
) {
return ApiResponseDTO.success(service.requestSendBulk(reqDTO));
}
@ -179,7 +180,7 @@ public class KkopayEltrcDocController {
@Operation(summary = "대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출", description = "카카오페이 전자문서 서버로 대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출")
@PostMapping(value = "/documents/bulk/status", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findBulkStatus(
@RequestBody final KkopayDocBulkDTO.BulkStatusRequests reqDTO
@RequestBody final BulkStatusRequests reqDTO
) {
return ApiResponseDTO.success(service.findBulkStatus(reqDTO));
}

@ -1,5 +1,6 @@
package kr.xit.ens.kt.service;
import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfRequest;
import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfResponse;
import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmRequest;
@ -10,7 +11,8 @@ import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtExcaDTO.KtExcaRequest;
import kr.xit.biz.ens.model.kt.KtExcaDTO.KtExcaResponse;
import kr.xit.biz.ens.model.kt.KtInputDTO;
import kr.xit.biz.ens.model.kt.KtInputDTO.KtApproveRcvRequest;
import kr.xit.biz.ens.model.kt.KtInputDTO.KtRefuseRcvRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtBlacklistRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlResponse;
@ -41,7 +43,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
*
* </pre>
*/
public interface IKtBcService {
public interface IKtMmsService {
//------------------------------------------------------------------------------
// mens 사용 API
//------------------------------------------------------------------------------
@ -62,8 +64,8 @@ public interface IKtBcService {
KtSendSttcDtlResponse sendSttcDtl(final KtSendSttcDtlRequest reqDTO);
KtCommonResponse whitelist(final KtWhitelistRequest reqDTO);
KtCommonResponse refuseRcv(final KtInputDTO.KtRefuseRcvRequest reqDTO);
KtCommonResponse approveRcv(final KtInputDTO.KtApproveRcvRequest reqDTO);
KtCommonResponse refuseRcv(final KtRefuseRcvRequest reqDTO);
KtCommonResponse approveRcv(final KtApproveRcvRequest reqDTO);
KtAcmdCerfResponse cerfAcmd(final KtAcmdCerfRequest reqDTO);

@ -2,14 +2,6 @@ package kr.xit.ens.kt.service;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
@ -26,7 +18,8 @@ import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtExcaDTO.KtExcaRequest;
import kr.xit.biz.ens.model.kt.KtExcaDTO.KtExcaResponse;
import kr.xit.biz.ens.model.kt.KtInputDTO;
import kr.xit.biz.ens.model.kt.KtInputDTO.KtApproveRcvRequest;
import kr.xit.biz.ens.model.kt.KtInputDTO.KtRefuseRcvRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtBlacklistRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlResponse;
@ -48,13 +41,18 @@ import kr.xit.core.support.utils.DateUtils;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.kt.service
* fileName : KtBcService
* fileName : KtMmsService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -66,7 +64,7 @@ import lombok.RequiredArgsConstructor;
*/
@RequiredArgsConstructor
@Service
public class KtBcService extends AbstractService implements IKtBcService {
public class KtMmsService extends AbstractService implements IKtMmsService {
@Value("${app.contract.kt.host}")
private String HOST;
//-----------------------------------------------------------------
@ -149,6 +147,16 @@ public class KtBcService extends AbstractService implements IKtBcService {
*/
@Value("${app.contract.kt.api.cfm-acmd}")
private String API_CFM_ACMD;
/**
* : BC-AG-SN-014
*/
@Value("${app.contract.kt.api.refuse-rcv}")
private String API_REFUSE_RCV;
/**
* : BC-AG-SN-015
*/
@Value("${app.contract.kt.api.approve-rcv}")
private String API_APPROVE_RCV;
private final ApiWebClientUtil webClient;
private final ICmmEnsCacheService cacheService;
@ -161,12 +169,10 @@ public class KtBcService extends AbstractService implements IKtBcService {
@Override
@TraceLogging
public KtTokenResponse requestToken(final KtMnsRequest paramDTO) {
String profile = StringUtils.isEmpty(paramDTO.getProfile()) ? (ApiConstants.IS_PROFILE_LOCAL? "local" : "prod") : paramDTO.getProfile();
paramDTO.setProfile(profile);
final CmmEnsRlaybsnmDTO ktMnsInfo = cacheService.getRlaybsnmInfoCache(CmmEnsRequestDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(paramDTO.getProfile())
.profile(ApiConstants.PROFILE)
.build());
final KtTokenRequest reqDTO = KtTokenRequest.builder()
@ -351,7 +357,7 @@ public class KtBcService extends AbstractService implements IKtBcService {
}
@Override
public KtCommonResponse refuseRcv(final KtInputDTO.KtRefuseRcvRequest reqDTO) {
public KtCommonResponse refuseRcv(final KtRefuseRcvRequest reqDTO) {
//final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode());
//reqDTO.setServiceCd(ktMnsInfo.get);
//reqDTO.setServiceKey(ktMnsInfo.get);
@ -364,7 +370,7 @@ public class KtBcService extends AbstractService implements IKtBcService {
}
@Override
public KtCommonResponse approveRcv(final KtInputDTO.KtApproveRcvRequest reqDTO) {
public KtCommonResponse approveRcv(final KtApproveRcvRequest reqDTO) {
//final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode());
//reqDTO.setServiceCd(ktMnsInfo.get);
//reqDTO.setServiceKey(ktMnsInfo.get);

@ -1,11 +1,5 @@
package kr.xit.ens.kt.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfRequest;
@ -33,15 +27,20 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenExcaRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenReadRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kt.service.IKtBcService;
import kr.xit.ens.kt.service.IKtMmsService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description : KT BC API controller
* description :
*
* packageName : kr.xit.ens.kt.web
* fileName : KtBcController
* fileName : KtMmsController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -51,13 +50,13 @@ import lombok.RequiredArgsConstructor;
*
* </pre>
*/
@Tag(name = "KtBcController", description = "KT BC API Controller")
@Tag(name = "KtMmsController", description = "KT MMS API")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/kt/v1")
public class KtBcController {
public class KtMmsController {
private final IKtBcService service;
private final IKtMmsService service;
//------------------------------------------------------------------------------
// mens 사용 API

@ -1,25 +1,24 @@
package kr.xit.ens.kt.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.biz.kt.service.IBizKtMmsService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description : KT BC API
*
* packageName : kr.xit.ens.kt.web
* fileName : KtBcInboundController
* fileName : KtMmsController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -29,12 +28,12 @@ import lombok.RequiredArgsConstructor;
*
* </pre>
*/
@Tag(name = "KtBcInboundController", description = "KT BC Inbound API - KT BC 에서 사용하는 API")
@Tag(name = "KtMmsInboundController", description = "KT MMS Inbound API")
@RequiredArgsConstructor
@RestController
public class KtBcInboundController {
public class KtMmsInboundController {
private final IBizKtBcService bizService;
private final IBizKtMmsService bizService;
/**
* <pre>

@ -1,30 +0,0 @@
package kr.xit.ens.ktgbs.service;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
* description :
* packageName : kr.xit.ens.ktgbs.service
* fileName : IKtGbsService
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
public interface IKtGbsService {
//------------------------------------------------------------------------------
// mens 사용 API
//------------------------------------------------------------------------------
KtCommonDTO.KtCommonResponse mainSend(final KtGbsDTO.MsgSendRequest reqDTO);
KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse cfmToken(final KtGbsDTO.TokenConfirmRequest reqDTO);
KtCommonDTO.KtCommonResponse readToken(final KtGbsDTO.TokenReadRequest reqDTO);
//------------------------------------------------------------------------------
}

@ -1,162 +0,0 @@
package kr.xit.ens.ktgbs.service;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
/**
* <pre>
* description :
* packageName : kr.xit.ens.ktgbs.service
* fileName : KtGbsService
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@RequiredArgsConstructor
@Service
public class KtGbsService extends AbstractService implements IKtGbsService {
@Value("${app.contract.ktgbs.host}")
private String HOST;
@Value("${app.contract.ktgbs.api.access-token}")
private String API_ACCESS_TOKEN;
/**
* : BC-AG-SN-008
*/
@Value("${app.contract.ktgbs.api.cfm-token}")
private String API_CFM_TOKEN;
/**
* : BC-AG-SN-009
*/
@Value("${app.contract.ktgbs.api.read-token}")
private String API_READ_TOKEN;
/**
*
*/
@Value("${app.contract.ktgbs.api.main-send}")
private String API_MAIN_SEND;
private final ApiWebClientUtil webClient;
private final ICmmEnsCacheService cacheService;
@Override
@TraceLogging
public KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO) {
String profile = StringUtils.isEmpty(paramDTO.getProfile()) ? (ApiConstants.IS_PROFILE_LOCAL? "local" : "prod") : paramDTO.getProfile();
paramDTO.setProfile(profile);
final CmmEnsRlaybsnmDTO ktMnsInfo = cacheService.getRlaybsnmInfoCache(CmmEnsRequestDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(paramDTO.getProfile())
.build());
final KtGbsDTO.TokenRequest reqDTO = KtGbsDTO.TokenRequest.builder()
.clientId(ktMnsInfo.getKtSvcClientId())
.clientSecret(ktMnsInfo.getKtSvcClientSecret())
.build();
CmmEnsUtils.validate(reqDTO);
final Map<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
headerMap.put(HttpHeaders.AUTHORIZATION, String.format("Bearer %s", ktMnsInfo.getKtAccessToken()));
return webClient.exchangeFormData(
HOST + API_ACCESS_TOKEN,
HttpMethod.POST,
reqDTO,
KtGbsDTO.TokenResponse.class,
headerMap
);
}
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse cfmToken(final KtGbsDTO.TokenConfirmRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchangeKtGbs(
HOST + API_CFM_TOKEN,
HttpMethod.POST,
JsonUtils.toJson(reqDTO),
KtCommonDTO.KtCommonResponse.class,
ktMnsInfo
);
}
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse readToken(final KtGbsDTO.TokenReadRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setMmsRdgTmst(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"));
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchangeKtGbs(
HOST + API_READ_TOKEN,
HttpMethod.POST,
JsonUtils.toJson(reqDTO),
KtCommonDTO.KtCommonResponse.class,
ktMnsInfo
);
}
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse mainSend(final KtGbsDTO.MsgSendRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchangeKtGbs(
HOST + API_MAIN_SEND,
HttpMethod.POST,
JsonUtils.toJson(reqDTO),
KtCommonDTO.KtCommonResponse.class,
ktMnsInfo
);
}
private CmmEnsRlaybsnmDTO getRlaybsnmInfo(final KtCommonDTO.KtMnsRequest request){
return CmmEnsUtils.getRlaybsnmInfo(request.getSignguCode(), request.getFfnlgCode(), ApiConstants.SndngSeCode.KT_GIBIS);
}
}

@ -1,85 +0,0 @@
package kr.xit.ens.ktgbs.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.ktgbs.service.IKtGbsService;
import lombok.RequiredArgsConstructor;
/**
* <pre>
* description :
* packageName : kr.xit.ens.ktgbs.web
* fileName : KtGbsController
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@Tag(name = "KtGbsController", description = "KT GIBIS API controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/ktgbs/v1")
public class KtGbsController {
private final IKtGbsService service;
@Operation(summary = "본문자 수신 등록 요청", description = "본문자 수신 등록 요청")
@PostMapping(value = "/mainSend", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse mainSend(@RequestBody final KtGbsDTO.MsgSendRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.mainSend(reqDTO);
return ApiResponseDTO.success(dto);
}
@Operation(deprecated = true, summary = "기관용 토큰 발급 요청 -> 업무(Biz)단 API 에서 처리", description = "KT 문서 중개자 정보 DB update가 필요하여 업무단의 API를 사용하여야 함")
@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestToken(@RequestBody final KtCommonDTO.KtMnsRequest paramDTO) {
return ApiResponseDTO.success(service.requestToken(paramDTO));
}
/**
* <pre>
* - API set url
* -> OTT token get
* - API call
* - API call
* @param reqDTO TokenConfirmRequest
* @return KtCommonResponse
* </pre>
*/
@Operation(deprecated = true, summary = "토큰인증확인 조회 -> KT GIBIS 모바일 데이타 요청(모바일 페이지에서 호출)에서 처리", description = "토큰인증확인조회요청(BC-AG-SN-008) <br><a href='http://localhost:8081/swagger-ui/index.html?urls.primaryName=6.%20%EC%A0%84%EC%9E%90%EA%B3%A0%EC%A7%80%20%EC%97%85%EB%AC%B4%20API#/MobilePageController'>전자문서중개자모바일페이지</a>")
@PostMapping(value = "/cfmToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse cfmToken(@RequestBody final KtGbsDTO.TokenConfirmRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.cfmToken(reqDTO);
return ApiResponseDTO.success(dto);
}
/**
* <pre>
* - (BC-AG-SN-002) API set url
* -> OTT token get
* - (BC-AG-SN-008) API call
* - (BC-AG-SN-009) API call
* @param reqDTO KtTokenReadRequest
* @return KtCommonResponse
* </pre>
*/
@Operation(deprecated = true, summary = "토큰열람확인결과 전송 -> KT GIBIS 모바일 데이타 요청(모바일 페이지에서 호출)에서 처리", description = "토큰열람확인결과 전송(BC-AG-SN-009) <br><a href='http://localhost:8081/swagger-ui/index.html?urls.primaryName=6.%20%EC%A0%84%EC%9E%90%EA%B3%A0%EC%A7%80%20%EC%97%85%EB%AC%B4%20API#/MobilePageController'>전자문서중개자모바일페이지</a>")
@PostMapping(value = "/readToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse readToken(@RequestBody final KtGbsDTO.TokenReadRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.readToken(reqDTO);
return ApiResponseDTO.success(dto);
}
}

@ -1,127 +0,0 @@
package kr.xit.ens.ktgbs.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.ktgbs.service.IBizKtGbsService;
import lombok.RequiredArgsConstructor;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
/**
* <pre>
* description : KT GBIS API
* packageName : kr.xit.ens.ktgbs.web
* fileName : KtGbsMmsInboundController
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@Tag(name = "KtGbsInboundController", description = "KT GIBIS Inbound API - KT GIBIS 에서 사용하는 API")
@RequiredArgsConstructor
@RestController
public class KtGbsInboundController {
private final IBizKtGbsService bizService;
/**
* <pre>
* / -> KT GIBIS
* - KT GBIS
* - url : http://{각대행사(IP:Port)}/api/msg/result
* @param reqDTO KtMsgRsltRequest
* @return KtCommonResponse
* </pre>
*/
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(
mediaType = "application/json",
examples = {
@ExampleObject(
value = """
{
"service_cd" : "CD001",
"reqs" : [
{
"src_key" : "OvSsuljd1K-67c1fc38-1a59-4fbe-930e-802db6609140",
"mms_sndg_rslt_sqno" : 2,
"prcs_dt" : "20240819",
"mms_bsns_dvcd" : "01001",
"mbl_bzowr_dvcd" : "02",
"rl_mms_sndg_telno" : "4230",
"mms_rslt_dvcd" : "40",
"mms_sndg_tmst" : "20240819090237",
"mms_rcv_tmst" : "20240819090239",
"mms_rdg_tmst" : "20240819114405",
"prev_approve_yn" : "Y",
"msg_type" : "2"
}
]
}
"""
),
})
})
@Operation(summary = "메세지 발송/수신 결과 전송 -> KT GIBIS에서 호출", description = "메세지 발송/수신 결과 전송 -> KT GIBIS에서 호출")
//@PostMapping(value = "/goji/kt/gibis/stat/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/goji/api/msg/result", produces = MediaType.APPLICATION_JSON_VALUE)
public KtCommonDTO.KtCommonResponse messageResult(@RequestBody final KtGbsDTO.MsgRsltRequest reqDTO) {
return bizService.messageResult(reqDTO);
}
@Operation(summary = "링크이미지 출력")
@GetMapping(value = "/goji/sys/util/lnk/img")
public void printImg(HttpServletRequest request, HttpServletResponse response, @RequestParam String link, @RequestParam String type) throws IOException {
String mime = null;
if ("jpg".equals(type) || "jpeg".equals(type))
mime = "image/jpeg";
else if ("png".equals(type))
mime = "image/png";
else if ("gif".equals(type))
mime = "image/gif";
else
mime = "image/jpeg";
try (InputStream inputStream = new URL(link).openStream();
ServletOutputStream outputStream = response.getOutputStream();) {
response.setHeader("Cache-Control", "no-store");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType(mime);
int length;
byte[] buffer = new byte[1024];
while ((length = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, length);
}
outputStream.flush();
} catch (FileNotFoundException e) {
response.getWriter().println("File is Not Found." + e.getMessage());
} catch (IOException e) {
response.getWriter().println("I/O Error Occurred!!. " + e.getMessage());
}
}
}

@ -1,22 +1,20 @@
package kr.xit.ens.nice.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.nice.NiceCiDTO;
import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.nice.cmm.CmmNiceCiUtils;
import kr.xit.ens.nice.service.INiceCiService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
@ -116,22 +114,4 @@ public class NiceCiController {
return ApiResponseDTO.success(service.requestCi(reqDTO));
}
//--------------------------------------------------------------------------------
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(
mediaType = "application/json",
examples = {
@ExampleObject(
name = "교통시설운영처",
value = PARAM1),
@ExampleObject(
name = "승화원",
value = PARAM2)
})
})
@Operation(summary = "아이핀 CI 요청", description = "아이핀 CI 요청")
@PostMapping(value = "/requestNiceCi", produces = MediaType.APPLICATION_JSON_VALUE)
public NiceCiDTO.IpinCiResDataBody requestNiceCi(@RequestBody final NiceCiRequest reqDTO) {
return service.requestCi(reqDTO);
}
}

@ -0,0 +1,26 @@
package kr.xit.ens.pplus.mapper;
import java.util.List;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.mapper
* fileName : IPplusMapper
* author : limju
* date : 2023-11-01
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-11-01 limju
*
* </pre>
*/
@Mapper
public interface IPplusMapper {
List<BatchAcceptRequest> selectPostPlusSendTgts(final SndngMssageParam dto);
}

@ -0,0 +1,27 @@
package kr.xit.ens.pplus.service;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : IPplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
public interface IPplusService {
PpCommonResponse sendBulks(final SndngMssageParam reqDTO);
PpStatusResponse statusBulks(final PpStatusRequest reqDTO);
String test();
}

@ -0,0 +1,156 @@
package kr.xit.ens.pplus.service;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse;
import kr.xit.biz.other.mapper.IBizOtherMapper;
import kr.xit.biz.other.model.ElecnoticeDTO;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.FileUtil;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import kr.xit.ens.pplus.mapper.IPplusMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jasypt.encryption.StringEncryptor;
import org.json.simple.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : PplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@Slf4j
@RequiredArgsConstructor
@Service
public class PplusService extends AbstractService implements IPplusService {
@Value("${app.file.cmm.temp-path}")
private String FILE_TEMP_PATH;
@Value("${app.contract.pplus.host}")
private String HOST;
@Value("${app.contract.pplus.api.accept}")
private String ACCEPT;
@Value("${app.contract.pplus.api.status}")
private String STATUS;
private final StringEncryptor jasyptStringEncryptor;
private final ApiWebClientUtil webClient;
private final IPplusMapper mapper;
private final IBizOtherMapper mapper2;
@SuppressWarnings("unchecked")
@Override
@TraceLogging
public PpCommonResponse sendBulks(final SndngMssageParam reqDTO) {
final List<BatchAcceptRequest> tgtList = mapper.selectPostPlusSendTgts(reqDTO);
if(!tgtList.isEmpty()){
JSONObject master = new JSONObject();
master.put("cols", JsonUtils.toObject(tgtList.get(0).getMasterCols(), ArrayList.class));
master.put("rows", JsonUtils.toObject(tgtList.get(0).getMasterRows(), ArrayList.class));
JSONObject detail = new JSONObject();
detail.put("cols", JsonUtils.toObject(tgtList.get(0).getDetailCols(), ArrayList.class));
detail.put("rows", tgtList.stream()
.map(d -> jasyptStringEncryptor.decrypt(d.getDetailRows()))
.map(d -> JsonUtils.toObject(d, ArrayList.class))
.toList());
JSONObject pstJson = new JSONObject();
pstJson.put("master", master);
pstJson.put("detail", detail);
final String unitySndngMstId = tgtList.get(0).getUnitySndngMastrId();
FileUtil.saveFile(FILE_TEMP_PATH,unitySndngMstId+".json", pstJson.toJSONString().getBytes(
StandardCharsets.UTF_8));
return accept(reqDTO, unitySndngMstId);
}
return null;
}
public PpCommonResponse accept(final SndngMssageParam paramDTO, final String unitySndngMstId) {
final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(paramDTO.getSignguCode(), paramDTO.getFfnlgCode(), SndngSeCode.PPLUS);
MultipartFile pstFile = FileUtil.createMutipartFile(unitySndngMstId + ".json", FILE_TEMP_PATH);
List<MultipartFile> pstFiles = new ArrayList<>();
pstFiles.add(pstFile);
PpCommonResponse resDTO = webClient.exchangeFileData(
HOST + ACCEPT + String.format("?apiKey=%s", ktMnsInfo.getPplusApiKey()),
HttpMethod.POST,
pstFiles,
"pstFile",
PpCommonResponse.class
);
resDTO.setUnitySndngMastrId(unitySndngMstId);
File file = new File(FILE_TEMP_PATH + "/" +unitySndngMstId + ".json");
if(file.exists()) {
file.delete();
}
return resDTO;
}
@Override
public PpStatusResponse statusBulks(PpStatusRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(), SndngSeCode.PPLUS);
reqDTO.setApiKey(ktMnsInfo.getPplusApiKey());
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
reqDTO.setTry1(null);
CmmEnsUtils.validate(reqDTO);
final Map<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.MULTIPART_FORM_DATA_VALUE);
return webClient.exchangeFormData(
HOST + STATUS,
HttpMethod.POST,
reqDTO,
PpStatusResponse.class,
headerMap
);
}
@Override
public String test() {
final List<ElecnoticeDTO.Elecnoticemst> tgtList = mapper2.selectElecnoticemst();
if(tgtList == null) System.out.println("1");
return "test";
}
}

@ -0,0 +1,61 @@
package kr.xit.ens.pplus.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest;
import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.pplus.service.IPplusService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.web
* fileName : PplusController
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@Tag(name = "PplusController", description = "Postplus(포스토피아) API")
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/ens/pplus/v1")
public class PplusController {
private final IPplusService service;
@Operation(summary = "우편제작접수", description = "우편제작접수 요청<br><a href='/pstFile.html'>우편제작접수</a>")
@PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse send(@ModelAttribute final SndngMssageParam paramDTO) {
PpCommonResponse resDTO = service.sendBulks(paramDTO);
return ApiResponseDTO.success(resDTO);
}
@Operation(summary = "우편제작 상태 조회", description = "우편제작상태조회")
@PostMapping(value = "/status", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse status(@RequestBody final PpStatusRequest paramDTO) {
PpStatusResponse resDTO = service.statusBulks(paramDTO);
return ApiResponseDTO.success(resDTO);
}
@Operation(summary = "테스트", description = "테스트")
@PostMapping(value = "/test", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse test() {
String msg = service.test();
return ApiResponseDTO.success(msg);
}
}

@ -31,3 +31,14 @@ app:
enabled: false
url: https://hooks.slack.com/services/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
ssh:
host: 192.168.200.52
port: 22
id: administrator
passwd: 1q2w3e4r5t!
sg:
root-path: /SMSImage
ens-path: /ENSData
rcv: /
backup: /backup
err: /err

@ -92,3 +92,12 @@ app:
kt:
host: http://211.43.10.163:10210/ONLWeb
api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8081/api/biz/mbl/v1/kt/dpMblPage
me-callback-url: http://${app.api-ip}:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014
refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse
# 수신동의상태전송 : BC-AG-SN-015
approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve

@ -14,31 +14,23 @@ app:
maxPoolSize: 10
kakao:
bulk-max-cnt: 10
# token: dd394da7f66211eb9cbe46e139ceffc2
# uuid: CON-41ef0535f67211ebbdedd2e6ed332381
host: https://docs-gw.kakaopay.com
# token: dd394da7f66211eb9cbe46e139ceffc2
# uuid: CON-41ef0535f67211ebbdedd2e6ed332381
api:
pay:
host: https://docs-gw.kakaopay.com
send: /v1/documents;POST
bulksend: /v1/documents/bulk;POST
validToken: /v1/{document_binder_uuid}/tokens/{tokens};GET
modifyStatus: /v1/documents/{document_binder_uuid};POST
bulkstatus: /v1/documents/bulk/status;POST
findStatus: /v1/documents/{document_binder_uuid}/status;GET
talk:
host: https://edoc-gw.kakao.com
send: /v1/envelopes/{PRODUCT_CODE};POST
bulksend: /v1/bulk/envelopes/{PRODUCT_CODE};POST
validToken: /v1/envelopes/{ENVELOPE_ID}/tokens/{TOKEN}/verify;GET
modifyStatus: /v1/envelopes/{ENVELOPE_ID}/read;POST
bulkstatus: /v1/envelopes/status;POST
send: /v1/documents;POST
validToken: /v1/{document_binder_uuid}/tokens/{tokens};GET
modifyStatus: /v1/documents/{document_binder_uuid};POST
findStatus: /v1/documents/{document_binder_uuid}/status;GET
bulksend: /v1/documents/bulk;POST
bulkstatus: /v1/documents/bulk/status;POST
nice:
host: https://svc.niceapi.co.kr:22001
# signgu-code: 11000
# ffnlg-code: 11
# client-id: 6c3eb1ff-530d-458a-9a6e-e02e3346f679
# client-secret: 960f204ec45bb312b7ad2d6b54b984d9c353b8
# product-id: 2101466024
# signgu-code: 11000
# ffnlg-code: 11
# client-id: 6c3eb1ff-530d-458a-9a6e-e02e3346f679
# client-secret: 960f204ec45bb312b7ad2d6b54b984d9c353b8
# product-id: 2101466024
api:
generate-token: /digital/niceid/oauth/oauth/token
revoke-token: /digital/niceid/oauth/oauth/token/revokeById
@ -82,14 +74,15 @@ app:
info-acmd: /api/acmdinfo
# 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002
cfm-acmd: /api/acmdinfocfm
ktgbs:
host: http://108.1.143.27:8080
pplus:
host: https://t.postplus.co.kr
api:
# 본문자수신등록 : BC-AG-SN-002
main-send: /api/msg/send
# 토큰발행
access-token: /api/oauth/token
# 토큰인증확인조회
cfm-token: /api/msg/token
# 토큰열람확인결과전송
read-token: /api/msg/read
# 우편 제작 접수
accept: /po/api/postplusPstMsrApi.do
# 우편 제작 상태 조회
status: /po/api/postplusPstStatusApi.do
epost:
host: http://openapi.epost.go.kr
api:
postTrackInfo: /trace/retrieveLongitudinalCombinedService/retrieveLongitudinalCombinedService/getLongitudinalCombinedList

@ -1,119 +0,0 @@
#-----------------------------------------------------------------------
# local 설정
#-----------------------------------------------------------------------
spring:
# //FIXME:: SSL 활성화시 코멘트 제거
# profiles:
# include:
# - https
datasource:
hikari:
# 9 server
primary:
database: oracle
driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@211.119.124.117:1521:ora11g
username: xit_traffic
password: traffic5
pool-name: xit-oracle-pool
devtools:
restart:
enabled: true
additional-exclude: static/**,public/**
livereload:
enabled: true
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
logging:
level:
root: debug
org.apache.http: warn
io.netty: warn
reactor.netty: WARN
# webclient logging
reactor.netty.http.client: DEBUG
#org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE
org.springframework: warn
org.hibernate.validator.internal: WARN
file:
# 로그파일 위치
path: ${app.data.root.path}/mens/logs
name: ${app.name}
# ==================================================================================================================
# SQL logging lib setting
# ==================================================================================================================
decorator:
datasource:
p6spy:
enable-logging: true
app:
api-ip: 211.119.124.73
# 강제로 swagger-url을 지정해야 하는 경우만 선언
#swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/'
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: http://localhost:8080, http://${app.api-ip}:8080, http://localhost:8082, http://${app.api-ip}:8082
data:
root:
#path: /Users/minuk/data
path: d:/data
#---------------------------------------------------------------
# log 설정
# request:
# custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
# --> 운영: common-enabled, 개발: custom-enabled 사용 권장
# response-enabled : 호출 결과 출력 - 운영시 false
# mdc : api 호출(서비스) 로그 기록
# uris : api 호출 로그 제외 패턴
#---------------------------------------------------------------
log:
request:
custom-enabled: true
response-enabled: true
# MDC logging trace 활성
mdc:
enabled: true
# slack
slack-webhook:
enabled: false
url: https://hooks.slack.com/services/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
contract:
# milisecond
connection:
timeout: 60000
readTimeout: 60000
kt:
# vpn 사용
#host: http://172.16.0.13:10210/ONLWeb
host: http://211.43.10.163:10210/ONLWeb
kakao:
api:
talk:
host: http://localhost:18080
send: /pxy/kkoNew/v1/envelopes/{PRODUCT_CODE}T;POST
bulksend: /pxy/kkoNew/v1/bulk/envelopes/{PRODUCT_CODE}T;POST
validToken: /pxy/kkoNew/v1/envelopes/{ENVELOPE_ID}/tokens/{TOKEN}/verify;GET
modifyStatus: /pxy/kkoNew/v1/envelopes/{ENVELOPE_ID}/read;POST
bulkstatus: /pxy/kkoNew/v1/envelopes/status;POST
pay:
host: http://localhost:18080
send: /pxy/kkost/v1/documents;POST
bulksend: /pxy/kkost/v1/documents/bulk;POST
validToken: /pxy/kkost/v1/{document_binder_uuid}/tokens/{tokens};GET
modifyStatus: /pxy/kkost/v1/documents/{document_binder_uuid};POST
bulkstatus: /pxy/kkost/v1/documents/bulk/status;POST
findStatus: /pxy/kkost/v1/documents/{document_binder_uuid}/status;GET

@ -1,107 +0,0 @@
#-----------------------------------------------------------------------
# local 설정
#-----------------------------------------------------------------------
spring:
# profiles:
# include:
# - https
datasource:
hikari:
# 9 server
primary:
database: mysql
driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: ens
password: xit5811807
pool-name: xit-maria-pool
devtools:
restart:
enabled: true
additional-exclude: static/**,public/**
livereload:
enabled: true
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
logging:
level:
root: debug
org.apache.http: warn
io.netty: warn
reactor.netty: WARN
# webclient logging
reactor.netty.http.client: DEBUG
#org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE
org.springframework: warn
org.hibernate.validator.internal: WARN
file:
# 로그파일 위치
path: ${app.data.root.path}/mens/logs
name: ${app.name}
# ==================================================================================================================
# SQL logging lib setting
# ==================================================================================================================
decorator:
datasource:
p6spy:
enable-logging: true
app:
api-ip: 211.119.124.73
# 강제로 swagger-url을 지정해야 하는 경우만 선언
#swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/'
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: http://localhost:8082, https://localhost:9443, http://${app.api-ip}:8082, http://${app.api-ip}:9443
data:
root:
#path: /Users/minuk/data
path: d:/data
#---------------------------------------------------------------
# log 설정
# request:
# custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
# --> 운영: common-enabled, 개발: custom-enabled 사용 권장
# response-enabled : 호출 결과 출력 - 운영시 false
# mdc : api 호출(서비스) 로그 기록
# uris : api 호출 로그 제외 패턴
#---------------------------------------------------------------
log:
request:
custom-enabled: true
response-enabled: true
# MDC logging trace 활성
mdc:
enabled: true
# slack
slack-webhook:
enabled: false
url: https://hooks.slack.com/services/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
contract:
# milisecond
connection:
timeout: 60000
readTimeout: 60000
kt:
# vpn 사용
#host: http://172.16.0.13:10210/ONLWeb
host: http://211.43.10.163:10210/ONLWeb
kakao:
api:
talk:
host: https://test-edoc-gw.kakao.com
send: /v1/envelopes/{PRODUCT_CODE}T;POST
bulksend: /v1/bulk/envelopes/{PRODUCT_CODE}T;POST

@ -8,10 +8,10 @@ spring:
primary:
database: mysql
driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: ens
password: xit5811807
pool-name: xit-maria-pool
jdbc-url: jdbc:mariadb://211.119.124.9:4407/mens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: root
password: xit1807
read-only: false
# multi-database
secondary:
database: oracle
@ -20,15 +20,6 @@ spring:
username: xit_traffic
password: traffic5
read-only: false
pool-name: xit-oracle-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
# transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
devtools:
restart:
@ -102,6 +93,18 @@ app:
enabled: false
url: https://hooks.slack.com/services/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
ssh:
host: 211.119.124.9
port: 22
id: xituser
passwd: xituser!@
sg:
root-path: /data/mens/sg-pni-cctv
ens-path: /data/mens/sg-ens-cctv
rcv: /rcv
backup: /backup
err: /err
contract:
# milisecond
connection:
@ -112,3 +115,14 @@ app:
# vpn 사용
#host: http://172.16.0.13:10210/ONLWeb
host: http://211.43.10.163:10210/ONLWeb
api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do
#dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014
refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse
# 수신동의상태전송 : BC-AG-SN-015
approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve

@ -14,13 +14,7 @@ spring:
password: ENC(+sXCmhmSV3Q/3KgOnmpnTQ==)
read-only: false
# multi-database
secondary:
database: oracle
driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@150.50.48.31:1521/ETISDDB
username: MOBELNOTI
password: wjswkrhwl12!@
read-only: false
#secondary:
devtools:
livereload:
@ -28,9 +22,9 @@ spring:
springdoc:
api-docs:
enabled: true
enabled: false
swagger-ui:
enabled: true
enabled: false
logging:
level:
@ -100,4 +94,12 @@ app:
#host: http://172.16.0.13:10210/ONLWeb
# 운영
host: http://172.16.11.182:10210/ONLWeb
api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: https://ens.sisul.or.kr/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: https://ens.sisul.or.kr/api/web/mbl/v1/kt/meMblPage.do
# 수신거부상태전송 : BC-AG-SN-014
refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse
# 수신동의상태전송 : BC-AG-SN-015
approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve

@ -17,7 +17,7 @@ server:
whitelabel:
enabled: false
app:
name: mens-traffic-api
name: mens-api
# springdoc url 정보
desc: 모바일 전자고지 Rest API
data:
@ -33,9 +33,6 @@ app:
post: /post/rcv/
spring:
# spring.profiles.include 유지(2.4이후 spring.config.import)
config:
use-legacy-processing: true
main:
# 순환참조 에러 무시
allow-circular-references: true
@ -43,22 +40,32 @@ spring:
file: ${app.data.root.path}/${app.name}.pid
profiles:
active: '@springProfilesActive@'
# core의 application-common.yml과 application-auth.yml include
include:
- https
- common
- auth
- app
- ens
mvc:
view:
prefix: /WEB-INF/jsp/
suffix: .jsp
batch:
jdbc:
initialize-schema: NEVER #NEVER|ALWAYS
# JPA does not support custom isolation levels, so locks may not be taken when launching Jobs.
# To silence this warning, set 'spring.batch.jdbc.isolation-level-for-create' to 'default'.
isolation-level-for-create: default
job:
enabled: false
#-----------------------------------------------------------------
# xit framework 설정
#-----------------------------------------------------------------
datasource:
#type: com.zaxxer.hikari.HikariDataSource
hikari:
# 9 server
primary:
read-only: false
pool-name: xit-maria-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
validation-timeout: 300000
@ -69,27 +76,17 @@ spring:
data-source-properties:
rewriteBatchedStatements: true
batch:
jdbc:
initialize-schema: NEVER #NEVER|ALWAYS
# JPA does not support custom isolation levels, so locks may not be taken when launching Jobs.
# To silence this warning, set 'spring.batch.jdbc.isolation-level-for-create' to 'default'.
isolation-level-for-create: default
job:
enabled: false
#-----------------------------------------------------------------
# xit framework 설정
#-----------------------------------------------------------------
secondary:
pool-name: xit-oracle-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
# transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
logging:
file:
# 로그파일 위치
path: ${app.data.root.path}/mens/logs
name: ${app.name}
level:
root: error
'[org.apache.tomcat.util.net]': warn
'[sun.rmi]': warn
'[javax.management]': warn
'[java.io.serialization]': warn

@ -17,9 +17,9 @@
site_code, /* 공개키 사이트 코드 */
key_version, /* 공개키 버전 */
public_key, /* 공개키 */
date_format(DATE_ADD(valid_dtim, INTERVAL -1 HOUR), '%Y%m%d%H%i%S') AS validDtim, /* 공개키 만료일시 */
DATE_ADD(valid_dtim, INTERVAL -1 HOUR) AS validDtim, /* 공개키 만료일시 */
cur_symkey_version, /* 현재 대칭키 버전 */
date_format(DATE_ADD(cur_symkey_valid_dtim, INTERVAL -1 HOUR), '%Y%m%d%H%i%S') AS curSymkeyValidDtim, /* 현재 대칭키 만료일시 */
DATE_ADD(cur_symkey_valid_dtim, INTERVAL -1 HOUR) AS curSymkeyValidDtim, /* 현재 대칭키 만료일시 */
cur_symkey_key, /* 현재 대칭키 - key */
cur_symkey_iv, /* 현재 대칭키 - iv */
cur_symkey_hmac_key, /* 현재 대칭키 - hmac_key */
@ -43,9 +43,6 @@
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 */
IF(#{profile} = 'prod', kakao_prod_settle_id, kakao_dev_settle_id) AS kakaoSettleId, /* 카카오 settle id */
kt_client_id, /* KT client id */
kt_client_tp, /* KT client tp */
kt_scope, /* KT scope */
@ -57,7 +54,7 @@
IF(#{profile} = 'prod', kt_prod_token_jti, kt_dev_token_jti) AS ktTokenJti, /* KT 토큰 식별자 */
CASE WHEN IFNULL(IF(#{profile} = 'prod', kt_prod_token_expires_in, kt_dev_token_expires_in), '') = ''
THEN NULL
ELSE DATE_ADD(updt_dt, INTERVAL IF(#{profile} = 'prod', kt_prod_token_expires_in, kt_dev_token_expires_in) - 86400 SECOND)
ELSE DATE_ADD(NOW(), 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 */

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.cmm.mapper.ICmmEnsCacheMapper">
<select id="selectNiceCiInfo" resultType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** ens-cmm-cache-oracle-mapper|selectNiceCiInfo-Nice인증정보조회|julim */
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(valid_dtim, 'YYYYMMDDHH24MISS') - INTERVAL '1' HOUR, 'YYYYMMDDHH24MISS') AS validDtim, /* 공개키 만료일시 */
cur_symkey_version, /* 현재 대칭키 버전 */
TO_CHAR(TO_DATE(cur_symkey_valid_dtim, '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>
<select id="selectEnsRlaybsnmInfo" resultType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-cmm-cache-oracle-mapper|selectEnsRlaybsnmInfo-중계사업관리자정보조회|julim */
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 */
CASE WHEN #{profile} = 'prod' THEN kt_prod_service_cerf_key ELSE kt_dev_service_cerf_key END AS ktSvcCerfKey, /* KT client service cerf key */
CASE WHEN #{profile} = 'prod' THEN kt_prod_access_token ELSE kt_dev_access_token END AS ktAccessToken, /* KT access token */
CASE WHEN #{profile} = 'prod' THEN kt_prod_token_jti ELSE kt_dev_token_jti END AS ktTokenJti, /* KT 토큰 식별자 */
CASE WHEN NVL(CASE WHEN #{profile} = 'prod' THEN kt_prod_token_expires_in ELSE kt_dev_token_expires_in END, '') = ''
THEN NULL
ELSE updt_dt + (CASE WHEN #{profile} = 'prod' THEN kt_prod_token_expires_in ELSE kt_dev_token_expires_in END - 86400) / 86400
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
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</select>
</mapper>

@ -1,91 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.kt.mapper.IBizKtBcMapper">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.kt.mapper.IBizKtMmsMapper">
<update id="updateRlaybsnmKtInfo" parameterType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-kt-mysql-mapper|updateRlaybsnmKtInfo-kt token 정보 갱신|julim */
UPDATE tb_ens_rlaybsnm_manage
SET kt_scope = #{ktScope},
<choose>
<when test="profile eq 'prod'">
<update id="updateRlaybsnmKtInfo" parameterType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-kt-mysql-mapper|updateRlaybsnmKtInfo-kt token 정보 갱신|julim */
UPDATE tb_ens_rlaybsnm_manage
SET kt_scope = #{ktScope},
<choose>
<when test="profile eq 'prod'">
kt_prod_access_token = #{ktAccessToken},
kt_prod_token_expires_in = #{ktTokenExpiresIn},
kt_prod_token_jti = #{ktTokenJti},
</when>
<otherwise>
</when>
<otherwise>
kt_dev_access_token = #{ktAccessToken},
kt_dev_token_expires_in = #{ktTokenExpiresIn},
kt_dev_token_jti = #{ktTokenJti},
</otherwise>
</choose>
updt_dt = now(),
updusr = 'api-biz'
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
</otherwise>
</choose>
updt_dt = now(),
updusr = 'api-biz'
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<update id="updateKtBcDtl" parameterType="kr.xit.biz.ens.model.kt.KtMmsSendDTO$KtMsgRsltReqData">
/** ens-kt-mysql-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 = IFNULL(#{mmsSndgTmst}, mms_sndg_tmst) /* 발송 타임 스탬프 */
, mms_rcv_tmst = IFNULL(#{mmsRcvTmst}, mms_rcv_tmst) /* 수신 타임 스탬프 */
, mms_rdg_tmst = IFNULL(#{mmsRdgTmst}, mms_rdg_tmst) /* 열람 타임 스탬프 */
, updt_dt = NOW()
, updusr = 'api_inbound'
WHERE unity_sndng_detail_id = #{srcKey}
</update>
<update id="updateKtBcDtl" parameterType="kr.xit.biz.ens.model.kt.KtMmsSendDTO$KtMsgRsltReqData">
/** ens-kt-mysql-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 = IFNULL(#{mmsSndgTmst}, mms_sndg_tmst) /* 발송 타임 스탬프 */
, mms_rcv_tmst = IFNULL(#{mmsRcvTmst}, mms_rcv_tmst) /* 수신 타임 스탬프 */
, mms_rdg_tmst = IFNULL(#{mmsRdgTmst}, mms_rdg_tmst) /* 열람 타임 스탬프 */
, updt_dt = NOW()
, updusr = 'api_inbound'
WHERE unity_sndng_detail_id = #{srcKey}
</update>
<insert id="saveKtBcCntcSndngResult">
/** ens-kt-mysql-mapper|saveKtBcCntcSndngResult-연계발송결과반영|julim */
<selectKey keyProperty="signguCode,ffnlgCode,sndngSeCode" resultType="hashmap" order="BEFORE">
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}
</selectKey>
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} /* 에러내용 */
, now()
, 'batch'
)
ON DUPLICATE KEY UPDATE
sndng_result_sttus = IFNULL(#{mmsSndgRsltDvcd}, sndng_result_sttus)
, requst_dt = IFNULL(#{mmsSndgTmst}, requst_dt) /* 송신(요청) 일시 */
, inqire_dt = IFNULL(#{mmsRcvTmst}, inqire_dt) /* 수신(조회) 일시 */
, readng_dt = IFNULL(#{mmsRdgTmst}, readng_dt) /* 최초열람일시 */
, error_cn = IFNULL(#{mmsSndgRsltDvcdMsg}, error_cn)
, updt_dt = now()
, updusr = 'batch'
</insert>
<insert id="saveKtCntcSndngResult">
/** ens-mysql-mapper|saveCntcSndngResult-연계발송결과반영|julim */
<selectKey keyProperty="signguCode,ffnlgCode,sndngSeCode" resultType="hashmap" order="BEFORE">
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}
</selectKey>
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} /* 에러내용 */
, now()
, 'batch'
)
ON DUPLICATE KEY UPDATE
sndng_result_sttus = IFNULL(#{mmsSndgRsltDvcd}, sndng_result_sttus)
, requst_dt = IFNULL(#{mmsSndgTmst}, requst_dt) /* 송신(요청) 일시 */
, inqire_dt = IFNULL(#{mmsRcvTmst}, inqire_dt) /* 수신(조회) 일시 */
, readng_dt = IFNULL(#{mmsRdgTmst}, readng_dt) /* 최초열람일시 */
, error_cn = IFNULL(#{mmsSndgRsltDvcdMsg}, error_cn)
, updt_dt = now()
, updusr = 'batch'
</insert>
</mapper>

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.ktgbs.mapper.IBizKtGbsMapper">
<update id="updateRlaybsnmKtBcInfo" parameterType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-kt-oracle-mapper|updateRlaybsnmKtBcInfo-kt BC token 정보 갱신|julim */
UPDATE tb_ens_rlaybsnm_manage
SET kt_scope = #{ktScope},
<choose>
<when test="profile eq 'prod'">
kt_prod_access_token = #{ktAccessToken},
kt_prod_token_expires_in = #{ktTokenExpiresIn},
kt_prod_token_jti = #{ktTokenJti},
</when>
<otherwise>
kt_dev_access_token = #{ktAccessToken},
kt_dev_token_expires_in = #{ktTokenExpiresIn},
kt_dev_token_jti = #{ktTokenJti},
</otherwise>
</choose>
updt_dt = sysdate,
updusr = 'api-biz'
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<update id="updateRlaybsnmKtGbsInfo" parameterType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-kt-oracle-mapper|updateRlaybsnmKtGbsInfo-kt GIBIS token 정보 갱신|julim */
UPDATE tb_ens_rlaybsnm_manage
SET
<choose>
<when test="profile eq 'prod'">
kt_prod_access_token = #{ktAccessToken},
</when>
<otherwise>
kt_dev_access_token = #{ktAccessToken},
</otherwise>
</choose>
updt_dt = sysdate,
updusr = 'api-biz'
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<update id="updateKtGbsDtl" parameterType="kr.xit.biz.ens.model.ktgbs.KtGbsDTO$MsgRsltReqsData">
/** ens-kt-oracle-mapper|updateKtGbsDtl-kt GIBIS 메세지 수신결과 상세 반영|julim */
UPDATE tb_ens_kt_gbs
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_rslt_dvcd = #{mmsRsltDvcd} /* 발송결과코드 */
, 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 src_key = #{srcKey}
</update>
<insert id="saveKtGbsCntcSndngResult" parameterType="kr.xit.biz.ens.model.ktgbs.KtGbsDTO$MsgRsltReqsData">
/** ens-kt-oracle-mapper|saveKtGbsCntcSndngResult-KT GIBIS 연계발송결과반영|julim */
MERGE INTO tb_elctrn_ntic_sndng_result tensr
USING (SELECT unity_sndng_detail_id FROM tb_ens_kt_gbs WHERE src_key = #{srcKey}) tekg
ON (tensr.elctrn_ntic_sndng_detail_id = tekg.unity_sndng_detail_id)
WHEN MATCHED THEN
UPDATE
SET sndng_result_sttus = NVL(#{mmsRsltDvcd}, sndng_result_sttus)
, requst_dt = NVL(#{mmsSndgTmst}, requst_dt) /* 송신(요청) 일시 */
, inqire_dt = NVL(#{mmsRcvTmst}, inqire_dt) /* 수신(조회) 일시 */
, readng_dt = NVL(#{mmsRdgTmst}, readng_dt) /* 최초열람일시 */
, last_updt_dt = sysdate
WHEN NOT MATCHED THEN
INSERT (
elctrn_ntic_sndng_detail_id, /* 통합 발송 상세 ID*/
sndng_se, /* 발송구분코드 - KAKAO-NEW|KT-GBS */
sndng_result_sttus, /* 발송결과상태 */
requst_dt, /* 송신(요청) 일시 */
inqire_dt, /* 수신(조회) 일시 */
readng_dt, /* 최초열람일시 */
error_cn, /* 에러내용 */
regist_dt,
register
) VALUES (
(SELECT tekg.unity_sndng_detail_id FROM tb_ens_kt_gbs tekg WHERE tekg.src_key = #{srcKey})
, 'ktGibis'
, #{mmsRsltDvcd} /* 발송결과상태 */
, #{mmsSndgTmst} /* 송신(요청) 일시 */
, #{mmsRcvTmst} /* 수신(조회) 일시 */
, #{mmsRdgTmst} /* 최초열람일시 */
, '' /* 에러내용 */
, sysdate
, 'api_inbound'
)
</insert>
</mapper>

@ -3,8 +3,8 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.mbl.mapper.IMobilePageMapper">
<select id="selectKkopayMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKkopayMobilePage-카카오페이 모바일 페이지 콘텐트 조회|julim */
<select id="selectKkoMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKkoMobilePage-카카오 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
@ -13,32 +13,19 @@
FROM tb_ens_kakao_my_doc tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.external_document_uuid = #{external_document_uuid}
WHERE tekmd.unity_sndng_detail_id = #{external_document_uuid}
AND tekmd.document_binder_uuid = #{document_binder_uuid}
</select>
<select id="selectKkotalkMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKkotalkMobilePage-카카오톡 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = #{envelopeId}
AND tekmd.external_id = #{externalId}
</select>
<select id="selectKtMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKtMobilePage-KT 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
FROM tb_ens_kt_bc_detail tekbd
JOIN tb_ens_mobile_page_manage tempm
ON tekbd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekbd.unity_sndng_detail_id = #{srcKey}
</select>
<select id="selectKtBcMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKtBcMobilePage-KT BC 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
FROM tb_ens_kt_bc_detail tekbd
JOIN tb_ens_mobile_page_manage tempm
ON tekbd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekbd.src_key = #{srcKey}
</select>
</mapper>

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.mbl.mapper.IMobilePageMapper">
<select id="selectKkopayMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-oracle-mapper|selectKkopayMobilePage-카카오페이 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_my_doc tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.external_document_uuid = #{external_document_uuid}
AND tekmd.document_binder_uuid = #{document_binder_uuid}
</select>
<select id="selectKkotalkMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-oracle-mapper|selectKkotalkMobilePage-카카오톡 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = #{envelopeId}
AND tekmd.external_id = #{externalId}
</select>
<select id="selectKtBcMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-oracle-mapper|selectKtBcMobilePage-KT BC 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
FROM tb_ens_kt_bc_detail tekbd
JOIN tb_ens_mobile_page_manage tempm
ON tekbd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekbd.src_key = #{srcKey}
</select>
<select id="selectKtGbsMobilePage" resultType="kr.xit.biz.mbl.model.MobilePageDTO$MobilePageManage">
/** ens-mbl-mysql-mapper|selectKtGbsMobilePage-KT GIBIS 모바일 페이지 콘텐트 조회|julim */
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
FROM tb_ens_kt_gbs tekg
JOIN tb_ens_mobile_page_manage tempm
ON tekg.sndng_detail_id = tempm.sndng_detail_id
WHERE tekg.src_key = #{srcKey}
</select>
</mapper>

@ -4,7 +4,7 @@
<mapper namespace="kr.xit.biz.nice.mapper.IBizNiceCiMapper">
<update id="updateNiceCrtfToken" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** ens-nice-mysql-mapper|updateNiceCrtfToken-Nice token 정보 갱신|julim */
/** ens-cmm-mysql-mapper|updateNiceCrtfToken-Nice token 정보 갱신|julim */
UPDATE tb_cmm_nice_instn_crtf_info
SET access_token = #{accessToken},
token_type = #{tokenType},
@ -17,7 +17,7 @@
</update>
<update id="updateNiceCrtfPublickey" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** ens-nice-mysql-mapper|updateNiceCrtfPublickey-Nice publickey 인증정보 갱신|julim */
/** ens-cmm-mysql-mapper|updateNiceCrtfPublickey-Nice publickey 인증정보 갱신|julim */
UPDATE tb_cmm_nice_instn_crtf_info
SET site_code = #{siteCode},
key_version = #{keyVersion},
@ -30,7 +30,7 @@
</update>
<update id="updateNiceCrtfSymkey" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** ens-nice-mysql-mapper|updateNiceCrtfSymkey-Nice symkey 인증정보 갱신|julim */
/** ens-cmm-mysql-mapper|updateNiceCrtfSymkey-Nice symkey 인증정보 갱신|julim */
UPDATE tb_cmm_nice_instn_crtf_info
SET cur_symkey_version = #{curSymkeyVersion},
cur_symkey_valid_dtim = #{curSymkeyValidDtim},

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.nice.mapper.IBizNiceCiMapper">
<update id="updateNiceCrtfToken" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** 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}
</update>
<update id="updateNiceCrtfPublickey" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** 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}
</update>
<update id="updateNiceCrtfSymkey" parameterType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** 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}
</update>
</mapper>

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.ens.pplus.mapper.IPplusMapper">
<select id="selectPostPlusSendTgts" resultType="kr.xit.biz.ens.model.pplus.PplusDTO$BatchAcceptRequest">
/** ens-pplus-mapper|selectPostPlusSendTgts-Post Plus 발송 대상 목록 조회|julim */
SELECT tesm.unity_sndng_mastr_id
, tesm.sndng_mastr_id
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
ELSE concat('sending', try_seq)
END AS sndngProcessSttus
, tepp.sndng_detail_id
, tepp.unity_sndng_detail_id
, tepp.signgu_code
, tepp.ffnlg_code
, tepp.service_cd
, tepp.con_key
, teppj.master_cols
, teppj.master_rows
, teppj.detail_cols
, teppj.detail_rows
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_post_plus tepp
ON tesm.sndng_mastr_id=tepp.sndng_mastr_id
AND tesm.signgu_code = tepp.signgu_code
AND tesm.ffnlg_code = tepp.ffnlg_code
JOIN tb_ens_post_plus_json teppj
ON tepp.unity_sndng_detail_id = teppj.unity_sndng_detail_id
AND tepp.con_key = teppj.con_key
AND tepp.sn = teppj.sn
WHERE tepp.sndng_mastr_id = #{sndngMastrId}
AND tesm.signgu_code = #{signguCode}
AND tesm.ffnlg_code = #{ffnlgCode}
ORDER BY teppj.sn
</select>
</mapper>

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.sisul.mapper.IBizSisulMapper">
<select id="selectDeptInfoByTmplId" resultType="kr.xit.biz.ens.model.cmm.TmplatManage">
/** ens-sysul-mysql-mapper|selectDeptInfoByTmplId-템플릿ID로 부서정보 조회|seojh */
SELECT tetm.signgu_code
, tetm.ffnlg_code
, tetm.try1
, tetm.post_dlvr_se
, tetm.post_tmplat_code
FROM tb_ens_tmplat_manage tetm
WHERE tmplat_id = #{tmplatId}
</select>
<insert id="insertCntcSndngMst">
/** ens-sysul-mysql-mapper|insertCntcSndngMst-연계발송마스터 생성|seojh */
INSERT
INTO tb_cntc_sndng_mastr (
unity_sndng_mastr_id, /* 통합발송마스터 id */
signgu_code, /* 시군구코드 */
ffnlg_code, /* 과태료코드 */
tmplat_id, /* 템플릿ID */
sndng_ty_code, /* 발송유형 코드 */
sndng_co, /* 발송 건수 */
sndng_process_sttus, /* 발송처리 상태 */
sndng_dt, /* 발송일시 */
clos_dt, /* 마감일시 */
regist_dt,
register
)
SELECT #{unitySndngMastrId}
, tetm.signgu_code
, tetm.ffnlg_code
, tetm.tmplat_id
, tetm.sndng_ty_code
, #{sndngCo}
, #{sndngProcessSttus}
, #{sndngDt}
, #{closDt}
, now()
, #{register}
FROM tb_ens_tmplat_manage tetm
WHERE tmplat_id = #{tmplatId}
</insert>
<insert id="insertCntcSndngDtl">
/** ens-sysul-mysql-mapper|insertCntcSndngDtl-연계발송상세 생성|seojh */
INSERT
INTO tb_cntc_sndng_detail (
unity_sndng_detail_id, /* 통합발송 상세ID */
unity_sndng_mastr_id, /* 통합발송 마스터ID */
signgu_code, /* 시군구 코드 */
ffnlg_code, /* 과태료 코드 */
main_code, /* 메인 코드 - 자료 식별 코드 */
tmplt_msg_data, /* 템플릿 메시지 데이터 - 가변 항목 자료 */
mobile_page_cn, /* 모바일 페이지 내용 */
use_instt_idntfc_id, /* 이용 기관 식별 ID - 교통시설 운영처 제목 가변 */
regist_dt,
register
)
SELECT #{unitySndngDetailId}
, #{unitySndngMastrId}
, tetm.signgu_code
, tetm.ffnlg_code
, #{mainCode}
, #{tmpltMsgData}
, #{mobilePageCn}
, #{useInsttIdntfcId}
, now()
, #{register}
FROM tb_ens_tmplat_manage tetm
WHERE tmplat_id = #{tmplatId}
</insert>
<insert id="insertCi">
/** ens-sysul-mysql-mapper|insertCi-CI자료 생성|seojh */
INSERT
INTO tb_ens_ci (
unity_sndng_detail_id,
ci,
result_cd,
message,
regist_dt,
register
) VALUES (
#{unitySndngDetailId}
, NVL(#{ci1}, #{ci2})
, #{resultCd}
, #{message}
, now()
, #{register}
)
</insert>
<insert id="insertPostPlusJson">
/** ens-sysul-mysql-mapper|insertPostPlusJson-포스트 플러스 json 생성|seojh */
INSERT
INTO tb_ens_post_plus_json(
unity_sndng_detail_id,
service_cd,
con_key,
sn,
master_cols,
master_rows,
detail_cols,
detail_rows,
regist_dt,
register
) VALUES (
#{unitySndngDetailId}
, #{serviceCd}
, #{conKey}
, #{sn}
, #{masterCols}
, #{masterRows}
, #{detailCols}
, #{detailRows}
, now()
, #{register}
)
</insert>
<select id="selectSndngResultMaster" resultType="kr.xit.biz.sisul.model.SisulSndngResultDTO$RsltSisulResMstData">
/** ens-sysul-mysql-mapper|selectSndngResultMaster-발송결과정보 마스터 조회|julim */
SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */
, tesn.sndng_se_code /* 발송구분코드 */
, tesn.tmplat_id /* 템플릿 ID */
, tesn.sndng_dt /* 발송일시 */
, tesn.sndng_co /* 발송건수 */
, tesn.sndng_process_sttus /* 발송처리 상태 */
FROM tb_ens_sndng_mastr tesn
WHERE tesn.unity_sndng_mastr_id = #{unitySndngMastrId}
</select>
<select id="selectSndngResultDetails" resultType="kr.xit.biz.sisul.model.SisulSndngResultDTO$RsltSisulResDtlData">
/** ens-sysul-mysql-mapper|selectSndngResultDetails-발송결과정보 상세 조회|julim */
SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */
, tcsnd.unity_sndng_detail_id /* 통합발송상세 ID - 우편물 일련번호 */
, tesn.sndng_se_code /* 발송구분코드 */
, tesn.tmplat_id /* 템플릿 ID */
, tcsr.requst_dt /* 발송일시 - sndngDt */
, tcsr.inqire_dt /* 수신일시 - recvDt */
, tcsr.readng_dt /* 열람일시 - readDt */
, tcsr.rgist_no /* 등기번호 */
, tcsr.sndng_result_sttus /* 발송결과상태 - resultCode */
FROM tb_ens_sndng_mastr tesn
JOIN tb_cntc_sndng_detail tcsnd
ON tesn.unity_sndng_mastr_id = tcsnd.unity_sndng_mastr_id
JOIN tb_cntc_sndng_result tcsr
ON tcsnd.unity_sndng_detail_id = tcsr.unity_sndng_detail_id
WHERE tesn.unity_sndng_mastr_id = #{unitySndngMastrId}
<if test="unitySndngDetailId != null and unitySndngDetailId != ''">
AND tcsr.unity_sndng_detail_id = #{unitySndngDetailId}
</if>
</select>
</mapper>

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.core.biz.mapper.IApiLoggingMapper">
<insert id="saveApiLogging" parameterType="kr.xit.core.biz.model.LoggingDTO">
/** logging-oracle-mapper|saveApiLogging|julim */
INSERT INTO tb_cmm_api_log (
request_id
, system_id
, req_system_id
, method
, uri
, param
, ip
, access_token
, session_id
, success
, response
, message
, regist_dt
, regist_id
) VALUES (
#{requestId}
, #{systemId}
, #{reqSystemId}
, #{method}
, #{uri}
, #{param}
, #{ip}
, #{accessToken}
, #{sessionId}
, #{success}
, #{response}
, #{message}
, sysdate
, #{registId}
)
</insert>
<update id="updateApiLogging" parameterType="kr.xit.core.biz.model.LoggingDTO">
/** logging-oracle-mapper|updateLogging|julim */
UPDATE tb_cmm_api_log
SET success = #{success}
, response = #{response}
, message = #{message}
, updt_dt = sysdate
, updt_id = #{updtId}
WHERE request_id = #{requestId}
</update>
<select id="selectApiLogging" resultType="kr.xit.core.biz.model.LoggingDTO">
/** logging-oracle-mapper|selectApiLogging|julim */
SELECT request_id
, system_id
, req_system_id
, method
, uri
, param
, ip
, access_token
, session_id
, regist_dt
, regist_id
FROM tb_cmm_api_log
<where>
<if test='requestId != null and requestId != ""'>
AND request_id = #{requestId}
</if>
<if test='systemId != null and systemId != ""'>
AND system_id = #{systemId}
</if>
<if test='uri != null and uri != ""'>
AND uri LIKE CONCAT('%', #{url}, '%')
</if>
</where>
</select>
</mapper>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.other.mapper.IBizOtherMapper">
<select id="selectElecnoticemst" resultType="kr.xit.biz.other.model.ElecnoticeDTO$Elecnoticemst">
/** ens-other-oracle-mapper|selectElecnoticemst-전자고지 파일 외부연계 마스터 조회|seojh */
SELECT UNITYSNDNGMASTRID
, SNDNGCO
, SNDNGPROCESSSTTUS
, INSUSER
, INSDATE
, UPDUSER
, UPDDATE
FROM ELECNOTICEMST
</select>
</mapper>

@ -14,10 +14,10 @@
-->
<!-- async rolling appender 사용시 로그의 class, method, line number 출력 제어 : 성능저하 이슈 -->
<springProfile name="local, local-ccn, local-can, dev-ccn, dev-can">
<springProfile name="local, dev">
<property name="isIncludeCallerData" value="true"/>
</springProfile>
<springProfile name="prod-ccn, prod-can">
<springProfile name="prod">
<property name="isIncludeCallerData" value="false"/>
</springProfile>
@ -89,6 +89,7 @@
<appender name="mask" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="kr.xit.core.support.logback.LogbackMaskingPatternLayout">
<maskPattern>\"juminId\"\s*:\s*\"(.*?)\"</maskPattern> <!-- SSN JSON pattern -->
<maskPattern>\"recveJuminno\"\s*:\s*\"(.*?)\"</maskPattern> <!-- SSN JSON pattern -->
<maskPattern>\"recevAddr\"\s*:\s*\"(.*?)\"</maskPattern> <!-- Address JSON pattern -->
<maskPattern>\"recevDetailAddr\"\s*:\s*\"(.*?)\"</maskPattern> <!-- Address JSON pattern -->
@ -106,7 +107,7 @@
<!-- log4jdbc 옵션 설정 -->
<logger name="jdbc" level="OFF"/>
<springProfile name="prod-ccn, prod-can">
<springProfile name="prod">
<!-- 운영 환경에서만 sql문 및 결과 출력하지 않음 -->
<!-- SQL문과 소요된 시간 -->
<logger name="jdbc.sqltiming" level="OFF"/>
@ -114,7 +115,7 @@
<logger name="jdbc.resultsettable" level="OFF"/>
</springProfile>
<springProfile name="local, local-ccn, local-can, dev-ccn, dev-can">
<springProfile name="local, dev">
<!-- 로컬, 개발 환경에서는 sql문 및 결과 출력 -->
<!-- SQL문과 소요된 시간 -->
<logger name="jdbc.sqltiming" level="DEBUG" />
@ -157,7 +158,7 @@
<!-- ************************************************************************* -->
<!-- application log : root appender로 로그 전파 - additivity="true" -->
<!-- ************************************************************************* -->
<!-- <logger name="org.springframework.web.filter.MustRequestLoggingFilter" level="DEBUG" additivity="false"/>-->
<!-- <logger name="org.springframework.web.filter.MustRequestLoggingFilter" level="DEBUG" additivity="false"/>-->
<!--logger name="kr.xit.core.filter.CustomRequestLoggingFilter" level="DEBUG"/-->
<logger name="kr.xit" level="DEBUG"/>
<!-- ************************************************************************* -->
@ -169,11 +170,11 @@
<!-- root logging -->
<!-- ************************************************************************* -->
<root level="DEBUG">
<springProfile name="prod-ccn, prod-can">
<springProfile name="prod">
<appender-ref ref="ASYNC_ROLLING"/>
</springProfile>
<springProfile name="local, local-ccn, local-can, dev-ccn, dev-can">
<springProfile name="local, dev">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC_ROLLING"/>
</springProfile>

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>
</head>
<body>
<p>Error</p>
</body>
</html>

@ -1,14 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error</title>
</head>
<body>
<h1>Something went wrong</h1>
<p>We're sorry, but something went wrong. Please try again later.</p>
</body>
</html>

@ -1,716 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="${ctx }/resource/css/style.css"/>
<%-- <script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>--%>
<%-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css"/>--%>
<%-- <style>--%>
<%-- .bx-wrapper ul.img-slider > li > a > img {--%>
<%-- min-height: 30rem;--%>
<%-- max-height: 45rem;--%>
<%-- margin: auto;--%>
<%-- }--%>
<%-- .bx-wrapper ul.img-slider > li {--%>
<%-- font-size: 1.5rem;--%>
<%-- }--%>
<%-- </style>--%>
<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"/>
<style>
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide img {
display: block;
/*width: 100%;*/
/*height: 100%;*/
min-height: 30rem;
max-height: 45rem;
object-fit: cover;
}
.swiper-pagination-bullet {
width: 2.5rem;
height: 2.5rem;
text-align: center;
line-height: 2.3rem;
font-size: 1.7rem;
color: #000;
opacity: 1;
background: rgba(0, 0, 0, 0.2);
}
.swiper-pagination-bullet-active {
color: #fff;
background: #007aff;
}
</style>
<title>고지 출력</title>
</head>
<body>
<div id="contents"></div>
</body>
<script>
window.onload = () => {
notRefresh();
let errCd = '${errCode}';
let errMsg = '${errMsg}';
let isEmpty = (val) => {
if (val == null || val == undefined || val == '' || val == 'OK')
return true;
return false;
}
if (!isEmpty(errCd)) {
alert('[' + errCd + ']' + errMsg);
return false;
}
draw('contents');
// $('.img-slider').bxSlider({
// auto: false, // 자동으로 애니메이션 시작
// speed: 500, // 애니메이션 속도
// pause: 3000, // 애니메이션 유지 시간 (1000은 1초)
// mode: 'horizontal', // 슬라이드 모드 ('fade', 'horizontal', 'vertical' 이 있음)
// autoControls: true, // 시작 및 중지버튼 보여짐
// pager: true, // 페이지 표시 보여짐
// captions: true, // 이미지 위에 텍스트를 넣을 수 있음
// });
var swiper = new Swiper(".img-slider", {
// slidesPerView: 3, //한페이지에 보여줄 이미지 갯수
// spaceBetween: 30, //이미지간 간격
// slidesPerGroup: 3, //페이지 그룹
loop: true, //무한 루프
zoom: true, //이미지 확대 여부(true:사용, false:미사용). 클래스 적용 필수 -> class="swiper-zoom-container"
coverflowEffect: {
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: true,
},
pagination: {
el: ".swiper-pagination",
// type: "progressbar", //프로그래스바 타입 페이징
clickable: true, //클릭가능 설정여부
renderBullet: function (index, className) {
return '<span class="' + className + '">' + (index + 1) + "</span>";
},
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
alinkNewWindow();
}
/* ===============
* a 태그
=============== */
var alinkNewWindow = () => {
//link 연결 시 새창으로 열기
document.querySelectorAll('a').forEach((elm, idx) => elm.target = '_new' + idx);
}
/* ===============
* refresh 방지
=============== */
var notRefresh = () => {
//모바일에서 스크롤을 끝까지 당겨 refresh 방지
document.body.style.overscrollBehaviorY = 'none';
//Url 에서 queryString 을 제거하여 재호출 방지
history.pushState(null, null, location.origin + location.pathname);
}
/* ===============
* 클립보드 복사
=============== */
var clipboardCopy = txt => {
const textarea = document.createElement('textarea');
document.body.appendChild(textarea);
textarea.value = txt;
textarea.select();
document.execCommand("copy");
textarea.remove();
alert('클립보드로 복사 되었습니다.');
}
/* ===============
* a 태그로 치환
=============== */
const accountPttrn = /\d{2,6}\-\d{2,9}(\-\d{2,9}\-\d{2,9}|\-\d{2,9})\s?\(?(KB|국민은행|국민|IBK|기업은행|기업|NH|농협은행|농협|WOORI|우리은행|우리|KEB|하나은행|하나|SHINHAN|신한은행|신한|CITY|씨티은행|씨티|DGB|대구은행|대구|BNK|부산은행|부산|SC|제일은행|제일|케이뱅크|카카오뱅크|카카오)?\)?/g;
var pttrnAtagReplace = (txt, pttrn) => {
let matches = txt.match(pttrn);
if (matches == null) return txt;
matches.forEach((str) => txt = txt.replace(str, '<a href="#" onclick="clipboardCopy(\'' + str.replace(/\n/g, '') + '\'); return false;">' + str + '</a>'));
return txt;
}
/* ===============
* 강조문구 스타일 적용
=============== */
var highlightText = (txt, props) => {
if (isEmpty(props.style)) return txt;
if (isEmpty(props.style.highlight)) return txt;
for (let str in props.style.highlight) {
let style = props.style.highlight[str];
let span = document.createElement("span");
span.innerText = str;
if (!isEmpty(style['font-size'])) span.style.fontSize = style['font-size'];
if (!isEmpty(style['font-color'])) span.style.color = style['font-color'];
if (!isEmpty(style['font-weight'])) span.style.fontWeight = style['font-weight'];
if (!isEmpty(style['font-style'])) span.style.fontStyle = style['font-style'];
if (style['use-clipboard']) {
span.classList.add('clipboard');
span.style.cursor = 'pointer';
span.style.textDecoration = 'underline';
}
//정규식 기호로 인식되지 않도록 replace 처리
str = str.replace(/\(/g, '\\(').replace(/\)/g, '\\)');
str = str.replace(/\[/g, '\\[').replace(/\]/g, '\\]')
txt = txt.replace(new RegExp(str, 'g'), span.outerHTML);
if (txt.indexOf(str) > -1 && style['use-copybutton']) {
let btn = document.createElement('button');
let btn_text = document.createTextNode('복사');
btn.appendChild(btn_text);
btn.setAttribute('type', 'button');
btn.setAttribute('data-text', str);
btn.classList.add('clipboard');
btn.style.backgroundColor = '#4990e2';
btn.style.color = 'white';
btn.style.border = 'none';
btn.style.marginLeft = '5px';
txt = txt+btn.outerHTML;
}
}
return txt;
}
/* ===============
* XSS Filter 적용
=============== */
var escapeXml = (txt) => {
if (isEmpty(txt)) return txt;
return txt.replace(/[<>&'"]/g, function (c) {
switch (c) {
case '<':
return '&lt;';
case '>':
return '&gt;';
case '&':
return '&amp;';
case '\'':
return '&apos;';
case '"':
return '&quot;';
}
});
}
/* ===============
* 하이퍼링크 적용
=============== */
var hyperlink = (txt, props) => {
if (isEmpty(props.hyperlink)) return txt;
props.hyperlink.forEach(url => {
let a = document.createElement('a');
a.href = url;
a.text = url;
txt = txt.replace(new RegExp(url, 'g'), a.outerHTML);
});
return txt;
}
/* ===============
* 데이터 출력
=============== */
var draw = (id) => {
const jsonStr = '${details}'.replace(/\n/gi, '\\n').replace(/\r/gi, '\\r');
var Dataset = JSON.parse(jsonStr);
Dataset.details.forEach((row) => {
switch (row.item_type) {
case "TEXT":
document.getElementById(id).innerHTML += text(row);
break;
case "PRE_TEXT":
document.getElementById(id).innerHTML += pretext(row);
break;
case "KEY_VALUE":
document.getElementById(id).innerHTML += keyvalue(row);
break;
case "TABLE":
document.getElementById(id).innerHTML += table(row);
break;
case "IMAGE":
document.getElementById(id).innerHTML += image(row);
break;
case "GRAPH":
document.getElementById(id).innerHTML += graph(row);
break;
case "BUTTON":
document.getElementById(id).innerHTML += button(row);
break;
case "PAY_BUTTON":
document.getElementById(id).innerHTML += paybutton(row);
break;
}
});
document.querySelectorAll('span.clipboard').forEach((ele) => {
ele.addEventListener('click', function () {
clipboardCopy(this.innerText);
});
});
document.querySelectorAll('button.clipboard').forEach((ele) => {
ele.addEventListener('click', function () {
clipboardCopy(this.dataset.text);
});
});
}
/* ===============
* "Text" Type
=============== */
var text = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//"title" Set
var subject = props.use_toggle ? document.createElement('summary') : document.createElement('h2');
subject.innerHTML = nvl(item.title, '');
//"text" Set
var text = document.createElement('ul');
item.elements.forEach((row) => {
var span = document.createElement('li');
// span.innerHTML = row;
// span.innerHTML = pttrnAtagReplace(row, accountPttrn);
// span.innerHTML = pttrnAtagReplace(highlightText(escapeXml(row), props), accountPttrn);
span.innerHTML = highlightText(escapeXml(row), props);
span.innerHTML = hyperlink(span.innerHTML, props);
text.innerHTML += span.outerHTML;
});
//<section> Set
var section = document.createElement('section');
section.className = 'text'; //섹션 클래스명
section.innerHTML += isEmpty(subject.innerHTML) ? '' : subject.outerHTML;
section.innerHTML += text.outerHTML;
//<details> Set
if (props.use_toggle) {
let details = document.createElement('details');
details.innerHTML += section.innerHTML;
section.innerHTML = details.outerHTML;
}
return section.outerHTML;
}
/* ===============
* "Pre-Text" Type
=============== */
var pretext = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//"title" Set
var subject = props.use_toggle ? document.createElement('summary') : document.createElement('h2');
subject.innerHTML = nvl(item.title, '');
//"text" Set
var text = document.createElement('pre');
// text.innerHTML = item.elements;
// text.innerHTML = pttrnAtagReplace(item.elements, accountPttrn);
// text.innerHTML = pttrnAtagReplace(highlightText(escapeXml(item.elements), props), accountPttrn);
text.innerHTML = highlightText(escapeXml(item.elements), props);
text.innerHTML = hyperlink(text.innerHTML, props);
//<section> Set
var section = document.createElement('section');
section.className = 'pretext'; //섹션 클래스명
section.innerHTML += isEmpty(subject.innerHTML) ? '' : subject.outerHTML;
section.innerHTML += text.outerHTML;
//<details> Set
if (props.use_toggle) {
let details = document.createElement('details');
details.innerHTML += section.innerHTML;
section.innerHTML = details.outerHTML;
}
return section.outerHTML;
}
/* ===============
* "Key-Value" Type
=============== */
var keyvalue = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//"title" Set
var subject = props.use_toggle ? document.createElement('summary') : document.createElement('h2');
subject.innerHTML = nvl(item.title, '');
var table = document.createElement('table');
//<colgroup> Set
table.innerHTML += createColgroup();
//<tbody> Set
table.innerHTML += createBody(item.elements);
//<section> Set
var section = document.createElement('section');
section.className = 'keyvalue'; //섹션 클래스명
section.innerHTML += isEmpty(subject.innerHTML) ? '' : subject.outerHTML;
section.innerHTML += table.outerHTML;
//<details> Set
if (props.use_toggle) {
let details = document.createElement('details');
details.innerHTML += section.innerHTML;
section.innerHTML = details.outerHTML;
}
//Create <colgroup>
function createColgroup() {
let colgroup = document.createElement('colgroup');
let col1 = document.createElement('col');
let col2 = document.createElement('col');
col1.style = 'min-width: 180px;';
col2.style = '';
colgroup.innerHTML += col1.outerHTML;
colgroup.innerHTML += col2.outerHTML;
return colgroup.outerHTML;
}
//Create <tbody>
function createBody(arr) {
var tbody = document.createElement('tbody');
arr.forEach((row) => {
//<td> set - key, value
var key = document.createElement('td');
var value = document.createElement('td');
value.style = 'text-align: left; padding-left: 20px;';
key.innerHTML += row.key;
// value.innerHTML += row.value;
// value.innerHTML += pttrnAtagReplace(row.value, accountPttrn);
// value.innerHTML = pttrnAtagReplace(highlightText(escapeXml(row.value), props), accountPttrn);
value.innerHTML = highlightText(escapeXml(row.value), props);
value.innerHTML = hyperlink(value.innerHTML, props);
//<tr> set
var tr = document.createElement('tr');
tr.innerHTML += key.outerHTML;
tr.innerHTML += value.outerHTML;
//<tbody> append
tbody.innerHTML += tr.outerHTML;
});
return tbody.outerHTML;
}
return section.outerHTML;
}
/* ===============
* "Table" Type
=============== */
var table = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//"title" Set
var subject = props.use_toggle ? document.createElement('summary') : document.createElement('h2');
subject.innerHTML = nvl(item.title, '');
//<table> Set
var table = document.createElement('table');
table.innerHTML += createHead(item.elements.head);
table.innerHTML += createBody(item.elements.rows, props);
//<section> Set
var section = document.createElement('section');
section.className = 'table'; //섹션 클래스명
section.innerHTML += isEmpty(subject.innerHTML) ? '' : subject.outerHTML;
section.innerHTML += table.outerHTML;
//<details> Set
if (props.use_toggle) {
let details = document.createElement('details');
details.innerHTML += section.innerHTML;
section.innerHTML = details.outerHTML;
}
//Create <thead>
function createHead(arr) {
var arrTxt = [];
var thead = document.createElement('thead');
var tr = document.createElement('tr');
arr.forEach((row) => {
var th = document.createElement('th');
th.style = 'text-align: center;';
th.innerHTML += row;
tr.innerHTML += th.outerHTML;
});
thead.innerHTML += tr.outerHTML;
return thead.outerHTML;
}
//Create <tbody>
function createBody(arr, properties) {
//style...
let styTextAlign = isEmpty(properties) || isEmpty(properties.style) || isEmpty(properties.style.text_align) ? [] : properties.style.text_align;
let tbody = document.createElement('tbody');
arr.forEach((row) => {
let tr = document.createElement('tr');
row.forEach((value, idx) => {
let td = document.createElement('td');
td.style = 'text-align: ' + (styTextAlign[idx] == undefined ? 'center' : styTextAlign[idx]) + ';';
// td.innerHTML += value;
// td.innerHTML += pttrnAtagReplace(value, accountPttrn);
// td.innerHTML += pttrnAtagReplace(highlightText(escapeXml(value), props), accountPttrn);
td.innerHTML += highlightText(escapeXml(value), props);
td.innerHTML = hyperlink(td.innerHTML, props);
tr.innerHTML += td.outerHTML;
});
tbody.innerHTML += tr.outerHTML;
});
return tbody.outerHTML;
}
return section.outerHTML;
}
/* ===============
* "IMAGE" Type
=============== */
var image = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//"title" Set
var subject = props.use_toggle ? document.createElement('summary') : document.createElement('h2');
subject.innerHTML = nvl(item.title, '');
//<img> Set
var div = document.createElement('div');
if (item.print_type == 'SLIDE') //print_type이 슬라이드(SLIDE) 이면..
div.innerHTML += createImgSlide(item.elements);
else
div.innerHTML += createImg(item.elements);
//<section> Set
var section = document.createElement('section');
section.className = 'image'; //섹션 클래스명
section.innerHTML += isEmpty(subject.innerHTML) ? '' : subject.outerHTML;
section.innerHTML += div.outerHTML;
//<details> Set
if (props.use_toggle) {
let details = document.createElement('details');
details.innerHTML += section.innerHTML;
section.innerHTML = details.outerHTML;
}
//Create <img> Default
function createImg(arr) {
var arrTxt = [];
arr.forEach((row) => {
var img = document.createElement('img');
img.alt = row.key;
img.src = row.value;
arrTxt.push(img.outerHTML);
});
return arrTxt.join('<br/>');
}
//Create <img> print Slider
// function createImgSlide(arr) {
// var ul = document.createElement('ul');
// ul.className = 'img-slider';
// arr.forEach((row) => {
// var img = document.createElement('img');
// img.title = row.key; //캡션 문구
// img.alt = row.key;
// img.src = row.value;
// var a = document.createElement('a');
// a.innerHTML = img.outerHTML;
// var li = document.createElement('li');
// li.innerHTML = a.outerHTML;
// ul.innerHTML += li.outerHTML;
// });
//
// return ul.outerHTML;
// }
function createImgSlide(arr) {
let ul = document.createElement('ul');
ul.className = 'swiper img-slider';
//이미지 Wrapper
let imgWrapper = document.createElement('div');
imgWrapper.className = 'swiper-wrapper';
arr.forEach((row) => {
let img = document.createElement('img');
img.title = row.key; //캡션 문구
img.alt = row.key;
img.src = row.value;
let zoomContainer = document.createElement('div');
zoomContainer.className = 'swiper-zoom-container';
zoomContainer.innerHTML = img.outerHTML;
let div = document.createElement('div');
div.className = 'swiper-slide';
div.innerHTML = zoomContainer.outerHTML;
imgWrapper.innerHTML += div.outerHTML;
});
ul.innerHTML += imgWrapper.outerHTML;
//페이징
let pageNavBtnNext = document.createElement('div');
let pageNavBtnPrev = document.createElement('div');
let pageProgress = document.createElement('div');
pageNavBtnNext.className = 'swiper-button-next';
pageNavBtnPrev.className = 'swiper-button-prev';
pageProgress.className = 'swiper-pagination';
ul.innerHTML += pageNavBtnNext.outerHTML;
ul.innerHTML += pageNavBtnPrev.outerHTML;
ul.innerHTML += pageProgress.outerHTML;
return ul.outerHTML;
}
return section.outerHTML;
}
/* ===============
* "GRAPH" Type(예정)
=============== */
var graph = (item) => {
}
/* ===============
* "BUTTON" Type
=============== */
var button = (item) => {
//<button> Set
var btn = createButton(item.title, item.link_url);
//<section> Set
var section = document.createElement('section');
section.className = 'button'; //섹션 클래스명
section.innerHTML += btn.outerHTML;
//Create <button> Default
function createButton(title, link_url) {
let a = document.createElement('a');
a.innerText = title;
a.href = link_url;
let div = document.createElement('div');
div.className = 'linkBtn';
div.innerHTML = a.outerHTML;
return div;
}
return section.outerHTML;
}
/* ===============
* "Pay-BUTTON" Type
=============== */
var paybutton = (item) => {
let props = isEmpty(item.properties) ? {} : item.properties;
//<button> Set
var btn = createButton(item.title);
//<section> Set
var section = document.createElement('section');
section.className = 'paybutton'; //섹션 클래스명
section.innerHTML += btn.outerHTML;
//Create <button> Default
function createButton(title) {
let payButtonLinks = JSON.parse('${payButtonLinks}');
let url = '';
if (isEmpty(props.billSe))
for (key in payButtonLinks) {
url = payButtonLinks[key];
break;
}
else
url = payButtonLinks[props.billSe];
let a = document.createElement('a');
a.innerText = title;
a.href = url;
// a.target = '_blank';
let div = document.createElement('div');
div.className = 'linkBtn';
div.innerHTML = a.outerHTML;
return div;
}
return section.outerHTML;
}
var isEmpty = (val) => {
if (val == null || val == undefined || val == '' || val == [] || val == {})
return true;
return false;
}
var nvl = (txt, replaceTxt) => {
if (txt == null || txt == undefined || txt == '')
return replaceTxt;
return txt;
}
</script>
</html>

@ -1,171 +0,0 @@
/*css*/
*{
padding:0;
margin:0;
-webkit-text-size-adjust : none; /* 크롬, 사파리, 오페라 신버전 */
-ms-text-size-adjust : none; /* IE */
-moz-text-size-adjust : none; /* 파이어폭스 */
-o-text-size-adjust : none; /* 오페라 구버전 */
}
li{list-style:none;}
img{border:none;}
/*body {*/
/* overscroll-behavior-y: none;*/
/*}*/
/*웹폰트*/
@font-face {
font-family: 'notokr-bold';
src: url('../font/notoKR-Bold/notokr-bold.eot');
src: url('../font/notokr-bold/notokr-bold.eot?#iefix') format('embedded-opentype'),
url('../font/notoKR-Bold/notokr-bold.woff2') format('woff2'),
url('../font/notoKR-Bold/notokr-bold.woff') format('woff'),
url('../font/notoKR-Bold/notoKR_Bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'notokr-medium';
src: url('../font/notoKR-Medium/notokr-medium.eot');
src: url('../font/notoKR-Medium/notokr-medium.eot?#iefix') format('embedded-opentype'),
url('../font/notoKR-Medium/notokr-medium.woff2') format('woff2'),
url('../font/notoKR-Medium/notokr-medium.woff') format('woff'),
url('../font/notoKR-Medium/notokr-medium.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'notokr-regular';
src: url('../font/notoKR-Regular/notokr-regular.eot');
src: url('../font/notoKR-Regular/notokr-regular.eot?#iefix') format('embedded-opentype'),
url('../font/notoKR-Regular/notokr-regular.woff2') format('woff2'),
url('../font/notoKR-Regular/notokr-regular.woff') format('woff'),
url('../font/notoKR-Regular/notokr-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Nanumsquare_B";
src: url("../font/nanumsquare/NanumSquare_acB.eot?") format("eot"),
url("../font/nanumsquare/NanumSquare_acB.woff") format("woff"),
url("../font/nanumsquare/NanumSquare_acB.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
html{
font-size: 10px;
}
#contents{
border:0px solid red;
width:100%;
height:auto;
padding: 20px 15px 60px 15px;
}
section{
width:90%;
height:auto;
border:0px solid blue;
margin:0 auto;
}
table {
width: 100%;
/* border: 1px solid #444444; */
border-collapse: collapse;
border-top:2px solid #ccc;
}
th, td {
border: 1px solid #ccc;
padding: 10px;
border-width: 1px 0px 1px 0px;
font-family: 'notokr-regular';
/*font-size:15px;*/
font-size:2.5rem;
white-space: pre-wrap;
}
li, pre, details {
font-family: 'notokr-regular';
font-size: 2.8rem;
color: #6c6c6c;
white-space: pre-wrap;
}
.keyvalue tr>td:nth-child(1){
background:#f3f8ff;
color:#50617a;
font-family: 'notokr-bold';
white-space: pre-wrap;
}
.table tr th{
background:#f3f8ff;
color:#50617a;
font-family: 'notokr-bold';
white-space: pre-wrap;
}
h2{
font-family: 'notokr-bold';
/*font-size:18px;*/
font-size: 3.3rem;
padding:10px 0px;
background-image: url("../images/titleDeco.png");
background-repeat: no-repeat;
background-position:2px;
padding-left:15px;
}
img{
max-width:100%;
}
/* ens css
.image{
height: 520px;
padding-bottom: 80px;
}
*/
div.linkBtn{
font-family: 'notokr-regular';
font-size: 2.5rem;
background-color: #4990e2;
padding: 1.5rem 1rem 1.5rem 1rem;
text-align: center;
cursor: pointer;
border-radius: 0.5rem;
margin-top: 10px;
}
div.linkBtn > a{
text-decoration: auto;
color: white;
display: inline-block;
width: 100%;
}
@media (max-width: 768px){
#contents{
height:auto;
border:0px solid yellow;
}
h2{
font-size:2.3rem;
color:#333;
}
th, td {
font-size:1.5rem;
}
li, pre, details {
font-size:1.5rem;
color: #6c6c6c;
}
div.linkBtn{
font-size: 1.5rem;
}
}/*삭제조심*/

@ -1,5 +0,0 @@
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"basic","formats":["ttf","woff","woff2","eotz"],"tt_instructor":"default","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}

@ -1,7 +0,0 @@
(function($){$.fn.easyTabs=function(option){var param=jQuery.extend({fadeSpeed:"fast",defaultContent:1,activeClass:'active'},option);$(this).each(function(){var thisId="#"+this.id;if(param.defaultContent==''){param.defaultContent=1;}
if(typeof param.defaultContent=="number")
{var defaultTab=$(thisId+" .tabs li:eq("+(param.defaultContent-1)+") a").attr('href').substr(1);}else{var defaultTab=param.defaultContent;}
$(thisId+" .tabs li a").each(function(){var tabToHide=$(this).attr('href').substr(1);$("#"+tabToHide).addClass('easytabs-tab-content');});hideAll();changeContent(defaultTab);function hideAll(){$(thisId+" .easytabs-tab-content").hide();}
function changeContent(tabId){hideAll();$(thisId+" .tabs li").removeClass(param.activeClass);$(thisId+" .tabs li a[href=#"+tabId+"]").closest('li').addClass(param.activeClass);if(param.fadeSpeed!="none")
{$(thisId+" #"+tabId).fadeIn(param.fadeSpeed);}else{$(thisId+" #"+tabId).show();}}
$(thisId+" .tabs li").click(function(){var tabId=$(this).find('a').attr('href').substr(1);changeContent(tabId);return false;});});}})(jQuery);

@ -1,129 +0,0 @@
/*Notes about grid:
Columns: 12
Grid Width: 825px
Column Width: 55px
Gutter Width: 15px
-------------------------------*/
.section {margin-bottom: 18px;
}
.section:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
.section {*zoom: 1;}
.section .firstcolumn,
.section .firstcol {margin-left: 0;}
/* Border on left hand side of a column. */
.border {
padding-left: 7px;
margin-left: 7px;
border-left: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
.colborder {
padding-left: 42px;
margin-left: 42px;
border-left: 1px solid #eee;
}
/* The Grid Classes */
.grid1, .grid1_2cols, .grid1_3cols, .grid1_4cols, .grid2, .grid2_3cols, .grid2_4cols, .grid3, .grid3_2cols, .grid3_4cols, .grid4, .grid4_3cols, .grid5, .grid5_2cols, .grid5_3cols, .grid5_4cols, .grid6, .grid6_4cols, .grid7, .grid7_2cols, .grid7_3cols, .grid7_4cols, .grid8, .grid8_3cols, .grid9, .grid9_2cols, .grid9_4cols, .grid10, .grid10_3cols, .grid10_4cols, .grid11, .grid11_2cols, .grid11_3cols, .grid11_4cols, .grid12
{margin-left: 15px;float: left;display: inline; overflow: hidden;}
.width1, .grid1, .span-1 {width: 55px;}
.width1_2cols,.grid1_2cols {width: 20px;}
.width1_3cols,.grid1_3cols {width: 8px;}
.width1_4cols,.grid1_4cols {width: 2px;}
.input_width1 {width: 49px;}
.width2, .grid2, .span-2 {width: 125px;}
.width2_3cols,.grid2_3cols {width: 31px;}
.width2_4cols,.grid2_4cols {width: 20px;}
.input_width2 {width: 119px;}
.width3, .grid3, .span-3 {width: 195px;}
.width3_2cols,.grid3_2cols {width: 90px;}
.width3_4cols,.grid3_4cols {width: 37px;}
.input_width3 {width: 189px;}
.width4, .grid4, .span-4 {width: 265px;}
.width4_3cols,.grid4_3cols {width: 78px;}
.input_width4 {width: 259px;}
.width5, .grid5, .span-5 {width: 335px;}
.width5_2cols,.grid5_2cols {width: 160px;}
.width5_3cols,.grid5_3cols {width: 101px;}
.width5_4cols,.grid5_4cols {width: 72px;}
.input_width5 {width: 329px;}
.width6, .grid6, .span-6 {width: 405px;}
.width6_4cols,.grid6_4cols {width: 90px;}
.input_width6 {width: 399px;}
.width7, .grid7, .span-7 {width: 475px;}
.width7_2cols,.grid7_2cols {width: 230px;}
.width7_3cols,.grid7_3cols {width: 148px;}
.width7_4cols,.grid7_4cols {width: 107px;}
.input_width7 {width: 469px;}
.width8, .grid8, .span-8 {width: 545px;}
.width8_3cols,.grid8_3cols {width: 171px;}
.input_width8 {width: 539px;}
.width9, .grid9, .span-9 {width: 615px;}
.width9_2cols,.grid9_2cols {width: 300px;}
.width9_4cols,.grid9_4cols {width: 142px;}
.input_width9 {width: 609px;}
.width10, .grid10, .span-10 {width: 685px;}
.width10_3cols,.grid10_3cols {width: 218px;}
.width10_4cols,.grid10_4cols {width: 160px;}
.input_width10 {width: 679px;}
.width11, .grid11, .span-11 {width: 755px;}
.width11_2cols,.grid11_2cols {width: 370px;}
.width11_3cols,.grid11_3cols {width: 241px;}
.width11_4cols,.grid11_4cols {width: 177px;}
.input_width11 {width: 749px;}
.width12, .grid12, .span-12 {width: 825px;}
.input_width12 {width: 819px;}
/* Subdivided grid spaces */
.emptycols_left1, .prepend-1 {padding-left: 70px;}
.emptycols_right1, .append-1 {padding-right: 70px;}
.emptycols_left2, .prepend-2 {padding-left: 140px;}
.emptycols_right2, .append-2 {padding-right: 140px;}
.emptycols_left3, .prepend-3 {padding-left: 210px;}
.emptycols_right3, .append-3 {padding-right: 210px;}
.emptycols_left4, .prepend-4 {padding-left: 280px;}
.emptycols_right4, .append-4 {padding-right: 280px;}
.emptycols_left5, .prepend-5 {padding-left: 350px;}
.emptycols_right5, .append-5 {padding-right: 350px;}
.emptycols_left6, .prepend-6 {padding-left: 420px;}
.emptycols_right6, .append-6 {padding-right: 420px;}
.emptycols_left7, .prepend-7 {padding-left: 490px;}
.emptycols_right7, .append-7 {padding-right: 490px;}
.emptycols_left8, .prepend-8 {padding-left: 560px;}
.emptycols_right8, .append-8 {padding-right: 560px;}
.emptycols_left9, .prepend-9 {padding-left: 630px;}
.emptycols_right9, .append-9 {padding-right: 630px;}
.emptycols_left10, .prepend-10 {padding-left: 700px;}
.emptycols_right10, .append-10 {padding-right: 700px;}
.emptycols_left11, .prepend-11 {padding-left: 770px;}
.emptycols_right11, .append-11 {padding-right: 770px;}
.pull-1 {margin-left: -70px;}
.push-1 {margin-right: -70px;margin-left: 18px;float: right;}
.pull-2 {margin-left: -140px;}
.push-2 {margin-right: -140px;margin-left: 18px;float: right;}
.pull-3 {margin-left: -210px;}
.push-3 {margin-right: -210px;margin-left: 18px;float: right;}
.pull-4 {margin-left: -280px;}
.push-4 {margin-right: -280px;margin-left: 18px;float: right;}

@ -1,396 +0,0 @@
@import url('grid_12-825-55-15.css');
/*
CSS Reset by Eric Meyer - Released under Public Domain
http://meyerweb.com/eric/tools/css/reset/
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table,
caption, tbody, tfoot, thead, tr, th, td
{margin: 0;padding: 0;border: 0;outline: 0;
font-size: 100%;vertical-align: baseline;
background: transparent;}
body {line-height: 1;}
ol, ul {list-style: none;}
blockquote, q {quotes: none;}
blockquote:before, blockquote:after,
q:before, q:after {content: ''; content: none;}
:focus {outline: 0;}
ins {text-decoration: none;}
del {text-decoration: line-through;}
table {border-collapse: collapse;border-spacing: 0;}
body {
color: #000;
background-color: #dcdcdc;
}
a {
text-decoration: none;
color: #1883ba;
}
h1{
font-size: 32px;
font-weight: normal;
font-style: normal;
margin-bottom: 18px;
}
h2{
font-size: 18px;
}
#container {
width: 865px;
margin: 0px auto;
}
#header {
padding: 20px;
font-size: 36px;
background-color: #000;
color: #fff;
}
#header span {
color: #666;
}
#main_content {
background-color: #fff;
padding: 60px 20px 20px;
}
#footer p {
margin: 0;
padding-top: 10px;
padding-bottom: 50px;
color: #333;
font: 10px Arial, sans-serif;
}
.tabs {
width: 100%;
height: 31px;
background-color: #444;
}
.tabs li {
float: left;
margin: 0;
overflow: hidden;
background-color: #444;
}
.tabs li a {
display: block;
color: #fff;
text-decoration: none;
font: bold 11px/11px 'Arial';
text-transform: uppercase;
padding: 10px 15px;
border-right: 1px solid #fff;
}
.tabs li a:hover {
background-color: #00b3ff;
}
.tabs li.active a {
color: #000;
background-color: #fff;
}
div.huge {
font-size: 120px;
line-height: 1em;
padding: 0;
letter-spacing: -.02em;
overflow: hidden;
}
div.glyph_range {
font-size: 72px;
line-height: 1.1em;
}
.size10{ font-size: 10px; }
.size11{ font-size: 11px; }
.size12{ font-size: 12px; }
.size13{ font-size: 13px; }
.size14{ font-size: 14px; }
.size16{ font-size: 16px; }
.size18{ font-size: 18px; }
.size20{ font-size: 20px; }
.size24{ font-size: 24px; }
.size30{ font-size: 30px; }
.size36{ font-size: 36px; }
.size48{ font-size: 48px; }
.size60{ font-size: 60px; }
.size72{ font-size: 72px; }
.size90{ font-size: 90px; }
.psample_row1 { height: 120px;}
.psample_row1 { height: 120px;}
.psample_row2 { height: 160px;}
.psample_row3 { height: 160px;}
.psample_row4 { height: 160px;}
.psample {
overflow: hidden;
position: relative;
}
.psample p {
line-height: 1.3em;
display: block;
overflow: hidden;
margin: 0;
}
.psample span {
margin-right: .5em;
}
.white_blend {
width: 100%;
height: 61px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAA9CAYAAAAH4BojAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAO1JREFUeNrs3TsKgFAMRUE/eer+NxztxMYuEWQG3ECKwwUF58ycAKixOAGAyAKILAAiCyCyACILgMgCiCyAyAIgsgAiCyCyAIgsgMgCiCwAIgsgsgAiC4DIAogsACIL0CWuZ3UGgLrIhjMA1EV2OAOAJQtgyQLwjOzmDAAiCyCyAIgsQFtkd2cAEFkAkQVAZAHaIns4A4AlC2DJAiCyACILILIAiCzAV5H1dQGAJQsgsgCILIDIAvwisl58AViyAJYsACILILIAIgvAe2T9EhxAZAFEFgCRBeiL7HAGgLrIhjMAWLIAliwAt1OAAQDwygTBulLIlQAAAABJRU5ErkJggg==);
position: absolute;
bottom: 0;
}
.black_blend {
width: 100%;
height: 61px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAA9CAYAAAAH4BojAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPJJREFUeNrs3TEKhTAQRVGjibr/9QoxhY2N3Ywo50A28IrLwP9g6b1PAMSYTQAgsgAiC4DIAogsgMgCILIAIgsgsgCILIDIAogsACILILIAIguAyAKILIDIAiCyACILgMgCZCnjLWYAiFGvB0BQZJsZAFyyAC5ZAO6RXc0AILIAIguAyAKkRXYzA4DIAogsACILkBbZ3QwALlkAlywAIgsgsgAiC4DIArwVWf8uAHDJAogsACILILIAv4isH74AXLIALlkARBZAZAFEFoDnyPokOIDIAogsACILkBfZZgaAuMhWMwC4ZAE+p4x3mAEgxinAAJ+XBbPWGkwAAAAAAElFTkSuQmCC);
position: absolute;
bottom: 0;
}
.fullreverse {
background: #000 !important;
color: #fff !important;
margin-left: -20px;
padding-left: 20px;
margin-right: -20px;
padding-right: 20px;
padding: 20px;
margin-bottom:0;
}
.sample_table td {
padding-top: 3px;
padding-bottom:5px;
padding-left: 5px;
vertical-align: middle;
line-height: 1.2em;
}
.sample_table td:first-child {
background-color: #eee;
text-align: right;
padding-right: 5px;
padding-left: 0;
padding: 5px;
font: 11px/12px "Courier New", Courier, mono;
}
code {
white-space: pre;
background-color: #eee;
display: block;
padding: 10px;
margin-bottom: 18px;
overflow: auto;
}
.bottom,.last {margin-bottom:0 !important; padding-bottom:0 !important;}
.box {
padding: 18px;
margin-bottom: 18px;
background: #eee;
}
.reverse,.reversed { background: #000 !important;color: #fff !important; border: none !important;}
#bodycomparison {
position: relative;
overflow: hidden;
font-size: 72px;
height: 90px;
white-space: nowrap;
}
#bodycomparison div{
font-size: 72px;
line-height: 90px;
display: inline;
margin: 0 15px 0 0;
padding: 0;
}
#bodycomparison div span{
font: 10px Arial;
position: absolute;
left: 0;
}
#xheight {
float: none;
position: absolute;
color: #d9f3ff;
font-size: 72px;
line-height: 90px;
}
.fontbody {
position: relative;
}
.arialbody{
font-family: Arial;
position: relative;
}
.verdanabody{
font-family: Verdana;
position: relative;
}
.georgiabody{
font-family: Georgia;
position: relative;
}
/* @group Layout page
*/
#layout h1 {
font-size: 36px;
line-height: 42px;
font-weight: normal;
font-style: normal;
}
#layout h2 {
font-size: 24px;
line-height: 23px;
font-weight: normal;
font-style: normal;
}
#layout h3 {
font-size: 22px;
line-height: 1.4em;
margin-top: 1em;
font-weight: normal;
font-style: normal;
}
#layout p.byline {
font-size: 12px;
margin-top: 18px;
line-height: 12px;
margin-bottom: 0;
}
#layout p {
font-size: 14px;
line-height: 21px;
margin-bottom: .5em;
}
#layout p.large{
font-size: 18px;
line-height: 26px;
}
#layout .sidebar p{
font-size: 12px;
line-height: 1.4em;
}
#layout p.caption {
font-size: 10px;
margin-top: -16px;
margin-bottom: 18px;
}
/* @end */
/* @group Glyphs */
#glyph_chart div{
background-color: #d9f3ff;
color: black;
float: left;
font-size: 36px;
height: 1.2em;
line-height: 1.2em;
margin-bottom: 1px;
margin-right: 1px;
text-align: center;
width: 1.2em;
position: relative;
padding: .6em .2em .2em;
}
#glyph_chart div p {
position: absolute;
left: 0;
top: 0;
display: block;
text-align: center;
font: bold 9px Arial, sans-serif;
background-color: #3a768f;
width: 100%;
color: #fff;
padding: 2px 0;
}
#glyphs h1 {
font-family: Arial, sans-serif;
}
/* @end */
/* @group Installing */
#installing {
font: 13px Arial, sans-serif;
}
#installing p,
#glyphs p{
line-height: 1.2em;
margin-bottom: 18px;
font: 13px Arial, sans-serif;
}
#installing h3{
font-size: 15px;
margin-top: 18px;
}
/* @end */
#rendering h1 {
font-family: Arial, sans-serif;
}
.render_table td {
font: 11px "Courier New", Courier, mono;
vertical-align: middle;
}

@ -1,16 +0,0 @@
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on April 28, 2015 */
@font-face {
font-family: 'notokr-bold';
src: url('notokr-bold.eot');
src: url('notokr-bold.eot?#iefix') format('embedded-opentype'),
url('notokr-bold.woff2') format('woff2'),
url('notokr-bold.woff') format('woff'),
url('notokr-bold.ttf') format('truetype'),
url('notokr-bold.svg#notokr-bold') format('svg');
font-weight: normal;
font-style: normal;
}

@ -1,5 +0,0 @@
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"basic","formats":["ttf","woff","woff2","eotz"],"tt_instructor":"default","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save