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 java.time.*;
import javax.persistence.*;
import cokr.xit.ens.modules.common.domain.support.*; import cokr.xit.ens.modules.common.domain.support.*;
import cokr.xit.ens.modules.kkotalk.code.*;
import io.swagger.v3.oas.annotations.media.*; import io.swagger.v3.oas.annotations.media.*;
import lombok.*; import lombok.*;
import lombok.experimental.*; import lombok.experimental.*;
@ -31,7 +34,7 @@ import lombok.experimental.*;
public class SendDetailKkoTalkDTO extends KkotalkApiDTO.Envelope { public class SendDetailKkoTalkDTO extends KkotalkApiDTO.Envelope {
private String envelopeId; private String envelopeId;
private String link; private String link;
private String status; private KkoTalkStatusCd status;
private String sentAt; private String sentAt;
private String receivedAt; private String receivedAt;
private String readAt; private String readAt;
@ -46,6 +49,7 @@ public class SendDetailKkoTalkDTO extends KkotalkApiDTO.Envelope {
private Long sendDetailId; private Long sendDetailId;
private Long sendMastId; private Long sendMastId;
private String errorCode; private String errorCode;
@Lob
private String errorMessage; private String errorMessage;
private FieldError error; private FieldError error;
private String mkBillUseYn; 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.*;
import cokr.xit.ens.modules.common.domain.repository.*; import cokr.xit.ens.modules.common.domain.repository.*;
import cokr.xit.ens.modules.kkomydoc.model.config.*; 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.mapper.*;
import cokr.xit.ens.modules.kkotalk.model.*; import cokr.xit.ens.modules.kkotalk.model.*;
import lombok.*; import lombok.*;
@ -195,6 +196,7 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport<EnsResponseVO<?>, Kk
// .mkJid(xitProperty.getJid()) // .mkJid(xitProperty.getJid())
.mkJid(aes256.encrypt(xitProperty.getJid())) .mkJid(aes256.encrypt(xitProperty.getJid()))
.mkTmpltMsgJsonData(CmmnUtil.isEmpty(xitProperty.getTmplt_msg_data()) ? null : gson.toJson(xitProperty.getTmplt_msg_data())) .mkTmpltMsgJsonData(CmmnUtil.isEmpty(xitProperty.getTmplt_msg_data()) ? null : gson.toJson(xitProperty.getTmplt_msg_data()))
.status(KkoTalkStatusCd.NULL)
.build(); .build();
sendDetails.add(sendDetail); 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.code.*;
import cokr.xit.ens.modules.common.domain.*; import cokr.xit.ens.modules.common.domain.*;
import cokr.xit.ens.modules.common.domain.repository.*; 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.mapper.*;
import cokr.xit.ens.modules.kkotalk.model.*; import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.kkotalk.model.config.*; import cokr.xit.ens.modules.kkotalk.model.config.*;
@ -69,7 +68,7 @@ public class KkoTalkRsltProvider implements EnsPhaseProcSupport<EnsResponseVO, L
.sendDetailId(row.getSendDetailId()) .sendDetailId(row.getSendDetailId())
.externalId(row.getExternalId()) .externalId(row.getExternalId())
.envelopeId(row.getEnvelopeId()) .envelopeId(row.getEnvelopeId())
.status(KkoTalkStatusCd.getEnum(row.getStatus())) .status(row.getStatus())
.sentDt(row.getSentAt()) .sentDt(row.getSentAt())
.receivedDt(row.getReceivedAt()) .receivedDt(row.getReceivedAt())
// FIXME: 카카오톡 적용 필요 // FIXME: 카카오톡 적용 필요

@ -116,7 +116,7 @@ public class KkoTalkSender extends SendProcTemplate {
list.stream() list.stream()
.forEach(row -> { .forEach(row -> {
row.setStatus(KkoTalkStatusCd.SENT_FAIL.getCode()); row.setStatus(KkoTalkStatusCd.SENT_FAIL);
row.setError( row.setError(
FieldError.initBuilder() FieldError.initBuilder()
.errorCode(e.getErrCd().getCode()) .errorCode(e.getErrCd().getCode())
@ -130,7 +130,7 @@ public class KkoTalkSender extends SendProcTemplate {
list.stream() list.stream()
.forEach(row -> { .forEach(row -> {
row.setStatus(KkoTalkStatusCd.SENT_FAIL.getCode()); row.setStatus(KkoTalkStatusCd.SENT_FAIL);
row.setError( row.setError(
FieldError.initBuilder() FieldError.initBuilder()
.errorCode(EnsErrCd.SEND500.getCode()) .errorCode(EnsErrCd.SEND500.getCode())
@ -282,11 +282,11 @@ public class KkoTalkSender extends SendProcTemplate {
private void modifyTalkSendRsltByExtDocUuid(SendDetailKkoTalkDTO row, Map<String, KkoTalkApiRespVO> map) { private void modifyTalkSendRsltByExtDocUuid(SendDetailKkoTalkDTO row, Map<String, KkoTalkApiRespVO> map) {
KkoTalkApiRespVO apiRespVO = map.get(row.getExternalId()); KkoTalkApiRespVO apiRespVO = map.get(row.getExternalId());
if (CmmnUtil.isEmpty(apiRespVO.getErrorCode())) { if (CmmnUtil.isEmpty(apiRespVO.getErrorCode())) {
row.setStatus(KkoTalkStatusCd.SENT.getCode()); row.setStatus(KkoTalkStatusCd.SENT);
row.setEnvelopeId(String.valueOf(apiRespVO.getData())); row.setEnvelopeId(String.valueOf(apiRespVO.getData()));
row.setError(FieldError.initBuilder().build()); row.setError(FieldError.initBuilder().build());
} else { } else {
row.setStatus(KkoTalkStatusCd.valueOfEnum(apiRespVO.getErrorCode()).getCode()); row.setStatus(KkoTalkStatusCd.valueOfEnum(apiRespVO.getErrorCode()));
row.setError(FieldError.initBuilder() row.setError(FieldError.initBuilder()
.errorCode(EnsErrCd.SEND630.getCode()) .errorCode(EnsErrCd.SEND630.getCode())
.errorMessage(String.format("%s %s", apiRespVO.getErrorCode(), apiRespVO.getErrorMessage())) .errorMessage(String.format("%s %s", apiRespVO.getErrorCode(), apiRespVO.getErrorMessage()))

Loading…
Cancel
Save