diff --git a/src/main/java/cokr/xit/ens/modules/kkotalk/model/SendDetailKkoTalkDTO.java b/src/main/java/cokr/xit/ens/modules/kkotalk/model/SendDetailKkoTalkDTO.java index 0561b3e..4648f0b 100644 --- a/src/main/java/cokr/xit/ens/modules/kkotalk/model/SendDetailKkoTalkDTO.java +++ b/src/main/java/cokr/xit/ens/modules/kkotalk/model/SendDetailKkoTalkDTO.java @@ -2,7 +2,10 @@ package cokr.xit.ens.modules.kkotalk.model; import java.time.*; +import javax.persistence.*; + import cokr.xit.ens.modules.common.domain.support.*; +import cokr.xit.ens.modules.kkotalk.code.*; import io.swagger.v3.oas.annotations.media.*; import lombok.*; import lombok.experimental.*; @@ -31,7 +34,7 @@ import lombok.experimental.*; public class SendDetailKkoTalkDTO extends KkotalkApiDTO.Envelope { private String envelopeId; private String link; - private String status; + private KkoTalkStatusCd status; private String sentAt; private String receivedAt; private String readAt; @@ -46,6 +49,7 @@ public class SendDetailKkoTalkDTO extends KkotalkApiDTO.Envelope { private Long sendDetailId; private Long sendMastId; private String errorCode; + @Lob private String errorMessage; private FieldError error; private String mkBillUseYn; diff --git a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java index 2b46b60..76c22fd 100644 --- a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java +++ b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java @@ -27,6 +27,7 @@ import cokr.xit.ens.modules.common.ctgy.sys.mng.service.*; import cokr.xit.ens.modules.common.domain.*; import cokr.xit.ens.modules.common.domain.repository.*; import cokr.xit.ens.modules.kkomydoc.model.config.*; +import cokr.xit.ens.modules.kkotalk.code.*; import cokr.xit.ens.modules.kkotalk.mapper.*; import cokr.xit.ens.modules.kkotalk.model.*; import lombok.*; @@ -195,6 +196,7 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport, Kk // .mkJid(xitProperty.getJid()) .mkJid(aes256.encrypt(xitProperty.getJid())) .mkTmpltMsgJsonData(CmmnUtil.isEmpty(xitProperty.getTmplt_msg_data()) ? null : gson.toJson(xitProperty.getTmplt_msg_data())) + .status(KkoTalkStatusCd.NULL) .build(); sendDetails.add(sendDetail); diff --git a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkRsltProvider.java b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkRsltProvider.java index 0c924c3..4278578 100644 --- a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkRsltProvider.java +++ b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkRsltProvider.java @@ -15,7 +15,6 @@ import cokr.xit.ens.modules.common.biztmplt.*; import cokr.xit.ens.modules.common.code.*; import cokr.xit.ens.modules.common.domain.*; import cokr.xit.ens.modules.common.domain.repository.*; -import cokr.xit.ens.modules.kkotalk.code.*; import cokr.xit.ens.modules.kkotalk.mapper.*; import cokr.xit.ens.modules.kkotalk.model.*; import cokr.xit.ens.modules.kkotalk.model.config.*; @@ -69,7 +68,7 @@ public class KkoTalkRsltProvider implements EnsPhaseProcSupport { - row.setStatus(KkoTalkStatusCd.SENT_FAIL.getCode()); + row.setStatus(KkoTalkStatusCd.SENT_FAIL); row.setError( FieldError.initBuilder() .errorCode(e.getErrCd().getCode()) @@ -130,7 +130,7 @@ public class KkoTalkSender extends SendProcTemplate { list.stream() .forEach(row -> { - row.setStatus(KkoTalkStatusCd.SENT_FAIL.getCode()); + row.setStatus(KkoTalkStatusCd.SENT_FAIL); row.setError( FieldError.initBuilder() .errorCode(EnsErrCd.SEND500.getCode()) @@ -282,11 +282,11 @@ public class KkoTalkSender extends SendProcTemplate { private void modifyTalkSendRsltByExtDocUuid(SendDetailKkoTalkDTO row, Map map) { KkoTalkApiRespVO apiRespVO = map.get(row.getExternalId()); if (CmmnUtil.isEmpty(apiRespVO.getErrorCode())) { - row.setStatus(KkoTalkStatusCd.SENT.getCode()); + row.setStatus(KkoTalkStatusCd.SENT); row.setEnvelopeId(String.valueOf(apiRespVO.getData())); row.setError(FieldError.initBuilder().build()); } else { - row.setStatus(KkoTalkStatusCd.valueOfEnum(apiRespVO.getErrorCode()).getCode()); + row.setStatus(KkoTalkStatusCd.valueOfEnum(apiRespVO.getErrorCode())); row.setError(FieldError.initBuilder() .errorCode(EnsErrCd.SEND630.getCode()) .errorMessage(String.format("%s %s", apiRespVO.getErrorCode(), apiRespVO.getErrorMessage()))