fix: 코드 정리 및 comment 추가

main
Jonguk. Lim 2 months ago
parent b5d538baa9
commit ca60c92bf2

@ -1,12 +1,18 @@
package cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.repository; package cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.repository;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.Bill; import java.util.Optional;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import java.util.Optional; import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.Bill;
import io.lettuce.core.dynamic.annotation.Param;
/**
* Bill - ens_bill
* TODO: - Accept
*/
public interface BillRepository extends JpaRepository<Bill, Long> { public interface BillRepository extends JpaRepository<Bill, Long> {
@Query("select a from Bill a inner join a.orgMng where a.billUid = :billUid") @Query("select a from Bill a inner join a.orgMng where a.billUid = :billUid")

@ -1,12 +1,17 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
/**
* Send details - ens_intgrn_snd_dtl
* TODO: - Accept
*/
public interface IntgrnSendDetailRepository extends JpaRepository<IntgrnSendDetail, Long>, IntgrnSendDetailRepositoryCustom { public interface IntgrnSendDetailRepository extends JpaRepository<IntgrnSendDetail, Long>, IntgrnSendDetailRepositoryCustom {
List<IntgrnSendDetail> findAllByIntgrnSendMast(IntgrnSendMast intgrnSendMast); List<IntgrnSendDetail> findAllByIntgrnSendMast(IntgrnSendMast intgrnSendMast);

@ -1,13 +1,18 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;
import cokr.xit.ens.modules.common.code.StatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.TryStatCd;
import org.springframework.data.jpa.repository.JpaRepository;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
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.IntgrnSendMast;
/**
* Send master - ens_intgrn_snd_dtl
* TODO: - Accept
*/
public interface IntgrnSendMastRepository extends JpaRepository<IntgrnSendMast, Long>, IntgrnSendMastRepositoryCustom { public interface IntgrnSendMastRepository extends JpaRepository<IntgrnSendMast, Long>, IntgrnSendMastRepositoryCustom {
List<IntgrnSendMast> findAllByIntSendMastIdIn(List<Long> sendMastIds); List<IntgrnSendMast> findAllByIntSendMastIdIn(List<Long> sendMastIds);

@ -1,5 +1,16 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import cokr.xit.ens.core.aop.EnsResponseVO; import cokr.xit.ens.core.aop.EnsResponseVO;
import cokr.xit.ens.core.exception.EnsException; import cokr.xit.ens.core.exception.EnsException;
import cokr.xit.ens.core.exception.code.EnsErrCd; import cokr.xit.ens.core.exception.code.EnsErrCd;
@ -9,18 +20,16 @@ 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.IntgrnSendDetailRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendMastRepository; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendMastRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.IntgrnNotiAcceptReqDTO; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.IntgrnNotiAcceptReqDTO;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.*; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.IntgrnNotiAcceptor;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.IntgrnNotiMaker;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.IntgrnNotiRsltFetcher;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.IntgrnNotiRsltProvider;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.IntgrnNotiSender;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import lombok.val;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
// TODO: 전자고지 서비스
@Slf4j @Slf4j
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@ -44,8 +53,8 @@ public class IntgrnNotiService {
* @return * @return
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO accept(IntgrnNotiAcceptReqDTO reqDTO) { public EnsResponseVO<?> accept(IntgrnNotiAcceptReqDTO reqDTO) {
EnsResponseVO responseVO = null; EnsResponseVO<?> responseVO = null;
try { try {
responseVO = intgrnSendAcceptor.statBegin(reqDTO); responseVO = intgrnSendAcceptor.statBegin(reqDTO);
if (!EnsErrCd.OK.equals(responseVO.getErrCode())) if (!EnsErrCd.OK.equals(responseVO.getErrCode()))
@ -70,7 +79,7 @@ public class IntgrnNotiService {
* @return * @return
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO remake(Long intSendMastId) { public EnsResponseVO<?> remake(Long intSendMastId) {
try { try {
IntgrnSendMast sendMast = intgrnSendMastRepository.findById(intSendMastId) IntgrnSendMast sendMast = intgrnSendMastRepository.findById(intSendMastId)
.orElseThrow(() -> new EnsException(EnsErrCd.MAKE404, "일치하는 자료가 없습니다.")); .orElseThrow(() -> new EnsException(EnsErrCd.MAKE404, "일치하는 자료가 없습니다."));
@ -84,7 +93,7 @@ public class IntgrnNotiService {
.build(); .build();
} }
intgrnNotiMaker.statReady(Arrays.asList(intSendMastId)); intgrnNotiMaker.statReady(Collections.singletonList(intSendMastId));
return this.make(intSendMastId); return this.make(intSendMastId);
@ -96,12 +105,12 @@ public class IntgrnNotiService {
* @return * @return
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO makeAll() { public EnsResponseVO<?> makeAll() {
List<Long> sendMastIds = intgrnSendMastRepository.findAllByStatCdIn(Arrays.asList(StatCd.accept)) List<Long> sendMastIds = intgrnSendMastRepository.findAllByStatCdIn(Arrays.asList(StatCd.accept))
.stream() .stream()
.map(row -> row.getIntSendMastId()) .map(row -> row.getIntSendMastId())
.collect(Collectors.toList()); .collect(Collectors.toList());
if (sendMastIds.size() < 1) if (sendMastIds.isEmpty())
return EnsResponseVO.errBuilder() return EnsResponseVO.errBuilder()
.errCode(EnsErrCd.MAKE404) .errCode(EnsErrCd.MAKE404)
.errMsg("\"접수(accept)\" 상태인 자료가 없습니다") .errMsg("\"접수(accept)\" 상태인 자료가 없습니다")
@ -109,15 +118,15 @@ public class IntgrnNotiService {
intgrnNotiMaker.statReady(sendMastIds); intgrnNotiMaker.statReady(sendMastIds);
List<EnsResponseVO> resultInfo = sendMastIds.stream() val resultInfo = sendMastIds.stream()
.map(intSendMastId -> this.make(intSendMastId)) .map(this::make)
.collect(Collectors.toList()); .collect(Collectors.toList());
return EnsResponseVO.okBuilder().resultInfo(resultInfo).build(); return EnsResponseVO.okBuilder().resultInfo(resultInfo).build();
} }
private EnsResponseVO make(Long intSendMastId) { private EnsResponseVO<?> make(Long intSendMastId) {
EnsResponseVO responseVO = intgrnNotiMaker.statBegin(intSendMastId); EnsResponseVO<?> responseVO = intgrnNotiMaker.statBegin(intSendMastId);
if (!EnsErrCd.OK.equals(responseVO.getErrCode())) if (!EnsErrCd.OK.equals(responseVO.getErrCode()))
return responseVO; return responseVO;
@ -159,10 +168,10 @@ public class IntgrnNotiService {
* @return * @return
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO sendBulk(Long intSendMastId) { public EnsResponseVO<?> sendBulk(Long intSendMastId) {
try { try {
if (intgrnSendDetailRepository.findAllBySendTargetAndSendMast(IntgrnSendMast.builder().intSendMastId(intSendMastId).build()).size() < 1) if (intgrnSendDetailRepository.findAllBySendTargetAndSendMast(IntgrnSendMast.builder().intSendMastId(intSendMastId).build()).isEmpty())
throw new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없거나 전송 가능한 상태의 자료가 없습니다. (1회차:상태=makeok&try상태=stby&dtl상태=MAKING, 2~3회차:try상태:ok/fail&발송일시=기한경과&dtl상태=실패(ACPT_FAIL/FAIL/...)"); throw new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없거나 전송 가능한 상태의 자료가 없습니다. (1회차:상태=makeok&try상태=stby&dtl상태=MAKING, 2~3회차:try상태:ok/fail&발송일시=기한경과&dtl상태=실패(ACPT_FAIL/FAIL/...)");
} catch (EnsException e) { } catch (EnsException e) {
return EnsResponseVO.errBuilder() return EnsResponseVO.errBuilder()
@ -171,7 +180,7 @@ public class IntgrnNotiService {
.build(); .build();
} }
List<Long> sendMastIds = Arrays.asList(intSendMastId); List<Long> sendMastIds = Collections.singletonList(intSendMastId);
return this.send(sendMastIds); return this.send(sendMastIds);
@ -181,10 +190,10 @@ public class IntgrnNotiService {
* () - * () -
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO sendBulkAll() { public EnsResponseVO<?> sendBulkAll() {
List<Long> intSendMastIds = intgrnSendDetailRepository.findIntSendMastIdsBySendTarget(); List<Long> intSendMastIds = intgrnSendDetailRepository.findIntSendMastIdsBySendTarget();
if (intSendMastIds.size() < 1) if (intSendMastIds.isEmpty())
return EnsResponseVO.errBuilder() return EnsResponseVO.errBuilder()
.errCode(EnsErrCd.SEND404) .errCode(EnsErrCd.SEND404)
.errMsg("전송 타깃 데이터가 없습니다.") .errMsg("전송 타깃 데이터가 없습니다.")
@ -193,14 +202,11 @@ public class IntgrnNotiService {
return this.send(intSendMastIds); return this.send(intSendMastIds);
} }
private EnsResponseVO send(List<Long> intSendMastIds) { private EnsResponseVO<?> send(List<Long> intSendMastIds) {
List<EnsResponseVO> resultInfo = intSendMastIds.stream() val resultInfo = intSendMastIds.stream()
.map(intSendMastId -> { .peek(intgrnNotiSender::statBegin)
intgrnNotiSender.statBegin(intSendMastId); .map(intgrnNotiSender::execute)
return intSendMastId; .collect(Collectors.toList());
})
.map(intSendMastId -> intgrnNotiSender.execute(intSendMastId))
.collect(Collectors.toList());
return EnsResponseVO.okBuilder().resultInfo(resultInfo).build(); return EnsResponseVO.okBuilder().resultInfo(resultInfo).build();
@ -211,18 +217,18 @@ public class IntgrnNotiService {
* (/) * (/)
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO statBulk(Long intSendMastId) { public EnsResponseVO<?> statBulk(Long intSendMastId) {
IntgrnSendMast intgrnSendMast = null; IntgrnSendMast intgrnSendMast = null;
try { try {
intgrnSendMast = intgrnSendMastRepository.findById(intSendMastId) intgrnSendMast = intgrnSendMastRepository.findById(intSendMastId)
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("[ intSendMastId %s ]와 일치하는 자료가 없습니다.", intSendMastId))); .orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("[ intSendMastId %s ]와 일치하는 자료가 없습니다.", intSendMastId)));
int validCnt = 0; int validCnt = 0;
IntgrnSendMast finalIntgrnSendMast = intgrnSendMast; IntgrnSendMast finalIntgrnSendMast = intgrnSendMast;
if (!Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open).stream() if (Stream.of(StatCd.sendok, StatCd.sendcmplt, StatCd.open)
.anyMatch(statCd -> statCd.equals(finalIntgrnSendMast.getStatCd()))) .noneMatch(statCd -> statCd.equals(finalIntgrnSendMast.getStatCd())))
validCnt++; validCnt++;
if (!Arrays.asList(TryStatCd.sndRsrv, TryStatCd.sndRtme).stream() if (Stream.of(TryStatCd.sndRsrv, TryStatCd.sndRtme)
.anyMatch(statCd -> statCd.equals(finalIntgrnSendMast.getTryStatCd()))) .noneMatch(statCd -> statCd.equals(finalIntgrnSendMast.getTryStatCd())))
validCnt++; validCnt++;
if (validCnt == 2) if (validCnt == 2)
throw new EnsException(EnsErrCd.RSLT404, "\"진행상태\"가 전송성공/전송완료/열람중(sendok/sendcmplt/open) 또는 \"현재 회차상태\"가 예약전송/실시간전송(sndRsrv/sndRtme) 상태가 아닙니다."); throw new EnsException(EnsErrCd.RSLT404, "\"진행상태\"가 전송성공/전송완료/열람중(sendok/sendcmplt/open) 또는 \"현재 회차상태\"가 예약전송/실시간전송(sndRsrv/sndRtme) 상태가 아닙니다.");
@ -233,17 +239,17 @@ public class IntgrnNotiService {
.build(); .build();
} }
return this.stat(Arrays.asList(intgrnSendMast)); return this.stat(Collections.singletonList(intgrnSendMast));
} }
/** /**
* (/) * (/)
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO statBulkAll() { public EnsResponseVO<?> statBulkAll() {
// List<IntgrnSendMast> intgrnSendMasts = intgrnSendMastRepository.findAllByStatCdIn(Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open)); // List<IntgrnSendMast> intgrnSendMasts = intgrnSendMastRepository.findAllByStatCdIn(Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open));
List<IntgrnSendMast> intgrnSendMasts = intgrnSendMastRepository.findAllByStatCdInOrTryStatCdIn(Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open), Arrays.asList(TryStatCd.sndRsrv, TryStatCd.sndRtme)); List<IntgrnSendMast> intgrnSendMasts = intgrnSendMastRepository.findAllByStatCdInOrTryStatCdIn(Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open), Arrays.asList(TryStatCd.sndRsrv, TryStatCd.sndRtme));
if (intgrnSendMasts.size() < 1) if (intgrnSendMasts.isEmpty())
return EnsResponseVO.errBuilder() return EnsResponseVO.errBuilder()
.errCode(EnsErrCd.RSLT404) .errCode(EnsErrCd.RSLT404)
// .errMsg("\"전송성공/전송완료/열람중(sendok/sendcmplt/open)\" 상태인 자료가 없습니다") // .errMsg("\"전송성공/전송완료/열람중(sendok/sendcmplt/open)\" 상태인 자료가 없습니다")
@ -253,10 +259,10 @@ public class IntgrnNotiService {
return this.stat(intgrnSendMasts); return this.stat(intgrnSendMasts);
} }
private EnsResponseVO stat(List<IntgrnSendMast> intgrnSendMasts) { private EnsResponseVO<?> stat(List<IntgrnSendMast> intgrnSendMasts) {
List<EnsResponseVO> resultInfo = intgrnSendMasts.stream() val resultInfo = intgrnSendMasts.stream()
.map(data -> intgrnNotiRsltFetcher.execute(data.getIntSendMastId())) .map(data -> intgrnNotiRsltFetcher.execute(data.getIntSendMastId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
return EnsResponseVO.okBuilder().resultInfo(resultInfo).build(); return EnsResponseVO.okBuilder().resultInfo(resultInfo).build();
} }
@ -268,7 +274,7 @@ public class IntgrnNotiService {
* @return * @return
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO sendResultProvide(Long intSendMastId) { public EnsResponseVO<?> sendResultProvide(Long intSendMastId) {
return intgrnNotiRsltProvider.execute(intSendMastId); return intgrnNotiRsltProvider.execute(intSendMastId);
} }

@ -1,5 +1,14 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import cokr.xit.ens.core.aop.EnsResponseVO; import cokr.xit.ens.core.aop.EnsResponseVO;
import cokr.xit.ens.core.exception.EnsException; import cokr.xit.ens.core.exception.EnsException;
import cokr.xit.ens.core.exception.code.EnsErrCd; import cokr.xit.ens.core.exception.code.EnsErrCd;
@ -20,15 +29,8 @@ import cokr.xit.ens.modules.common.domain.support.FieldError;
import cokr.xit.ens.modules.common.monitor.MessageByPhase; import cokr.xit.ens.modules.common.monitor.MessageByPhase;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
// TODO: Make
@Slf4j @Slf4j
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor

@ -1,5 +1,13 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;
import java.util.Arrays;
import java.util.List;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import cokr.xit.ens.core.aop.EnsResponseVO; import cokr.xit.ens.core.aop.EnsResponseVO;
import cokr.xit.ens.core.exception.EnsException; import cokr.xit.ens.core.exception.EnsException;
import cokr.xit.ens.core.exception.code.EnsErrCd; import cokr.xit.ens.core.exception.code.EnsErrCd;
@ -13,14 +21,8 @@ import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendD
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendMastRepository; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendMastRepository;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
// TODO: Send
@Slf4j @Slf4j
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor
@ -76,18 +78,18 @@ public class IntgrnNotiSender extends SendProcTemplate {
intgrnSendMast = intgrnSendMastRepository.findById(intSendMastId).orElseThrow(() -> new EnsException(EnsErrCd.SEND404, String.format("일치하는 발송마스터 자료가 없습니다. [ intSendMastId %s ]", intSendMastId))); intgrnSendMast = intgrnSendMastRepository.findById(intSendMastId).orElseThrow(() -> new EnsException(EnsErrCd.SEND404, String.format("일치하는 발송마스터 자료가 없습니다. [ intSendMastId %s ]", intSendMastId)));
intgrnSendDetails = intgrnSendDetailRepository.findAllBySendTargetAndSendMastAndTryStatCdIn(intgrnSendMast, Arrays.asList(TryStatCd.start)); intgrnSendDetails = intgrnSendDetailRepository.findAllBySendTargetAndSendMastAndTryStatCdIn(intgrnSendMast, Arrays.asList(TryStatCd.start));
if (intgrnSendDetails.size() < 1) if (intgrnSendDetails.isEmpty())
throw new EnsException(EnsErrCd.SEND500, "조회된 발송상세 자료가 없음."); throw new EnsException(EnsErrCd.SEND500, "조회된 발송상세 자료가 없음.");
PostSeCd postSeCd = null; PostSeCd postSeCd = null;
final int currentTryNum = intgrnSendMast.getTrySeq() + 1; final int currentTryNum = intgrnSendMast.getTrySeq() + 1;
final boolean isReserve = currentTryNum == 1 ? true : false; final boolean isReserve = currentTryNum == 1;
final TryStatCd tryStatCd = currentTryNum == 1 ? TryStatCd.sndRsrv : TryStatCd.sndRtme; final TryStatCd tryStatCd = currentTryNum == 1 ? TryStatCd.sndRsrv : TryStatCd.sndRtme;
if (currentTryNum == 1) postSeCd = intgrnSendMast.getTry1(); if (currentTryNum == 1) postSeCd = intgrnSendMast.getTry1();
else if (currentTryNum == 2) postSeCd = intgrnSendMast.getTry2(); else if (currentTryNum == 2) postSeCd = intgrnSendMast.getTry2();
else if (currentTryNum == 3) postSeCd = intgrnSendMast.getTry3(); else if (currentTryNum == 3) postSeCd = intgrnSendMast.getTry3();
AcceptDataFactory makerFactory = new AcceptDataMakerFactory(intgrnSendMast, intgrnSendDetails, isReserve); AcceptDataFactory<AcceptData<?>> makerFactory = new AcceptDataMakerFactory(intgrnSendMast, intgrnSendDetails, isReserve);
applicationEventPublisher.publishEvent(makerFactory.get(postSeCd)); applicationEventPublisher.publishEvent(makerFactory.get(postSeCd));

@ -1,4 +1,7 @@
mybatis: mybatis:
mapper-locations: mybatis-mapper/**/*.xml config-location: classpath:mybatis-mapper/mybatis-config.xml
configuration: mapper-locations:
map-underscore-to-camel-case: true - classpath:mybatis-mapper/**/*Mapper.xml
- classpath:mybatis-mapper/**/*-mapper.xml
# configuration:
# map-underscore-to-camel-case: true

Loading…
Cancel
Save