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

main
Jonguk. Lim 2 months ago
parent 650b49b81c
commit bae3ec5083

@ -1,31 +1,29 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.code.IntgrnDtlStatCd;
import cokr.xit.ens.modules.common.code.PostSeCd;
import cokr.xit.ens.modules.common.code.StatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.TryStatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QIntgrnSendMast;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.IntgrnDetailStatVO;
import cokr.xit.ens.modules.common.domain.SendMast;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Projections;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;
import java.time.LocalDateTime;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QIntgrnSendDetail.*;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QIntgrnSendMast.*;
import static cokr.xit.ens.modules.common.domain.QSendMast.*;
import static cokr.xit.ens.modules.kkoalimtalk.domain.QSendDetailKkoAlimtalk.*;
import static cokr.xit.ens.modules.kkomydoc.domain.QSendDetailKkoMydoc.*;
import static cokr.xit.ens.modules.kkotalk.domain.QSendDetailKkoTalk.*;
import static cokr.xit.ens.modules.ktsigntalk.direct.domain.QSendDetailKtSigntalk.*;
import static cokr.xit.ens.modules.ktsigntalk.gibis.domain.QSendDetailKtGibis.*;
import static cokr.xit.ens.modules.nvsigntalk.domain.QSendDetailNvSigntalk.*;
import java.time.*;
import java.util.*;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QIntgrnSendDetail.intgrnSendDetail;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QIntgrnSendMast.intgrnSendMast;
import static cokr.xit.ens.modules.common.domain.QSendMast.sendMast;
import static cokr.xit.ens.modules.kkoalimtalk.domain.QSendDetailKkoAlimtalk.sendDetailKkoAlimtalk;
import static cokr.xit.ens.modules.kkomydoc.domain.QSendDetailKkoMydoc.sendDetailKkoMydoc;
import static cokr.xit.ens.modules.ktsigntalk.direct.domain.QSendDetailKtSigntalk.sendDetailKtSigntalk;
import static cokr.xit.ens.modules.ktsigntalk.gibis.domain.QSendDetailKtGibis.sendDetailKtGibis;
import static cokr.xit.ens.modules.nvsigntalk.domain.QSendDetailNvSigntalk.sendDetailNvSigntalk;
import com.querydsl.core.*;
import com.querydsl.core.types.*;
import com.querydsl.jpa.impl.*;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.*;
import cokr.xit.ens.modules.common.domain.*;
import lombok.*;
@RequiredArgsConstructor
public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositoryCustom {
@ -49,10 +47,15 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
@Override
public void modifyDetailStatCdByIntgrnDetailStatVO(List<IntgrnDetailStatVO> list) {
list.forEach(data ->
list.forEach(data -> {
// FIXME: 카카오톡 추가 : null 처리
IntgrnDtlStatCd intgrnDtlStatCd = CmmnUtil.isEmpty(data.getCurStatCd()) ?
IntgrnDtlStatCd.UNKNOWN :
(IntgrnDtlStatCd.ACPT_CMPLT.equals(data.getCurStatCd().getIntgrnDtlStatCd()) ?
(CmmnUtil.isEmpty(data.getMastErrorCode()) ? data.getCurStatCd().getIntgrnDtlStatCd() : IntgrnDtlStatCd.FAIL)
: data.getCurStatCd().getIntgrnDtlStatCd());
query.update(intgrnSendDetail)
.set(intgrnSendDetail.curStatCd, IntgrnDtlStatCd.ACPT_CMPLT.equals(data.getCurStatCd().getIntgrnDtlStatCd()) ? (CmmnUtil.isEmpty(data.getMastErrorCode()) ? data.getCurStatCd().getIntgrnDtlStatCd() : IntgrnDtlStatCd.FAIL) : data.getCurStatCd().getIntgrnDtlStatCd())
.set(intgrnSendDetail.curStatCd, intgrnDtlStatCd)
.set(intgrnSendDetail.docSentDt, data.getDocSentDt())
.set(intgrnSendDetail.docReceivedDt, data.getDocReceivedDt())
.set(intgrnSendDetail.docAuthFrstDt, data.getDocAuthFrstDt())
@ -62,7 +65,8 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
.set(intgrnSendDetail.error.errorCode, data.getMastErrorCode() == null && data.getErrorCode() == null ? null : String.format("[M]%s. [D]%s", data.getMastErrorCode(), data.getErrorCode()))
.set(intgrnSendDetail.error.errorMessage, data.getMastErrorCode() == null && data.getErrorCode() == null ? null : String.format("[M]%s. [D]%s", data.getMastErrorMessage(), data.getErrorMessage()))
.where(intgrnSendDetail.intSendDetailId.eq(data.getIntSendDetailId()))
.execute()
.execute();
}
);
}
@ -121,6 +125,32 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
)
.fetch());
// FIXME: 카카오톡 추가
list.addAll(query.select(Projections.fields(IntgrnDetailStatVO.class
, intgrnSendDetail.intSendDetailId
, intgrnSendDetail.linkedUuid
, intgrnSendDetail.curPostSe
, sendDetailKkoTalk.status.as("status")
, sendDetailKkoTalk.sentAt.as("sentAt")
, sendDetailKkoTalk.receivedAt.as("receivedAt")
, sendDetailKkoTalk.authenticatedAt.as("authenticatedAt")
, sendDetailKkoTalk.ottVerifiedAt.as("ottVerifiedAt")
, sendDetailKkoTalk.readAt.as("readAt")
, sendDetailKkoTalk.userNotifiedAt.as("userNotifiedAt")
, sendDetailKkoTalk.error.errorCode
, sendDetailKkoTalk.error.errorMessage
, sendMast.error.errorCode.as("mastErrorCode")
, sendMast.error.errorMessage.as("mastErrorMessage")
))
.from(intgrnSendDetail)
.innerJoin(sendDetailKkoTalk).on(sendDetailKkoTalk.sendDetailId.eq(intgrnSendDetail.sendDetailIdKkoTalk))
.innerJoin(sendDetailKkoTalk.sendMast, sendMast)
.where(
intgrnSendDetail.curPostSe.eq(PostSeCd.kkoTalk)
.and(intgrnSendDetail.intgrnSendMast.intSendMastId.eq(intSendMastId))
)
.fetch());
list.addAll(query.select(Projections.fields(IntgrnDetailStatVO.class
, intgrnSendDetail.intSendDetailId
, intgrnSendDetail.linkedUuid
@ -236,6 +266,8 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
public Optional<IntgrnSendDetail> findByDocUuidAndLinkedUuid(String docUuid, String linkedUuid) {
List<Long> intSendDetailIds = new ArrayList<>();
intSendDetailIds.addAll(findIntSendDetailIdsByKkoMydoc(docUuid, linkedUuid));
// FIXME: 카카오톡 추가
intSendDetailIds.addAll(findIntSendDetailIdsByKkoTalk(docUuid, linkedUuid));
intSendDetailIds.addAll(findIntSendDetailIdsByNvSigntalk(docUuid, linkedUuid));
intSendDetailIds.addAll(findIntSendDetailIdsByKtSigntalk(docUuid, linkedUuid));
intSendDetailIds.addAll(findIntSendDetailIdsByKtGibis(docUuid, linkedUuid));
@ -247,6 +279,8 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
@Override
public PostSeCd findPostSeByDocUuidAndLinkedUuid(String docUuid, String linkedUuid) {
if (findIntSendDetailIdsByKkoMydoc(docUuid, linkedUuid).size() > 0) return PostSeCd.kkoMydoc;
// FIXME: 카카오톡 추가
if (findIntSendDetailIdsByKkoTalk(docUuid, linkedUuid).size() > 0) return PostSeCd.kkoTalk;
if (findIntSendDetailIdsByNvSigntalk(docUuid, linkedUuid).size() > 0) return PostSeCd.nvSigntalk;
if (findIntSendDetailIdsByKtSigntalk(docUuid, linkedUuid).size() > 0) return PostSeCd.ktSigntalk;
if (findIntSendDetailIdsByKtGibis(docUuid, linkedUuid).size() > 0) return PostSeCd.ktGibis;
@ -267,6 +301,15 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
.groupBy(intgrnSendDetail.intgrnSendMast.intSendMastId)
.fetchOne());
// FIXME: 카카오톡 추가
if (PostSeCd.kkoTalk.equals(sendMastObj.getPostSe()))
return Optional.ofNullable(query.select(intgrnSendDetail.intgrnSendMast.intSendMastId)
.from(intgrnSendDetail)
.innerJoin(sendDetailKkoTalk).on(intgrnSendDetail.sendDetailIdKkoTalk.eq(sendDetailKkoTalk.sendDetailId))
.where(sendDetailKkoTalk.sendMast.sendMastId.eq(sendMastId))
.groupBy(intgrnSendDetail.intgrnSendMast.intSendMastId)
.fetchOne());
if (PostSeCd.kkoAlimtalk.equals(sendMastObj.getPostSe()))
return Optional.ofNullable(query.select(intgrnSendDetail.intgrnSendMast.intSendMastId)
.from(intgrnSendDetail)
@ -315,6 +358,20 @@ public class IntgrnSendDetailRepositoryImpl implements IntgrnSendDetailRepositor
.fetch();
}
// FIXME: 카카오톡 추가
private List<Long> findIntSendDetailIdsByKkoTalk(String docUuid, String linkedUuid) {
BooleanBuilder isMatched = new BooleanBuilder();
isMatched.and(sendDetailKkoTalk.envelopeId.eq(docUuid));
if (linkedUuid != null)
isMatched.and(intgrnSendDetail.linkedUuid.eq(linkedUuid));
return query.select(intgrnSendDetail.intSendDetailId)
.from(intgrnSendDetail)
.innerJoin(sendDetailKkoTalk).on(intgrnSendDetail.sendDetailIdKkoTalk.eq(sendDetailKkoTalk.sendDetailId))
.where(isMatched)
.fetch();
}
private List<Long> findIntSendDetailIdsByNvSigntalk(String docUuid, String linkedUuid) {
BooleanBuilder isMatched = new BooleanBuilder();
isMatched.and(sendDetailNvSigntalk.docId.eq(docUuid));

@ -1,31 +1,32 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.TmpltMngIntgrn;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.TmpltMngIntgrnDTO;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO;
import cokr.xit.ens.modules.kkoalimtalk.model.TmpltMngKkoAlimtalkDTO;
import cokr.xit.ens.modules.kkomydoc.model.TmpltMngKkoMydocDTO;
import cokr.xit.ens.modules.ktsigntalk.direct.model.TmpltMngKtSigntalkDTO;
import cokr.xit.ens.modules.ktsigntalk.gibis.model.TmpltMngKtGibisDTO;
import cokr.xit.ens.modules.nvsigntalk.model.TmpltMngNvSigntalkDTO;
import com.google.gson.Gson;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.QBean;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;
import java.util.List;
import java.util.Optional;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QTmpltMngIntgrn.tmpltMngIntgrn;
import static cokr.xit.ens.modules.common.ctgy.sys.mng.domain.QOrgMng.orgMng;
import static cokr.xit.ens.modules.kkoalimtalk.domain.QTmpltMngKkoAlimtalk.tmpltMngKkoAlimtalk;
import static cokr.xit.ens.modules.kkomydoc.domain.QTmpltMngKkoMydoc.tmpltMngKkoMydoc;
import static cokr.xit.ens.modules.ktsigntalk.direct.domain.QTmpltMngKtSigntalk.tmpltMngKtSigntalk;
import static cokr.xit.ens.modules.ktsigntalk.gibis.domain.QTmpltMngKtGibis.tmpltMngKtGibis;
import static cokr.xit.ens.modules.nvsigntalk.domain.QTmpltMngNvSigntalk.tmpltMngNvSigntalk;
import static cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.QTmpltMngIntgrn.*;
import static cokr.xit.ens.modules.common.ctgy.sys.mng.domain.QOrgMng.*;
import static cokr.xit.ens.modules.kkoalimtalk.domain.QTmpltMngKkoAlimtalk.*;
import static cokr.xit.ens.modules.kkomydoc.domain.QTmpltMngKkoMydoc.*;
import static cokr.xit.ens.modules.kkotalk.domain.QTmpltMngKkoTalk.*;
import static cokr.xit.ens.modules.ktsigntalk.direct.domain.QTmpltMngKtSigntalk.*;
import static cokr.xit.ens.modules.ktsigntalk.gibis.domain.QTmpltMngKtGibis.*;
import static cokr.xit.ens.modules.nvsigntalk.domain.QTmpltMngNvSigntalk.*;
import java.util.*;
import com.google.gson.*;
import com.querydsl.core.*;
import com.querydsl.core.types.*;
import com.querydsl.jpa.impl.*;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
import cokr.xit.ens.modules.kkoalimtalk.model.*;
import cokr.xit.ens.modules.kkomydoc.model.*;
import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.ktsigntalk.direct.model.*;
import cokr.xit.ens.modules.ktsigntalk.gibis.model.*;
import cokr.xit.ens.modules.nvsigntalk.model.*;
import lombok.*;
@RequiredArgsConstructor
public class TmpltMngIntgrnRepositoryImpl implements TmpltMngIntgrnRepositoryCustom {
@ -55,6 +56,8 @@ public class TmpltMngIntgrnRepositoryImpl implements TmpltMngIntgrnRepositoryCus
.from(tmpltMngIntgrn)
.leftJoin(tmpltMngKkoAlimtalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoAlimtalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoAlimtalk.tmpltCd)))
.leftJoin(tmpltMngKkoMydoc).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoMydoc.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoMydoc.tmpltCd)))
// FIXME: 카카오톡 추가
.leftJoin(tmpltMngKkoTalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoTalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoTalk.tmpltCd)))
.leftJoin(tmpltMngNvSigntalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngNvSigntalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngNvSigntalk.tmpltCd)))
.leftJoin(tmpltMngKtSigntalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKtSigntalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKtSigntalk.tmpltCd)))
.leftJoin(tmpltMngKtGibis).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKtGibis.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKtGibis.tmpltCd)))
@ -69,6 +72,8 @@ public class TmpltMngIntgrnRepositoryImpl implements TmpltMngIntgrnRepositoryCus
.from(tmpltMngIntgrn)
.leftJoin(tmpltMngKkoAlimtalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoAlimtalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoAlimtalk.tmpltCd)))
.leftJoin(tmpltMngKkoMydoc).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoMydoc.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoMydoc.tmpltCd)))
// FIXME: 카카오톡 추가
.leftJoin(tmpltMngKkoTalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKkoTalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKkoTalk.tmpltCd)))
.leftJoin(tmpltMngNvSigntalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngNvSigntalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngNvSigntalk.tmpltCd)))
.leftJoin(tmpltMngKtSigntalk).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKtSigntalk.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKtSigntalk.tmpltCd)))
.leftJoin(tmpltMngKtGibis).on(tmpltMngIntgrn.orgMng.orgCd.eq(tmpltMngKtGibis.orgMng.orgCd).and(tmpltMngIntgrn.tmpltCd.eq(tmpltMngKtGibis.tmpltCd)))
@ -102,6 +107,15 @@ public class TmpltMngIntgrnRepositoryImpl implements TmpltMngIntgrnRepositoryCus
, tmpltMngKkoMydoc.tmpltCsInfoUseYn
, tmpltMngKkoMydoc.pryMessage
).as("kkoMydoc")
// FIXME: 카카오톡 추가
, Projections.fields(TmpltMngKkoTalkDTO.class
, tmpltMngKkoTalk.csNumber
, tmpltMngKkoTalk.csName
, tmpltMngKkoTalk.ciTransUseYn
, tmpltMngKkoTalk.tmpltMsgUseYn
, tmpltMngKkoTalk.tmpltCsInfoUseYn
, tmpltMngKkoTalk.pryMessage
).as("kkoTalk")
, Projections.fields(TmpltMngNvSigntalkDTO.class
, tmpltMngNvSigntalk.callCenterNo
, tmpltMngNvSigntalk.ciTransUseYn

@ -1,29 +1,23 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;
import cokr.xit.ens.core.aop.EnsResponseVO;
import cokr.xit.ens.core.exception.EnsException;
import cokr.xit.ens.core.exception.code.EnsErrCd;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.biztmplt.ResultProcTemplate;
import cokr.xit.ens.modules.common.code.IntgrnDtlStatCd;
import cokr.xit.ens.modules.common.code.PostSeCd;
import cokr.xit.ens.modules.common.code.StatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.TryStatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendDetailRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendMastRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.IntgrnDetailStatVO;
import cokr.xit.ens.modules.common.domain.support.FieldError;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import org.springframework.stereotype.*;
import org.springframework.transaction.annotation.*;
import cokr.xit.ens.core.aop.*;
import cokr.xit.ens.core.exception.*;
import cokr.xit.ens.core.exception.code.*;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.biztmplt.*;
import cokr.xit.ens.modules.common.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.*;
import cokr.xit.ens.modules.common.domain.support.*;
import lombok.*;
import lombok.extern.slf4j.*;
@Slf4j
@Component
@ -55,7 +49,7 @@ public class IntgrnNotiRsltFetcher extends ResultProcTemplate {
intgrnSendDetailRepository.modifyDetailStatCdByIntgrnDetailStatVO(list);
sendDetails = intgrnSendDetailRepository.findAllByIntgrnSendMast(intgrnSendMast);
// FIXME: sendDetails가 null이 되는 경우 발생
respVO = EnsResponseVO.okBuilder().resultInfo(resultInfo).build();

@ -14,9 +14,9 @@ import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.*;
import cokr.xit.ens.modules.common.monitor.*;
import cokr.xit.ens.modules.kkomydoc.service.event.*;
import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.kkotalk.service.*;
import cokr.xit.ens.modules.kkotalk.service.event.*;
import lombok.*;
import lombok.extern.slf4j.*;
@ -55,13 +55,13 @@ public class AcceptByKkoTalkEventListener implements AcceptDataEventListener<Acc
if (ev.IsReserveSend()) {
KkoMydocSendReserveEvent event = KkoMydocSendReserveEvent.builder()
KkoTalkSendReserveEvent event = KkoTalkSendReserveEvent.builder()
.sendMastIds(Arrays.asList(sendMastId))
.build();
applicationEventPublisher.publishEvent(event);
} else {
KkoMydocSendRealtimeEvent event = KkoMydocSendRealtimeEvent.builder()
KkoTalkSendRealtimeEvent event = KkoTalkSendRealtimeEvent.builder()
.sendMastIds(Arrays.asList(sendMastId))
// .callback(() -> this.fetch(sendMastId, ev.getSendDetails()))
.build();

@ -1,28 +1,12 @@
package cokr.xit.ens.modules.kkotalk.domain;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.Bill;
import cokr.xit.ens.modules.common.domain.BaseEntity;
import cokr.xit.ens.modules.common.domain.SendMast;
import cokr.xit.ens.modules.common.domain.support.FieldError;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.*;
import cokr.xit.ens.modules.common.domain.*;
import cokr.xit.ens.modules.common.domain.support.*;
import lombok.*;
import lombok.experimental.*;
// FIXME: 카카오톡 신규 추가
@Entity
@ -83,7 +67,7 @@ public class SendDetailKkoTalk extends BaseEntity {
* default: false
* </pre>
*/
@Column(name = "is_notification_unavailable", nullable = true)
@Column(name = "use_non_personalized_noti", nullable = true)
private Boolean useNonPersonalizedNotification = false;
/**
@ -130,6 +114,32 @@ public class SendDetailKkoTalk extends BaseEntity {
@Column(name = "envelope_id", nullable = true)
private String envelopeId;
@Column(name = "status", nullable = true)
private String status;
@Column(name = "sent_at", nullable = true)
private String sentAt;
@Column(name = "received_at", nullable = true)
private String receivedAt;
@Column(name = "read_at", nullable = true)
private String readAt;
@Column(name = "authenticated_at", nullable = true)
private String authenticatedAt;
@Column(name = "ott_verified_at", nullable = true)
private String ottVerifiedAt;
@Column(name = "is_notification_unavailable", nullable = true)
private String isNotificationUnavailable;
@Column(name = "user_notified_at", nullable = true)
private String userNotifiedAt;
@Column(name = "distribution_received_at", nullable = true)
private String distributionReceivedAt;
@Embedded
@Setter

@ -1,19 +1,16 @@
package cokr.xit.ens.modules.kkotalk.model;
import java.time.LocalDateTime;
import java.util.List;
import java.time.*;
import java.util.*;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import javax.validation.*;
import javax.validation.constraints.*;
import cokr.xit.ens.core.model.EnsAcceptReqDTO;
import cokr.xit.ens.modules.kkotalk.model.config.Document;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import cokr.xit.ens.core.model.*;
import cokr.xit.ens.modules.kkotalk.model.config.*;
import io.swagger.v3.oas.annotations.media.*;
import lombok.*;
import lombok.experimental.*;
/**
* <pre>
@ -134,6 +131,15 @@ public class KkotalkDTO extends KkotalkApiDTO {
private String envelopeId;
private String link;
private String status;
private String sentAt;
private String receivedAt;
private String readAt;
private String authenticatedAt;
private String ottVerifiedAt;
private String isNotificationUnavailable;
private String userNotifiedAt;
private String distributionReceivedAt;
private Long sendDetailId;
private Long sendMastId;
private String errorCode;

@ -176,7 +176,7 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport<EnsResponseVO<?>, Kk
KkotalkDTO.SendDetailKkoTalkDTO sendDetail = KkotalkDTO.SendDetailKkoTalkDTO.builder()
.sendMastId(sendMast.getSendMastId())
.title(document.getTitle())
.link(document.getContent().getLink())
.link(document.getContent() != null? document.getContent().getLink(): null)
.hash(document.getHash())
.guide(document.getGuide())
.payload(document.getPayload())

@ -76,4 +76,31 @@
WHERE send_mast_id = #{sendMastId}
</select>
<select id="findAllBySendMastAndEnvlopeIdIsNotNull" parameterType="cokr.xit.ens.modules.common.domain.SendMast" resultType="cokr.xit.ens.modules.kkotalk.model.KkotalkDTO$SendDetailKkoTalkDTO">
/** iup-kkotalk-mapper|findAllBySendMastAndEnvlopeIdIsNotNull-카카오톡 발송 결과 대상?? 조회|julim */
SELECT send_detail_id,
title,
link,
hash,
guide,
payload,
read_expires_at,
review_expires_at,
use_non_personalized_noti AS useNonPersonalizedNotification,
ci,
phone_number,
name,
birthday,
external_id,
error_code,
error_message,
bill_uid,
send_mast_id,
regist_dt
FROM ens_snd_dtl_kko_talk
WHERE send_mast_id = #{sendMastId}
AND envelope_id IS NOT NULL
</select>
</mapper>

Loading…
Cancel
Save