From cd8c8dff9d3e841c4dfe424e2a7bb5b19d628d9f Mon Sep 17 00:00:00 2001 From: kjh Date: Mon, 26 Aug 2024 17:39:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20kt=20gibis=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/biz/ens/mapper/IEnsBatchMapper.java | 11 ++ .../ens/service/EnsBatchExtractService.java | 6 +- .../biz/ens/service/EnsBatchMakeService.java | 1 - .../biz/ens/service/EnsBatchSendService.java | 2 +- .../mapper/biz/ens-oracle-mapper.xml | 103 ++++++++++++------ .../kr/xit/biz/ens/model/ktgbs/KtGbsDTO.java | 8 +- 6 files changed, 87 insertions(+), 44 deletions(-) diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java b/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java index 0cc364f..d450998 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java @@ -201,6 +201,16 @@ public interface IEnsBatchMapper { */ int insertKtBcDetail(final T t); + /** + *
+     * Kt Gibis 모바일페이지 관리 생성
+     * - tb_ens_mobile_page_manage
+     * @param t T
+     * @return int
+     * 
+ */ + int insertKtGbsMobilePageManage(final T t); + /** *
      * Kt Gibis 디테일 데이터 생성
@@ -331,6 +341,7 @@ public interface IEnsBatchMapper {
 
     Optional selectKtGbsMstTgtInfo(final SndngMssageParam dto);
     List selectKtGbsSendTgts(final SndngMssageParam dto);
+    int updateKtGbs(final SndngMssageParam dto);
 
     //----------------------------------------------------------------------
     // send
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
index fcd7e4a..ced7a70 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
@@ -156,9 +156,9 @@ public class EnsBatchExtractService extends AbstractService implements
     public void saveKtGbsResult(final SndngMssageParam dto, final List sendReqs) {
         // 성공처리
         // mobile page create
-        // FIXME : KT GIBIS 적용 안됨
-        if(Checks.isNotEmpty(sendReqs))     sendReqs.forEach(d -> mapper.insertKtMobilePageManage(d.getSrcKey()));
-        mapper.updateKtBcMst(dto);
+
+        if(Checks.isNotEmpty(sendReqs))     sendReqs.forEach(d -> mapper.insertKtGbsMobilePageManage(d.getSrcKey()));
+        mapper.updateKtGbs(dto);
     }
 
     /**
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
index 7777c88..0bc33f0 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
@@ -221,7 +221,6 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
                     mapper.insertKtBcMastr(dto);
                     yield mapper.insertKtBcDetail(dto);
                 }
-                // FIXME : KT GIBIS 적용 안됨
                 case KT_GIBIS -> {
                     // FIXME: KT callback url 확인 적용
                     // TB_ENS_KT_GBS
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 0dbf86f..4d66f2a 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
@@ -670,7 +670,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
                     .map(ErrorMsg::getErrorMsg)
                     .collect(Collectors.joining(","))
             );
-            extractService.saveKtBcResult(dto, null);
+            extractService.saveKtGbsResult(dto, null);
             extractService.updateSndngMstFailStatus(mstId, SndngSeCode.KT_BC, dto.getErrorCode(), dto.getErrorMssage(), "[send] KT-BC 발송(bulks)요청 실패");
             return;
         }
diff --git a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml
index 5a8c6ab..e74c5b3 100644
--- a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml
+++ b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml
@@ -490,6 +490,7 @@
 			data_cnt,                   /* 회차전체데이터건수 */
 			sndn_ex_time,				/* 발송 마감 시간 */
 			ex_time,					/* 열람 마감 시간 */
+			snd_tel_no,                 /* 발송전화번호 */
 			m_type,						/* 문서 종류 */
 			opt_type,					/* 메시지 발송 구분 */
 			src_key,					/* 관리키 */
@@ -516,6 +517,7 @@
 		     , teusm.sndng_co
 			 , teusm.clos_dt
 			 , teusm.clos_dt
+		     , tetm.sndng_tlphon_no
 			 , '4'							/* 3: LMS 4: MMS 6: RCS*/
 			 , '1'
 			 , teusd.unity_sndng_detail_id
@@ -766,52 +768,50 @@
 	
 
 	
 
@@ -949,6 +949,39 @@
 		  ON tekbd.unity_sndng_detail_id = teusd.unity_sndng_detail_id
 		WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId}
 	
+
+	
+		/** ens-kt-mysql-mapper|updateKtBcMst-kt 메세지 수신결과 마스터 반영|julim  */
+		UPDATE tb_ens_kt_gbs
+		   SET result_cd = #{resultCd}
+		    , result_dt = #{resultDt}
+		    , error_msg = #{errorMssage}
+		    , updt_dt = sysdate
+		    , updusr = 'batch'
+		WHERE sndng_mastr_id = #{sndngMastrId}
+		  AND signgu_code = #{signguCode}
+		  AND ffnlg_code = #{ffnlgCode}
+	
+
+	
+		/** ens-oracle-mapper|insertKtGbsMobilePageManage-모바일페이지관리 데이타 생성|julim  */
+		INSERT INTO tb_ens_mobile_page_manage (
+			sndng_detail_id, 	/* 발송상세 ID*/
+			sndng_se_code, 		/* 발송 구분 코드 */
+			mobile_page_cn, 	/* 모바일 페이지 내용 */
+			regist_dt,
+			register
+		)
+		SELECT tekg.sndng_detail_id
+			 , 'KT-GIBIS'
+			 , teusd.mobile_page_cn
+			 , to_char(sysdate, 'yyyymmddhh24miss')
+			 , 'batch'
+		 FROM tb_ens_kt_gbs tekg
+	     JOIN tb_ens_unity_sndng_detail teusd
+		   ON tekg.unity_sndng_detail_id = teusd.unity_sndng_detail_id
+		WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId}
+	
 	
 	
 	
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/ktgbs/KtGbsDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/ktgbs/KtGbsDTO.java
index 0b8bd67..b25a3ca 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/ktgbs/KtGbsDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/ktgbs/KtGbsDTO.java
@@ -85,7 +85,7 @@ public class KtGbsDTO {
          */
         @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송마감시간(yyyyMMddHHmiss)", example = " ")
         @Size(min = 14, max = 14, message = "발송마감시간(yyyyMMddHHmiss)")
-        private String sendExTime;
+        private String sndnExTime;
 
         /**
          * 열람마감시간 - 필수(yyyyMMddHHmiss : 14자리)
@@ -99,7 +99,7 @@ public class KtGbsDTO {
          */
         @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서종류(sms|lms|mms)", example = "mms", allowableValues = {
             "sms", "lms", "mms"})
-        @Size(min = 3, max = 3, message = "문서종류(sms|lms|mms)")
+        @Size(min = 1, max = 3, message = "문서종류(sms|lms|mms)")
         @JsonProperty("m_type")
         private String mType;
 
@@ -159,10 +159,10 @@ public class KtGbsDTO {
         private String srcSeq;
 
         /**
-         * 개인식별코드 : 128 자리
+         * 개인식별코드 : 88 자리
          */
         @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "개인식별코드", example = "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==")
-        @Size(min = 128, max = 128, message = "개인식별코드는 필수 입니다(128자리)")
+        @Size(min = 88, max = 88, message = "개인식별코드는 필수 입니다(88자리)")
         private String sci;
 
         /**