feat: 카카오톡 추가 반영 - send

- 전송결과 카카오톡 상세 테이블 반영 추가
main
Jonguk. Lim 2 months ago
parent cce7157f90
commit 17b3c9e417

@ -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;

@ -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<EnsResponseVO<?>, 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);

@ -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<EnsResponseVO, L
.sendDetailId(row.getSendDetailId())
.externalId(row.getExternalId())
.envelopeId(row.getEnvelopeId())
.status(KkoTalkStatusCd.getEnum(row.getStatus()))
.status(row.getStatus())
.sentDt(row.getSentAt())
.receivedDt(row.getReceivedAt())
// FIXME: 카카오톡 적용 필요

@ -116,7 +116,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(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<String, KkoTalkApiRespVO> 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()))

Loading…
Cancel
Save