From b30edafbfa16c4728b94e66d91729827e3f42149 Mon Sep 17 00:00:00 2001 From: kjh Date: Mon, 7 Oct 2024 19:10:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=82=98=EC=9D=B4=EC=8A=A4=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=ED=86=A1=ED=85=9C=ED=94=8C=EB=A6=BF=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/ens/modules/nice/model/NiceCiDTO.java | 2 ++ .../modules/nice/service/NiceCiSendBulkService.java | 12 ++++++------ .../mybatis-mapper/modules/iup-niceci-mapper.xml | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java index ed37359..3849282 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java +++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java @@ -446,6 +446,8 @@ public class NiceCiDTO { private String useYn; + private String ntcntalkTmplatCode; + private String registId; private LocalDateTime registDt; diff --git a/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiSendBulkService.java b/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiSendBulkService.java index f83cf69..e845a36 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiSendBulkService.java +++ b/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiSendBulkService.java @@ -66,10 +66,10 @@ public class NiceCiSendBulkService { }); for(NiceCiDTO.InputXit xit : list) { - final String tmpltId = xit.getJobCd(); - final NiceCiDTO.TmpltMngDTO tmpltMngDTO = niceCiMapper.selectTmpltMsg(tmpltId) + final NiceCiDTO.TmpltMngDTO tmpltMngDTO = niceCiMapper.selectTmpltMsg(xit.getJobCd()) .orElseThrow(() -> new EnsException(EnsErrCd.NO_DATA_FOUND, EnsErrCd.NO_DATA_FOUND.getCodeNm())); final String sndMsg = tmpltMngDTO.getMessage();//.replace("~~@@!!", "#{").replace("!!@@~~", "}"); + final String ntcntalkTmplatCode = tmpltMngDTO.getNtcntalkTmplatCode(); final OrgMng orgMng = niceCiMapper.selectKkoBpApiUrlFromEnsOrgMng(xit.getOrgCd()) .orElseThrow(() -> new EnsException(EnsErrCd.NO_DATA_FOUND, EnsErrCd.NO_DATA_FOUND.getCodeNm())); @@ -93,7 +93,7 @@ public class NiceCiSendBulkService { // 공통부 set setNiceCiApiRequestCommon(nCommon, niceSmsReqId); // 개별부 set - setNiceCiApiPrivateReq(ciRequest, tmpltId, sndMsg, data); + setNiceCiApiPrivateReq(ciRequest, ntcntalkTmplatCode, sndMsg, data); // 조회요청반복부 set setQueryRequest(queryRequest, data); // 버튼요청반복부 set @@ -176,11 +176,11 @@ public class NiceCiSendBulkService { /** * 개별요청부 set * @param ciRequest NiceCiApiDTO.Request - * @param tmpltId template ID + * @param ntcntalkTmplatCode template ID * @param sndMsg 전송메세지 템플릿 * @param data NiceCiDTO.InputDataXit data */ - private void setNiceCiApiPrivateReq(final NiceCiApiDTO.Request ciRequest, final String tmpltId, String sndMsg, final NiceCiDTO.InputDataXit data){ + private void setNiceCiApiPrivateReq(final NiceCiApiDTO.Request ciRequest, final String ntcntalkTmplatCode, String sndMsg, final NiceCiDTO.InputDataXit data){ //////////////////////////////////////////////////////////// // 개별요청부 START //////////////////////////////////////////////////////////// @@ -204,7 +204,7 @@ public class NiceCiSendBulkService { sndMsg = sndMsg.replace(entry.getKey(), entry.getValue()); } ciRequest.setSndngMssage(sndMsg); // 발송메세지 - ciRequest.setNtcntalkTmplatCode(tmpltId); // 알림톡 템플릿 코드 + ciRequest.setNtcntalkTmplatCode(ntcntalkTmplatCode); // 알림톡 템플릿 코드 //////////////////////////////////////////////////////////// // 개별요청부 END //////////////////////////////////////////////////////////// diff --git a/src/main/resources/mybatis-mapper/modules/iup-niceci-mapper.xml b/src/main/resources/mybatis-mapper/modules/iup-niceci-mapper.xml index 54030df..c468d8d 100644 --- a/src/main/resources/mybatis-mapper/modules/iup-niceci-mapper.xml +++ b/src/main/resources/mybatis-mapper/modules/iup-niceci-mapper.xml @@ -189,6 +189,7 @@ , tmplt_cd , message , title + , ntcntalk_tmplat_code FROM ens_tmplt_mng WHERE tmplt_cd = #{tmpltCd}