diff --git a/mens-api/src/main/java/kr/xit/ens/kt/service/IKtMmsService.java b/mens-api/src/main/java/kr/xit/ens/kt/service/IKtMmsService.java index 06de56e..dda788e 100644 --- a/mens-api/src/main/java/kr/xit/ens/kt/service/IKtMmsService.java +++ b/mens-api/src/main/java/kr/xit/ens/kt/service/IKtMmsService.java @@ -1,9 +1,31 @@ package kr.xit.ens.kt.service; +import kr.xit.biz.ens.model.kt.KtAcmdDTO; +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.KtAcmdInfoRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoResponse; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmResponse; 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.KtRefuseRcvRequest; +import kr.xit.biz.ens.model.kt.KtInputDTO.KtApproveRcvRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlResponse; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcResponse; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtBlacklistRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtWhitelistRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest; import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenExcaRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenReadRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenConfirmRequest; import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse; @@ -26,4 +48,22 @@ public interface IKtMmsService { KtTokenResponse requestToken(final KtMnsRequest paramDTO); KtCommonResponse beforeSend(final KtBefSendRequest reqDTO); + KtCommonResponse mainSend(final KtMainSendRequest reqDTO); + KtCommonResponse blacklist(final KtBlacklistRequest reqDTO); + KtCommonResponse cfmToken(final KtTokenConfirmRequest reqDTO); + KtCommonResponse readToken(final KtTokenReadRequest reqDTO); + KtCommonResponse messageResult(final KtMsgRsltRequest reqDTO); + KtSendSttcResponse sendSttc(final KtSendSttcRequest reqDTO); + KtSendSttcDtlResponse sendSttcDtl(final KtSendSttcDtlRequest reqDTO); + KtCommonResponse whitelist(final KtWhitelistRequest reqDTO); + + KtCommonResponse refuseRcv(final KtRefuseRcvRequest reqDTO); + KtCommonResponse approveRcv(final KtApproveRcvRequest reqDTO); + + KtAcmdCerfResponse cerfAcmd(final KtAcmdCerfRequest reqDTO); + + KtCommonResponse excaAcmd(final KtTokenExcaRequest reqDTO); + KtExcaResponse exca(final KtExcaRequest reqDTO); + KtAcmdInfoResponse infoAcmd(final KtAcmdInfoRequest reqDTO); + KtAcmdInfoCfmResponse cfmAcmd(final KtAcmdInfoCfmRequest reqDTO); } diff --git a/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java b/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java index b294d51..e983672 100644 --- a/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java +++ b/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java @@ -1,18 +1,36 @@ package kr.xit.ens.kt.service; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; -import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg; +import kr.xit.biz.ens.model.kt.KtAcmdDTO; +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.KtAcmdInfoRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoResponse; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmResponse; +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.KtCommonDTO.KtCommonResponse; import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest; +import kr.xit.biz.ens.model.kt.KtInputDTO.KtRefuseRcvRequest; +import kr.xit.biz.ens.model.kt.KtInputDTO.KtApproveRcvRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlResponse; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcResponse; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtBlacklistRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtWhitelistRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest; import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenExcaRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenReadRequest; import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenRequest; import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse; 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 kr.xit.ens.kt.cmm.CmmKtMmsUtils; @@ -44,10 +62,94 @@ import org.springframework.stereotype.Service; public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsService { @Value("${contract.kt.host}") private String HOST; + + /** + * 토큰발행 + */ @Value("${contract.kt.api.generate-token}") private String API_GENERATE_TOKEN; + /** + * 사전문자수신등록 : BC-AG-SN-001 + */ @Value("${contract.kt.api.before-send}") private String API_BEFORE_SEND; + /** + * 본문자수신등록 : BC-AG-SN-002 + */ + @Value("${contract.kt.api.main-send}") + private String API_MAIN_SEND; + /** + * 수신거부등록 : BC-AG-SN-007 + */ + @Value("${contract.kt.api.blacklist}") + private String API_BLACKLIST; + /** + * 토큰인증확인조회 : BC-AG-SN-008 + */ + @Value("${contract.kt.api.cfm-token}") + private String API_CFM_TOKEN; + /** + * 토큰열람확인결과전송 : BC-AG-SN-009 + */ + @Value("${contract.kt.api.read-token}") + private String API_READ_TOKEN; + /** + * 사전/본 문자 발송/수신 결과 전송 : BC-AG-SN-010 + */ + @Value("${contract.kt.api.result-message}") + private String API_RESULT_MESSAGE; + /** + * 백오피스발송통계연계조회 : BC-AG-SN-011 + */ + @Value("${contract.kt.api.send-sttc}") + private String API_SEND_STTC; + /** + * 백오피스발송결과연계조회 : BC-AG-SN-012 + */ + @Value("${contract.kt.api.send-sttcdtl}") + private String API_SEND_STTCDTL; + /** + * whitelist등록 : BC-AG-SN-013 + */ + @Value("${contract.kt.api.whitelist}") + private String API_WHITELIST; + /** + * 유통증명서발급처리 : BC-AG-SM-001 + */ + @Value("${contract.kt.api.cerf-acmd}") + private String API_CERF_ACMD; + /** + * 기관정산화면연계토큰인증 : BC-AG-SM-002 + */ + @Value("${contract.kt.api.exca-token}") + private String API_EXCA_ACMD; + /** + * 정산연계자료조회 : BC-AG-EC-001 + */ + @Value("${contract.kt.api.exca}") + private String API_EXCA; + /** + * 전자문서유통정보수치조회 : BC-AG-HS-001 + */ + @Value("${contract.kt.api.info-acmd}") + private String API_INFO_ACMD; + /** + * 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002 + */ + @Value("${contract.kt.api.cfm-acmd}") + private String API_CFM_ACMD; + /** + * 수신거부상태전송 : BC-AG-SN-014 + */ + @Value("${contract.kt.api.refuse-rcv}") + private String API_REFUSE_RCV; + /** + * 수신동의상태전송 : BC-AG-SN-015 + */ + @Value("${contract.kt.api.approve-rcv}") + private String API_APPROVE_RCV; + + private static final String AUTH_TYPE_BEARER = "Bearer"; @@ -100,18 +202,12 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi //reqDTO.setServiceKey(ktMnsInfo.get); CmmEnsUtils.validate(reqDTO); - final Map headerMap = new HashMap<>(); - headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - headerMap.put(HttpHeaders.AUTHORIZATION, String.format("%s %s", AUTH_TYPE_BEARER, ktMnsInfo.getKtAccessToken())); - headerMap.put("client-id", ktMnsInfo.getKtClientId()); - headerMap.put("client-tp", "10"); - - return webClient.exchange( + return webClient.exchangeKt( HOST + API_BEFORE_SEND, HttpMethod.POST, JsonUtils.toJson(reqDTO), KtCommonResponse.class, - headerMap + ktMnsInfo ); /*List errors = new ArrayList<>(); @@ -124,4 +220,238 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi .errors(errors) .build();*/ } + + @Override + public KtCommonResponse mainSend(final KtMainSendRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_MAIN_SEND, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse blacklist(final KtBlacklistRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_BLACKLIST, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse cfmToken(final KtTokenDTO.KtTokenConfirmRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_CFM_TOKEN, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse readToken(final KtTokenReadRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_READ_TOKEN, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse messageResult(final KtMsgRsltRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_RESULT_MESSAGE, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtSendSttcResponse sendSttc(final KtSendSttcRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_SEND_STTC, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtSendSttcResponse.class, + ktMnsInfo + ); + } + + @Override + public KtSendSttcDtlResponse sendSttcDtl(final KtSendSttcDtlRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_SEND_STTCDTL, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtSendSttcDtlResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse whitelist(final KtWhitelistRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_WHITELIST, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse refuseRcv(final KtRefuseRcvRequest reqDTO) { + //final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return KtCommonResponse.builder() + .resultCd("") + .resultDt("") + .build(); + } + + @Override + public KtCommonResponse approveRcv(final KtApproveRcvRequest reqDTO) { + //final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return KtCommonResponse.builder() + .resultCd("") + .resultDt("") + .build(); + } + + @Override + public KtAcmdCerfResponse cerfAcmd(final KtAcmdCerfRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_CERF_ACMD, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtAcmdCerfResponse.class, + ktMnsInfo + ); + } + + @Override + public KtCommonResponse excaAcmd(KtTokenExcaRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_EXCA_ACMD, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtCommonResponse.class, + ktMnsInfo + ); + } + + @Override + public KtExcaResponse exca(final KtExcaRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_EXCA, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtExcaResponse.class, + ktMnsInfo + ); + } + + @Override + public KtAcmdInfoResponse infoAcmd(final KtAcmdInfoRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_INFO_ACMD, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtAcmdInfoResponse.class, + ktMnsInfo + ); + } + + @Override + public KtAcmdInfoCfmResponse cfmAcmd(final KtAcmdInfoCfmRequest reqDTO) { + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + //reqDTO.setServiceCd(ktMnsInfo.get); + //reqDTO.setServiceKey(ktMnsInfo.get); + CmmEnsUtils.validate(reqDTO); + + return webClient.exchangeKt( + HOST + API_CFM_ACMD, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + KtAcmdInfoCfmResponse.class, + ktMnsInfo + ); + } } diff --git a/mens-api/src/main/java/kr/xit/ens/kt/web/KtMmsController.java b/mens-api/src/main/java/kr/xit/ens/kt/web/KtMmsController.java index 0467363..3b9c913 100644 --- a/mens-api/src/main/java/kr/xit/ens/kt/web/KtMmsController.java +++ b/mens-api/src/main/java/kr/xit/ens/kt/web/KtMmsController.java @@ -1,15 +1,34 @@ package kr.xit.ens.kt.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.cmm.service.ICmmEnsCacheService; +import kr.xit.biz.ens.model.kt.KtAcmdDTO; +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.KtAcmdInfoRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoResponse; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmRequest; +import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmResponse; 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; +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; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtSendSttcDtlRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtBlacklistRequest; +import kr.xit.biz.ens.model.kt.KtMmsDTO.KtWhitelistRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest; +import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendRequest; import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest; +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.KtTokenDTO.KtTokenExcaRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenReadRequest; +import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenConfirmRequest; import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.spring.annotation.JsonArg; import kr.xit.ens.kt.service.IKtMmsService; import lombok.RequiredArgsConstructor; import org.springframework.http.MediaType; @@ -82,4 +101,109 @@ public class KtMmsController { KtCommonResponse dto = service.beforeSend(reqDTO); return ApiResponseDTO.success(dto); } + + @Operation(summary = "본문자 수신 등록 요청", description = "본문자 수신 등록 요청(BC-AG-SN-002)") + @PostMapping(value = "/mainSend", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO mainSend(@RequestBody final KtMainSendRequest reqDTO) { + KtCommonResponse dto = service.mainSend(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "수신 거부 등록 요청", description = "수신 거부 등록 요청(BC-AG-SN-007)") + @PostMapping(value = "/blacklist", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO blacklist(@RequestBody final KtBlacklistRequest reqDTO) { + KtCommonResponse dto = service.blacklist(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "토큰인증확인 조회", description = "토큰인증확인조회요청(BC-AG-SN-008)") + @PostMapping(value = "/cfmToken", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO cfmToken(@RequestBody final KtTokenConfirmRequest reqDTO) { + KtCommonResponse dto = service.cfmToken(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "토큰열람확인결과 전송", description = "토큰열람확인결과 전송(BC-AG-SN-009)") + @PostMapping(value = "/readToken", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO readToken(@RequestBody final KtTokenReadRequest reqDTO) { + KtCommonResponse dto = service.readToken(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "사전/본 문자 발송/수신 결과 전송 요청", description = "사전/본 문자 발송/수신 결과 전송 요청(BC-AG-SN-010)") + @PostMapping(value = "/messageResult", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO messageResult(@RequestBody final KtMsgRsltRequest reqDTO) { + KtCommonResponse dto = service.messageResult(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "백오피스 발송 통계 연계 조회 요청", description = "백오피스 발송 통계 연계 조회 요청(BC-AG-SN-011)") + @PostMapping(value = "/sendSttc", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO sendSttc(@RequestBody final KtSendSttcRequest reqDTO) { + KtMmsDTO.KtSendSttcResponse dto = service.sendSttc(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "백오피스 발송 결과 연계 조회 요청", description = "백오피스 발송 결과 연계 조회 요청(BC-AG-SN-012)") + @PostMapping(value = "/sendSttcDtl", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO sendSttcDtl(@RequestBody final KtSendSttcDtlRequest reqDTO) { + KtMmsDTO.KtSendSttcDtlResponse dto = service.sendSttcDtl(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "whitelist 등록 요청", description = "whitelist 등록 요청(BC-AG-SN-013)") + @PostMapping(value = "/whitelist", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO whitelist(@RequestBody final KtWhitelistRequest reqDTO) { + KtCommonResponse dto = service.whitelist(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "수신거부상태 전송", description = "수신거부상태전송(BC-AG-SN-014)") + @PostMapping(value = "/refuseRcv", produces = MediaType.APPLICATION_JSON_VALUE) + public KtCommonResponse refuseRcv(@RequestBody final KtRefuseRcvRequest reqDTO) { + KtCommonResponse dto = service.refuseRcv(reqDTO); + return dto; + } + + @Operation(summary = "수신동의상태 전송", description = "수신동의상태전송(BC-AG-SN-015)") + @PostMapping(value = "/approveRcv", produces = MediaType.APPLICATION_JSON_VALUE) + public KtCommonResponse approveRcv(@RequestBody final KtApproveRcvRequest reqDTO) { + KtCommonResponse dto = service.approveRcv(reqDTO); + return dto; + } + + @Operation(summary = "유통증명서발급처리 요청", description = "유통증명서발급처리 요청(BC-AG-SM-001)") + @PostMapping(value = "/cerfAcmd", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO cerfAcmd(@RequestBody final KtAcmdCerfRequest reqDTO) { + KtAcmdCerfResponse dto = service.cerfAcmd(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "가상정산화면 연계토큰 인증 요청", description = "가상정산화면 연계토큰 인증 요청(BC-AG-SM-002)") + @PostMapping(value = "/excaAcmd", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO excaAcmd(@RequestBody final KtTokenExcaRequest reqDTO) { + KtCommonResponse dto = service.excaAcmd(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "정산연계자료조회", description = "정산연계자료조회(BC-AG-EC-001)") + @PostMapping(value = "/exca", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO exca(@RequestBody final KtExcaRequest reqDTO) { + KtExcaResponse dto = service.exca(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "전자문서 유통정보 수치 조회", description = "전자문서 유통정보 수치 조회(BC-AG-HS-001)") + @PostMapping(value = "/infoAcmd", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO infoAcmd(@RequestBody final KtAcmdInfoRequest reqDTO) { + KtAcmdInfoResponse dto = service.infoAcmd(reqDTO); + return ApiResponseDTO.success(dto); + } + + @Operation(summary = "전자문서 유통정보 수치확인서 발급 처리", description = "전자문서 유통정보 수치확인서 발급 처리(BC-AG-HS-002)") + @PostMapping(value = "/cfmAcmd", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponseDTO cfmAcmd(@RequestBody final KtAcmdInfoCfmRequest reqDTO) { + KtAcmdInfoCfmResponse dto = service.cfmAcmd(reqDTO); + return ApiResponseDTO.success(dto); + } } diff --git a/mens-api/src/main/resources/config/application-ens.yml b/mens-api/src/main/resources/config/application-ens.yml index e0f4a1a..70ee7cd 100644 --- a/mens-api/src/main/resources/config/application-ens.yml +++ b/mens-api/src/main/resources/config/application-ens.yml @@ -46,5 +46,38 @@ contract: # 운영 #host: http://172.16.1.182:10210/ONLWeb api: + # 토큰발행 generate-token: /oauth/token + # 사전문자수신등록 : BC-AG-SN-001 before-send: /api/message/before/send + # 본문자수신등록 : BC-AG-SN-002 + main-send: /api/message/main/send + # 수신거부등록 : BC-AG-SN-007 + blacklist: /api/blacklist + # 토큰인증확인조회 : BC-AG-SN-008 + cfm-token: /api/message/token + # 토큰열람확인결과전송 : BC-AG-SN-009 + read-token: /api/message/token + # 사전/본 문자 발송/수신 결과 전송 : BC-AG-SN-010 + result-message: /api/ag/message/result + # 백오피스발송통계연계조회 : BC-AG-SN-011 + send-sttc: /api/sndsttc + # 백오피스발송결과연계조회 : BC-AG-SN-012 + send-sttcdtl: /api/sndsttcdtl + # whitelist등록 : BC-AG-SN-013 + whitelist: /api/whitelist + # 유통증명서발급처리 : BC-AG-SM-001 + cerf-acmd: /api/message/acmdcerf + # 기관정산화면연계토큰인증 : BC-AG-SM-002 + exca-token: /api/auth/excatoken + # 정산연계자료조회 : BC-AG-EC-001 + exca: /api/auth/exca + # 전자문서유통정보수치조회 : BC-AG-HS-001 + info-acmd: /api/acmdinfo + # 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002 + cfm-acmd: /api/acmdinfocfm + + # 수신거부상태전송 : BC-AG-SN-014 + refuse-rcv: http://localhost:8081/api/ens/kt/v1/receive/refuse + # 수신동의상태전송 : BC-AG-SN-015 + approve-rcv: http://localhost:8081/api/ens/kt/v1/receive/approve diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtAcmdDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtAcmdDTO.java index 3e29cc1..c4ce0ac 100644 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtAcmdDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtAcmdDTO.java @@ -42,19 +42,21 @@ import lombok.experimental.SuperBuilder; * */ public class KtAcmdDTO { - //------------------------------------------------------------------- - // 유통증명서 발급 : BC-AG-SM-001 - // Request : KtAcmdCerfRequest - // Response : KtAcmdCerfResponse - //------------------------------------------------------------------- + /** + *
+     * 유통증명서 발급 : BC-AG-SM-001
+     * Request : KtAcmdCerfRequest
+     * Response : KtAcmdCerfResponse
+     * 
+ */ @Schema(name = "KtAcmdCerfRequest", description = "KT 유통증명서 발급 요청 DTO") @Data @NoArgsConstructor @AllArgsConstructor - @Builder + @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtAcmdCerfRequest { + public static class KtAcmdCerfRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 발급요청구분 - 필수 : 1자리
@@ -153,11 +155,13 @@ public class KtAcmdDTO {
     }
     //-------------------------------------------------------------------
 
-    //-------------------------------------------------------------------
-    // 전자문서 유통정보 수치조회 : BC-AG-HS-001
-    // Request : KtAcmdInfoRequest
-    // Response : KtAcmdInfoResponse
-    //-------------------------------------------------------------------
+    /**
+     * 
+     * 전자문서 유통정보 수치조회 : BC-AG-HS-001
+     * Request : KtAcmdInfoRequest
+     * Response : KtAcmdInfoResponse
+     * 
+ */ @Schema(name = "KtAcmdInfoRequest", description = "KT 전자문서 유통정보 수치조회 요청 DTO") @Data @NoArgsConstructor @@ -165,7 +169,7 @@ public class KtAcmdDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtAcmdInfoRequest { + public static class KtAcmdInfoRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 서비스코드 : 필수 - 5
@@ -250,11 +254,13 @@ public class KtAcmdDTO {
     }
     //-------------------------------------------------------------------
 
-    //-------------------------------------------------------------------
-    // 전자문서 유통정보 수치 확인서 발급 : BC-AG-HS-002
-    // Request : KtAcmdInfoCfmRequest
-    // Response : KtAcmdInfoCfmResponse
-    //-------------------------------------------------------------------
+    /**
+     * 
+     * 전자문서 유통정보 수치 확인서 발급 : BC-AG-HS-002
+     * Request : KtAcmdInfoCfmRequest
+     * Response : KtAcmdInfoCfmResponse
+     * 
+ */ @Schema(name = "KtAcmdInfoCfmRequest", description = "KT 전자문서 유통정보 수치 확인서 발급 요청 DTO") @Data @NoArgsConstructor diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtExcaDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtExcaDTO.java index a678c95..a443b4e 100644 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtExcaDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtExcaDTO.java @@ -38,11 +38,13 @@ import org.hibernate.validator.constraints.NotEmpty; *
*/ public class KtExcaDTO { - //---------------------------------------------------------------------------------------- - // 기관정산화면연계 토큰인증 : BC-AG-SM-002 - // Request : KtTokenExcaRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * 기관정산화면연계 토큰인증 : BC-AG-SM-002
+     * Request : KtTokenExcaRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtTokenExcaRequest", description = "KT 기관정산화면연계 토큰 인증 요청 DTO") @Data @NoArgsConstructor @@ -50,7 +52,7 @@ public class KtExcaDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtTokenExcaRequest { + public static class KtTokenExcaRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 엑세스토큰 : 필수 - 100
@@ -64,11 +66,13 @@ public class KtExcaDTO {
     }
     //-------------------------------------------------------------------
 
-    //----------------------------------------------------------------------------------------
-    // 정산연계 자료 조회 : BC-AG-EC-001
-    // Request : KtExcaRequest
-    // Response : KtExcaResponse
-    //----------------------------------------------------------------------------------------
+    /**
+     * 
+     * 정산연계 자료 조회 : BC-AG-EC-001
+     * Request : KtExcaRequest
+     * Response : KtExcaResponse
+     * 
+ */ @Schema(name = "KtExcaRequest", description = "KT 정산연계 자료 조회 요청 DTO") @Data @NoArgsConstructor @@ -76,7 +80,7 @@ public class KtExcaDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtExcaRequest { + public static class KtExcaRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 정산연월 : 필수 - YYYYMM
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtInputDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtInputDTO.java
index e0c8740..e2055b6 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtInputDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtInputDTO.java
@@ -35,11 +35,13 @@ import lombok.NoArgsConstructor;
  * 
*/ public class KtInputDTO { - //------------------------------------------------------------------- - // 수신거부상태 전송 : BC-AG-SN-014 - // Request : KtRefuseRcvRequest - // Response : KtCommonResponse - //------------------------------------------------------------------- + /** + *
+     * 수신거부상태 전송 : BC-AG-SN-014
+     * Request : KtRefuseRcvRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtRefuseRcvRequest", description = "KT 수신거부상태 등록 요청 DTO") @Data @NoArgsConstructor @@ -112,11 +114,13 @@ public class KtInputDTO { } //------------------------------------------------------------------- - //------------------------------------------------------------------- - // 수신동의상태 전송 : BC-AG-SN-015 - // Request : KtApproveRcvRequest - // Response : KtCommonResponse - //------------------------------------------------------------------- + /** + *
+     * 수신동의상태 전송 : BC-AG-SN-015
+     * Request : KtApproveRcvRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtApproveRcvRequest", description = "KT 수신동의상태 등록 요청 DTO") @Data @NoArgsConstructor diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsDTO.java index 125c6c7..c9fd575 100644 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsDTO.java @@ -22,7 +22,7 @@ import org.hibernate.validator.constraints.NotEmpty; *
  * description : KT 공공 알림 문자 DTO
  *               - 수신거부등록(BC-AG-SN-007)
- *                 Request : {@link KtBlacklist}
+ *                 Request : {@link KtBlacklistRequest}
  *                 Response : {@link KtCommonResponse}
  *               - 백오피스 발송통계 연계 조회(BC-AG-SN-011)
  *                 Request : {@link KtSendSttcRequest}
@@ -45,19 +45,21 @@ import org.hibernate.validator.constraints.NotEmpty;
  * 
*/ public class KtMmsDTO { - //------------------------------------------------------------------- - // 수신거부등록 : BC-AG-SN-007 - // Request : Blacklist - // Response : KtCommonResponse - //------------------------------------------------------------------- - @Schema(name = "KtBlacklist", description = "KT 수신 거부 요청 DTO") + /** + *
+     * 수신거부등록 : BC-AG-SN-007
+     * Request : Blacklist
+     * Response : KtCommonResponse
+     * 
+ */ + @Schema(name = "KtBlacklistRequest", description = "KT 수신 거부 요청 DTO") @Data @NoArgsConstructor @AllArgsConstructor - @Builder + @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtBlacklist { + public static class KtBlacklistRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 서비스코드 : 필수 - 20
@@ -121,20 +123,21 @@ public class KtMmsDTO {
     }
     //-------------------------------------------------------------------
 
-    //-------------------------------------------------------------------
-    // 백오피스 발송통계 연계 조회 : BC-AG-SN-011
-    // Request : KtSendSttcRequest
-    // Response : KtSendSttcResponse
-    //-------------------------------------------------------------------
-
+    /**
+     * 
+     * 백오피스 발송통계 연계 조회 : BC-AG-SN-011
+     * Request : KtSendSttcRequest
+     * Response : KtSendSttcResponse
+     * 
+ */ @Schema(name = "KtSendSttcRequest", description = "KT 백오피스 발송통계 연계 조회 요청 DTO") @Data @NoArgsConstructor @AllArgsConstructor - @Builder + @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtSendSttcRequest { + public static class KtSendSttcRequest extends KtCommonDTO.KtMnsRequest { /** *
@@ -271,19 +274,21 @@ public class KtMmsDTO {
     }
     //-------------------------------------------------------------------
 
-    //-------------------------------------------------------------------
-    // 백오피스 발송결과 연계 조회 : BC-AG-SN-012
-    // Request : KtSendSttcDtlRequest
-    // Response : KtSendSttcDtlResponse
-    //-------------------------------------------------------------------
+    /**
+     * 
+     * 백오피스 발송결과 연계 조회 : BC-AG-SN-012
+     * Request : KtSendSttcDtlRequest
+     * Response : KtSendSttcDtlResponse
+     * 
+ */ @Schema(name = "KtSendSttcDtlRequest", description = "KT 백오피스 발송 결과 연계 조회 요청 DTO") @Data @NoArgsConstructor @AllArgsConstructor - @Builder + @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtSendSttcDtlRequest { + public static class KtSendSttcDtlRequest extends KtCommonDTO.KtMnsRequest { /** *
@@ -379,19 +384,21 @@ public class KtMmsDTO {
     }
     //-------------------------------------------------------------------
 
-    //-------------------------------------------------------------------
-    // Whitelist 등록 : BC-AG-SN-013
-    // Request : KtWhitelistRequest
-    // Response : KtCommonResponse
-    //-------------------------------------------------------------------
+    /**
+     * 
+     * Whitelist 등록 : BC-AG-SN-013
+     * Request : KtWhitelistRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtWhitelistRequest", description = "KT Whitelist 등록 요청 DTO") @Data @NoArgsConstructor @AllArgsConstructor - @Builder + @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtWhitelistRequest { + public static class KtWhitelistRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 서비스코드 : 필수 - 20
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsSendDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsSendDTO.java
index 062982e..2f9b10f 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsSendDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtMmsSendDTO.java
@@ -42,11 +42,13 @@ import org.hibernate.validator.constraints.NotEmpty;
  * 
*/ public class KtMmsSendDTO { - //---------------------------------------------------------------------------------------- - // 사전문자 수신 등록 : BC-AG-SN-001 - // Request : KtBefSendRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * 사전문자 수신 등록 : BC-AG-SN-001
+     * Request : KtBefSendRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtBefSendRequest", description = "사전문자수신(BC-AG-SN-001) 등록 요청 DTO") @Data @NoArgsConstructor @@ -354,15 +356,13 @@ public class KtMmsSendDTO { } //---------------------------------------------------------------------------------------- - - //---------------------------------------------------------------------------------------- - // 본문자 수신 등록 : BC-AG-SN-002 - //---------------------------------------------------------------------------------------- - //---------------------------------------------------------------------------------------- - // 본문자 수신 등록 : BC-AG-SN-002 - // Request : KtMainSendRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * 본문자 수신 등록 : BC-AG-SN-002
+     * Request : KtMainSendRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtMainSendRequest", description = "본문자수신(BC-AG-SN-002) 등록 요청 DTO") @Data @NoArgsConstructor @@ -370,7 +370,7 @@ public class KtMmsSendDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtMainSendRequest { + public static class KtMainSendRequest extends KtCommonDTO.KtMnsRequest { //------------------------------------------------------------------- // 필수 //------------------------------------------------------------------- @@ -801,11 +801,13 @@ public class KtMmsSendDTO { } //------------------------------------------------------------------- - //---------------------------------------------------------------------------------------- - // 사전/본 문자 발송/수신 결과 전송 : BC-AG-SN-010 - // Request : KtMsgRsltRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * 사전/본 문자 발송/수신 결과 전송 : BC-AG-SN-010
+     * Request : KtMsgRsltRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtMsgRsltRequest", description = "사전/본 문자 발송/수신 결과 전송 요청 DTO") @Data @NoArgsConstructor @@ -813,7 +815,7 @@ public class KtMmsSendDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtMsgRsltRequest { + public static class KtMsgRsltRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 서비스코드 : 필수 - 20
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtTokenDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtTokenDTO.java
index fb234f3..0f57ce2 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtTokenDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kt/KtTokenDTO.java
@@ -45,12 +45,13 @@ import org.hibernate.validator.constraints.NotEmpty;
  * 
*/ public class KtTokenDTO { - - //---------------------------------------------------------------------------------------- - // Token 발행 - // Request : KtTokenRequest - // Response : KtTokenResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * Token 발행
+     * Request : KtTokenRequest
+     * Response : KtTokenResponse
+     * 
+ */ @Schema(name = "KtTokenRequest", description = "KT MMS 토큰발행 요청 DTO") @Data @NoArgsConstructor @@ -172,12 +173,13 @@ public class KtTokenDTO { } //---------------------------------------------------------------------------------------- - - //---------------------------------------------------------------------------------------- - // Token 인증 확인 조회 : BC-AG-SN-008 - // Request : KtTokenConfirmRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * Token 인증 확인 조회 : BC-AG-SN-008
+     * Request : KtTokenConfirmRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtTokenConfirmRequest", description = "KT 토큰 인증 확인 요청 DTO") @Data @NoArgsConstructor @@ -185,7 +187,7 @@ public class KtTokenDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtTokenConfirmRequest { + public static class KtTokenConfirmRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 서비스코드 : 필수 - 20
@@ -216,11 +218,13 @@ public class KtTokenDTO {
     }
     //----------------------------------------------------------------------------------------
 
-    //----------------------------------------------------------------------------------------
-    // 열람확인결과전송 : BC-AG-SN-009
-    // Request : KtTokenReadRequest
-    // Response : KtCommonResponse
-    //----------------------------------------------------------------------------------------
+    /**
+     * 
+     * 열람확인결과전송 : BC-AG-SN-009
+     * Request : KtTokenReadRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtTokenReadRequest", description = "KT 열람확인 결과 전송 요청 DTO") @Data @NoArgsConstructor @@ -241,11 +245,13 @@ public class KtTokenDTO { } //------------------------------------------------------------------- - //---------------------------------------------------------------------------------------- - // 기관정산화면연계 토큰인증 : BC-AG-SM-002 - // Request : KtTokenExcaRequest - // Response : KtCommonResponse - //---------------------------------------------------------------------------------------- + /** + *
+     * 기관정산화면연계 토큰인증 : BC-AG-SM-002
+     * Request : KtTokenExcaRequest
+     * Response : KtCommonResponse
+     * 
+ */ @Schema(name = "KtTokenExcaRequest", description = "KT 기관정산화면연계 토큰 인증 요청 DTO") @Data @NoArgsConstructor @@ -253,7 +259,7 @@ public class KtTokenDTO { @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) - public static class KtTokenExcaRequest { + public static class KtTokenExcaRequest extends KtCommonDTO.KtMnsRequest { /** *
          * 엑세스토큰 : 필수 - 100
diff --git a/mens-core/src/main/java/kr/xit/core/spring/util/ApiWebClientUtil.java b/mens-core/src/main/java/kr/xit/core/spring/util/ApiWebClientUtil.java
index f46a067..d581f8c 100644
--- a/mens-core/src/main/java/kr/xit/core/spring/util/ApiWebClientUtil.java
+++ b/mens-core/src/main/java/kr/xit/core/spring/util/ApiWebClientUtil.java
@@ -4,6 +4,8 @@ import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
+
+import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
 import kr.xit.core.consts.Constants;
 import kr.xit.core.exception.BizRuntimeException;
 import kr.xit.core.model.ApiResponseDTO;
@@ -52,6 +54,7 @@ public class ApiWebClientUtil {
     @Value("${contract.kakao.uuid:}")
     private String kkoContractUuid;
 
+    private static final String AUTH_TYPE_BEARER = "Bearer";
     private final WebClientConfig webClientConfig;
 
     public  T get(final String url, final Class responseDtoClass, Map headerMap) {
@@ -89,6 +92,16 @@ public class ApiWebClientUtil {
         return exchange(url, method, body, rtnClzz, map);
     }
 
+    public  T exchangeKt(final String url, final HttpMethod method, final Object body, final Class rtnClzz, final CmmEnsRlaybsnmDTO ktMnsInfo) {
+        final Map headerMap = new HashMap<>();
+        headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
+        headerMap.put(HttpHeaders.AUTHORIZATION, String.format("%s %s", AUTH_TYPE_BEARER, ktMnsInfo.getKtAccessToken()));
+        headerMap.put("client-id", ktMnsInfo.getKtClientId());
+        headerMap.put("client-tp", "10");
+
+        return exchange(url, method, body, rtnClzz, headerMap);
+    }
+
     /**
      * 
      * Async call - Response Entity(상태정보등) 가 필요한 경우