diff --git a/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/IKkotalkEltrcDocService.java b/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/IKkotalkEltrcDocService.java
index 40becbf..5ba22f2 100644
--- a/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/IKkotalkEltrcDocService.java
+++ b/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/IKkotalkEltrcDocService.java
@@ -1,7 +1,7 @@
package kr.xit.ens.kakao.v2.service;
+import kr.xit.biz.ens.model.kakao.v2.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
-import kr.xit.biz.ens.model.kakao.v2.KkotalkDocDTO;
import kr.xit.core.model.ApiResponseDTO;
/**
@@ -25,8 +25,8 @@ public interface IKkotalkEltrcDocService {
* 모바일웹 연계 문서발송 요청
* -.이용기관 서버에서 전자문서 서버로 문서발송 처리를 요청합니다.
*
- * @param reqDTO KkotalkDocDTO.SendRequest
- * @return KkotalkDocDTO.SendResponse
+ * @param reqDTO KkotalkApiDTO.SendRequest
+ * @return KkotalkApiDTO.SendResponse
*/
KkotalkDTO.SendResponse requestSend(final KkotalkDTO.SendRequest reqDTO);
@@ -34,10 +34,10 @@ public interface IKkotalkEltrcDocService {
*
* 토큰 유효성 검증(Redirect URL 접속 허용/불허)
*
- * @param reqDTO KkotalkDocDTO.ValidTokenRequest
- * @return KkotalkDocDTO.ValidTokenResponse>
+ * @param reqDTO KkotalkApiDTO.ValidTokenRequest
+ * @return KkotalkApiDTO.ValidTokenResponse>
*/
- KkotalkDocDTO.ValidTokenResponse validToken(final KkotalkDocDTO.ValidTokenRequest reqDTO);
+ KkotalkApiDTO.ValidTokenResponse validToken(final KkotalkApiDTO.ValidTokenRequest reqDTO);
/**
*
@@ -62,9 +62,9 @@ public interface IKkotalkEltrcDocService {
* : RECEIVE(수신, 미처리) > READ(열람)/EXPIRED
*
* @param reqDTO KkotalkDTO.EnvelopeId
- * @return KkotalkDocDTO.EnvelopeStatusResponse
+ * @return KkotalkApiDTO.EnvelopeStatusResponse
*/
- KkotalkDocDTO.EnvelopeStatusResponse findStatus(final KkotalkDocDTO.EnvelopeId reqDTO);
+ KkotalkApiDTO.EnvelopeStatusResponse findStatus(final KkotalkApiDTO.EnvelopeId reqDTO);
/**
*
@@ -90,6 +90,6 @@ public interface IKkotalkEltrcDocService {
KkotalkDTO.BulkStatusResponse findBulkStatus(final KkotalkDTO.BulkStatusRequest reqDTO);
- ApiResponseDTO findMyDocReadyAndMblPage(KkotalkDocDTO.ValidTokenRequest reqDTO);
+ ApiResponseDTO findMyDocReadyAndMblPage(KkotalkApiDTO.ValidTokenRequest reqDTO);
}
diff --git a/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/KkotalkEltrcDocService.java b/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/KkotalkEltrcDocService.java
index 124beb7..9239327 100644
--- a/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/KkotalkEltrcDocService.java
+++ b/mens-api/src/main/java/kr/xit/ens/kakao/v2/service/KkotalkEltrcDocService.java
@@ -17,8 +17,8 @@ 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.v2.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
-import kr.xit.biz.ens.model.kakao.v2.KkotalkDocDTO;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.service.AbstractService;
@@ -91,7 +91,7 @@ public class KkotalkEltrcDocService extends AbstractService implements
List errors = new ArrayList<>();
errors = validate(reqDTO.getEnvelope(), errors);
- final KkotalkDocDTO.Envelope envelope = reqDTO.getEnvelope();
+ final KkotalkApiDTO.Envelope envelope = reqDTO.getEnvelope();
if(envelope.getReviewExpiresAt() != null){
if(envelope.getReviewExpiresAt().compareTo(envelope.getReadExpiresAt()) < 0){
errors.add("reviewExpiresAt=재열람 만료일시를 최조 열람 만료일시 보다 큰 날짜로 입력해주세요.");
@@ -121,7 +121,7 @@ public class KkotalkEltrcDocService extends AbstractService implements
*/
@Override
@TraceLogging
- public KkotalkDocDTO.ValidTokenResponse validToken(final KkotalkDocDTO.ValidTokenRequest reqDTO) {
+ public KkotalkApiDTO.ValidTokenResponse validToken(final KkotalkApiDTO.ValidTokenRequest reqDTO) {
validate(reqDTO, null);
return webClient.exchangeKkotalk(
@@ -130,7 +130,7 @@ public class KkotalkEltrcDocService extends AbstractService implements
.replace("{TOKEN}", reqDTO.getToken()),
HttpMethod.valueOf(API_VALID_TOKEN[1]),
null,
- KkotalkDocDTO.ValidTokenResponse.class,
+ KkotalkApiDTO.ValidTokenResponse.class,
getRlaybsnmInfo(reqDTO));
}
@@ -163,11 +163,11 @@ public class KkotalkEltrcDocService extends AbstractService implements
* : RECEIVE(수신,미수신) > READ(열람)/EXPIRED
*
* @param reqDTO KkotalkDTO.EnvelopeId
- * @return KkotalkDocDTO.EnvelopeStatusResponse
+ * @return KkotalkApiDTO.EnvelopeStatusResponse
*/
@Override
@TraceLogging
- public KkotalkDocDTO.EnvelopeStatusResponse findStatus(final KkotalkDocDTO.EnvelopeId reqDTO){
+ public KkotalkApiDTO.EnvelopeStatusResponse findStatus(final KkotalkApiDTO.EnvelopeId reqDTO){
validate(reqDTO, null);
String param = "{\"envelopeIds\":" + JsonUtils.toJson(List.of(reqDTO.getEnvelopeId())) + "}";
@@ -197,9 +197,9 @@ public class KkotalkEltrcDocService extends AbstractService implements
List errors = new ArrayList<>();
- List envelopes = reqDTO.getEnvelopes();
+ List envelopes = reqDTO.getEnvelopes();
for(int idx = 0; idx < envelopes.size(); idx++) {
- final Set> list = validator.validate(envelopes.get(idx));
+ final Set> list = validator.validate(envelopes.get(idx));
if (!list.isEmpty()) {
int finalIdx = idx;
@@ -211,7 +211,7 @@ public class KkotalkEltrcDocService extends AbstractService implements
}
for(int idx = 0; idx < envelopes.size(); idx++) {
- final KkotalkDocDTO.Envelope envelope = envelopes.get(idx);
+ final KkotalkApiDTO.Envelope envelope = envelopes.get(idx);
if(envelope.getReviewExpiresAt() != null){
if(envelope.getReviewExpiresAt().compareTo(envelope.getReadExpiresAt()) < 0){
@@ -282,13 +282,13 @@ public class KkotalkEltrcDocService extends AbstractService implements
}
@Override
- public ApiResponseDTO findMyDocReadyAndMblPage(final KkotalkDocDTO.ValidTokenRequest reqDTO) {
+ public ApiResponseDTO findMyDocReadyAndMblPage(final KkotalkApiDTO.ValidTokenRequest reqDTO) {
final String url = HOST + API_VALID_TOKEN[0].replace(ENVELOPE_ID, reqDTO.getEnvelopeId())
.replace("{TOKEN}", reqDTO.getToken());
// 유효성 검증
- final KkotalkDocDTO.ValidTokenResponse validTokenRes = webClient.exchangeKkotalk(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null,
- KkotalkDocDTO.ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
+ final KkotalkApiDTO.ValidTokenResponse validTokenRes = webClient.exchangeKkotalk(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null,
+ KkotalkApiDTO.ValidTokenResponse.class, getRlaybsnmInfo(reqDTO));
// FIXME: USED ??
// if(!"USED".equals(validTokenRes.getStatus())){
@@ -300,7 +300,7 @@ public class KkotalkEltrcDocService extends AbstractService implements
// 정상 : HttpStatus.NO_CONTENT(204) return
// error : body에 error_code, error_message return
- final KkotalkDocDTO.KkotalkErrorDTO errorDTO = webClient.exchangeKkotalk(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), null, KkotalkDocDTO.KkotalkErrorDTO.class, getRlaybsnmInfo(reqDTO));
+ 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());
}
diff --git a/mens-api/src/main/java/kr/xit/ens/kakao/v2/web/KkotalkEltrcDocController.java b/mens-api/src/main/java/kr/xit/ens/kakao/v2/web/KkotalkEltrcDocController.java
index 310f396..5b23b0e 100644
--- a/mens-api/src/main/java/kr/xit/ens/kakao/v2/web/KkotalkEltrcDocController.java
+++ b/mens-api/src/main/java/kr/xit/ens/kakao/v2/web/KkotalkEltrcDocController.java
@@ -10,8 +10,8 @@ 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.v2.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
-import kr.xit.biz.ens.model.kakao.v2.KkotalkDocDTO;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kakao.v2.service.IKkotalkEltrcDocService;
@@ -126,13 +126,13 @@ public class KkotalkEltrcDocController {
* 1)유통증명시스템을 사용하는 경우 해당 API를 호출한 시점으로 열람정보가 등록되어 미 호출 시 열람정보가 등록 되지 않음.
* 2)문서상태조회 API(/v1/envelopes/${ENVELOPE_ID}/read) 호출 시 read_at최초 열람시간) 데이터가 내려가지 않음.
*
- * @param reqDTO KkotalkDocDTO.EnvelopeStatusResponse
+ * @param reqDTO KkotalkApiDTO.EnvelopeStatusResponse
* @return ApiResponseDTO
*/
@Operation(summary = "문서열람처리(문서 상태 변경)", description = "문서열람처리(문서 상태 변경)")
@PostMapping(value = "/modifyStatus", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse modifyStatus(
- @RequestBody final KkotalkDocDTO.EnvelopeId reqDTO
+ @RequestBody final KkotalkApiDTO.EnvelopeId reqDTO
) {
service.modifyStatus(reqDTO);
return ApiResponseDTO.empty();
@@ -148,12 +148,12 @@ public class KkotalkEltrcDocController {
* : SENT(송신) > RECEIVED(수신) > READ(열람)/EXPIRED(미열람자료의 기한만료)
*
* @param reqDTO KkotalkDTO.EnvelopeId
- * @return ApiResponseDTO
+ * @return ApiResponseDTO
*/
@Operation(summary = "문서 상태 조회", description = "문서 상태 조회")
@PostMapping(value = "/findStatus", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findStatus(
- @RequestBody final KkotalkDocDTO.EnvelopeId reqDTO
+ @RequestBody final KkotalkApiDTO.EnvelopeId reqDTO
) {
return ApiResponseDTO.success(service.findStatus(reqDTO));
}
@@ -248,8 +248,8 @@ public class KkotalkEltrcDocController {
* 모바일웹 연계 문서발송 요청
* -.이용기관 서버에서 전자문서 서버로 문서발송 처리를 요청합니다.
*
- * @param reqDTO KkotalkDocDTO.BulkStatusRequest
- * @return KkotalkDocDTO.BulkStatusResponse
+ * @param reqDTO KkotalkApiDTO.BulkStatusRequest
+ * @return KkotalkApiDTO.BulkStatusResponse
*/
@Operation(summary = "대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출", description = "카카오페이 전자문서 서버로 대량 문서 상태 조회 요청 -> batch statusBulks 에서 호출")
@PostMapping(value = "/envelopes/bulk/status", produces = MediaType.APPLICATION_JSON_VALUE)
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
index 08603b9..b826b77 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
@@ -35,8 +35,8 @@ import kr.xit.biz.ens.model.EnsKtBcDTO;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
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.v2.KkotalkApiDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
-import kr.xit.biz.ens.model.kakao.v2.KkotalkDocDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
@@ -260,7 +260,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
if(list.isEmpty()) return;
final String mstId = list.get(0).getSndngMastrId();
- final List bulkList = setKkotalkSendBulks(list);
+ final List bulkList = setKkotalkSendBulks(list);
// validation check
try {
@@ -270,7 +270,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
throw e;
}
- final List> partitions = ListUtils.partition(bulkList, bulkKkoMaxCnt);
+ final List> partitions = ListUtils.partition(bulkList, bulkKkoMaxCnt);
//noinspection rawtypes
final List apiResults = partitions.stream()
.map(bulkSendList -> apiWebClient.exchange(
@@ -367,24 +367,24 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
* @param list List 문서발송요청 대상 목록
* @return List
*/
- private static List setKkotalkSendBulks(List list) {
- final List bulkList = new ArrayList<>();
+ private static List setKkotalkSendBulks(List list) {
+ final List bulkList = new ArrayList<>();
for (EnsDTO.SendKakaotalkTgt sendTgtDTO : list) {
/*
방어 코드 추가 : CI 인증인 경우 개인정보 삭제
*/
- KkotalkDocDTO.Envelope bulkReqDTO = null;
+ KkotalkApiDTO.Envelope bulkReqDTO = null;
if(StringUtils.isNotEmpty(sendTgtDTO.getCi())){
- bulkReqDTO = KkotalkDocDTO.Envelope.builder()
+ bulkReqDTO = KkotalkApiDTO.Envelope.builder()
.ci(sendTgtDTO.getCi())
.build();
}else{
- bulkReqDTO = KkotalkDocDTO.Envelope.builder()
+ bulkReqDTO = KkotalkApiDTO.Envelope.builder()
.build();
}
- final KkotalkDocDTO.Content content = KkotalkDocDTO.Content.builder()
+ final KkotalkApiDTO.Content content = KkotalkApiDTO.Content.builder()
.link(sendTgtDTO.getContentLink())
.build();
@@ -459,12 +459,12 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
*
* @param bulkList List 카카오톡 전자고지 발송요청 파라메터 목록
*/
- private void validatedKkotalkSendBulks(List bulkList) {
+ private void validatedKkotalkSendBulks(List bulkList) {
List errors = new ArrayList<>();
int idx = 0;
- for (KkotalkDocDTO.Envelope dto : bulkList) {
- final Set> errList = validator.validate(dto);
+ for (KkotalkApiDTO.Envelope dto : bulkList) {
+ final Set> errList = validator.validate(dto);
if(!errList.isEmpty()) {
int finalIdx = idx;
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDocDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkApiDTO.java
similarity index 99%
rename from mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDocDTO.java
rename to mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkApiDTO.java
index f962d1a..345e31f 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDocDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkApiDTO.java
@@ -25,7 +25,7 @@ import lombok.experimental.SuperBuilder;
* API 호출시 속성값이 없는 경우 속성을 json에 포함시키지 않는다.
* => @JsonInclude(JsonInclude.Include.NON_EMPTY) 설정
* packageName : kr.xit.biz.ens.model.kakao.v2
- * fileName : KkotalkDocDTO
+ * fileName : KkotalkApiDTO
* author : limju
* date : 2024-08-12
* ======================================================================
@@ -35,7 +35,7 @@ import lombok.experimental.SuperBuilder;
*
*
*/
-public class KkotalkDocDTO {
+public class KkotalkApiDTO {
//------------------- Envelope ------------------------------------------------------------------------------------------------
@Schema(name = "Envelope", description = "문서발송(단건) 요청 파라메터 DTO")
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDTO.java
index 222e7b7..ff9ff34 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/kakao/v2/KkotalkDTO.java
@@ -30,7 +30,7 @@ import lombok.experimental.SuperBuilder;
*
*
*/
-public class KkotalkDTO extends KkotalkDocDTO {
+public class KkotalkDTO extends KkotalkApiDTO {
//------------------ envelop ----------------------------------------------------------------------
@Schema(name = "SendRequest DTO", description = "문서발송 request DTO")
@@ -109,7 +109,7 @@ public class KkotalkDTO extends KkotalkDocDTO {
@AllArgsConstructor
@SuperBuilder
public static class BulkStatusResponse implements IApiResponse {
- private List envelopeStatus;
+ private List envelopeStatus;
}
//------------------ bulk ----------------------------------------------------------------------