From 17dbb04d03579b3e64c5baaa8b3f844ca1fbe476 Mon Sep 17 00:00:00 2001 From: limju Date: Thu, 26 Oct 2023 17:01:26 +0900 Subject: [PATCH] feat: batch KT-BC make --- .../main/java/kr/xit/biz/ens/model/EnsDTO.java | 2 ++ .../kr/xit/biz/ens/service/EnsBatchService.java | 15 ++++++++++++++- .../main/resources/config/application-local.yml | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java index c56ccd5..4480164 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java @@ -110,6 +110,8 @@ public class EnsDTO { private String try3Minute; private String errorMssage; private String errorCode; + + private String url; } @Data diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java index ce2d4bc..1802970 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java @@ -14,6 +14,7 @@ import javax.validation.Validation; import javax.validation.Validator; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.biz.common.ApiConstants; +import kr.xit.biz.common.ApiConstants.SignguCode; import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.mapper.IEnsBatchMapper; import kr.xit.biz.ens.model.EnsDTO; @@ -91,6 +92,10 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc @Value("${contract.kt.bulk-max-cnt}") private int bulkKtMaxCnt; + @Value("${contract.kt.api.dp-callback-url}") + private String DP_CALLBACK_URL; + @Value("${contract.kt.api.me-callback-url}") + private String ME_CALLBACK_URL; private static final String SNDNG_PROCESS_STTUS = "sndngProcessSttus"; private static final String UNITY_SNDNG_MST_ID = "unitySndngMastrId"; @@ -681,7 +686,15 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc case E_GREEN -> makeCnt = mapper.insertPostSndng(dto); case SMS -> makeCnt = mapper.insertSmsSndng(dto); // FIXME::처리 필요 - case KT_BC -> makeCnt = mapper.insertKtBc(dto); + case KT_BC -> { + if(SignguCode.TRAFFIC.getCode().equals(dto.getSignguCode())){ + dto.setUrl(DP_CALLBACK_URL); + } + if(SignguCode.FUNERAL.getCode().equals(dto.getSignguCode())){ + dto.setUrl(ME_CALLBACK_URL); + } + makeCnt = mapper.insertKtBc(dto); + } // FIXME::처리 필요 case PPLUS -> makeCnt = mapper.insertPplus(dto); default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode)); diff --git a/mens-batch/src/main/resources/config/application-local.yml b/mens-batch/src/main/resources/config/application-local.yml index 9f47658..3a94df3 100644 --- a/mens-batch/src/main/resources/config/application-local.yml +++ b/mens-batch/src/main/resources/config/application-local.yml @@ -107,3 +107,10 @@ app: rcv: /rcv backup: /backup err: /err + +contract: + kt: + api: + # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 + dp-callback-url: http://211.119.124.73:8080/api/web/mbl/v1/kt/dpMblPage.do + me-callback-url: http://211.119.124.73:8080/api/web/mbl/v1/kt/meMblPage.do