fix: PostSeCd kkoTalk 으로 변경

main
kjh 2 months ago
parent 64b9d1e55a
commit 5bd23444bd

@ -82,7 +82,7 @@ public class KkoTalkService {
SendMast sendMast = sendMastRepository.findById(sendMastId) SendMast sendMast = sendMastRepository.findById(sendMastId)
.orElseThrow(() -> new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없습니다.")); .orElseThrow(() -> new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없습니다."));
if (!PostSeCd.kkoTalk.equals(sendMast.getPostSe())) if (!PostSeCd.kkoTalk.equals(sendMast.getPostSe()))
throw new EnsException(EnsErrCd.SEND404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoMydoc.getCodeNm())); throw new EnsException(EnsErrCd.SEND404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoTalk.getCodeNm()));
if (!(StatCd.accept.equals(sendMast.getStatCd()) if (!(StatCd.accept.equals(sendMast.getStatCd())
|| StatCd.makefail.equals(sendMast.getStatCd()))) || StatCd.makefail.equals(sendMast.getStatCd())))
throw new EnsException(EnsErrCd.SEND404, "접수/제작실패(accept/makefail) 단계가 아닙니다."); throw new EnsException(EnsErrCd.SEND404, "접수/제작실패(accept/makefail) 단계가 아닙니다.");
@ -106,7 +106,7 @@ public class KkoTalkService {
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO<?> makeAll() { public EnsResponseVO<?> makeAll() {
List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdIn(PostSeCd.kkoMydoc, Arrays.asList(StatCd.accept)) List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdIn(PostSeCd.kkoTalk, Arrays.asList(StatCd.accept))
.stream() .stream()
.map(row -> row.getSendMastId()) .map(row -> row.getSendMastId())
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -175,8 +175,8 @@ public class KkoTalkService {
try { try {
SendMast sendMast = sendMastRepository.findById(sendMastId) SendMast sendMast = sendMastRepository.findById(sendMastId)
.orElseThrow(() -> new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없습니다.")); .orElseThrow(() -> new EnsException(EnsErrCd.SEND404, "일치하는 자료가 없습니다."));
if (!PostSeCd.kkoMydoc.equals(sendMast.getPostSe())) if (!PostSeCd.kkoTalk.equals(sendMast.getPostSe()))
throw new EnsException(EnsErrCd.SEND404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoMydoc.getCodeNm())); throw new EnsException(EnsErrCd.SEND404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoTalk.getCodeNm()));
if (!StatCd.makeok.equals(sendMast.getStatCd())) if (!StatCd.makeok.equals(sendMast.getStatCd()))
throw new EnsException(EnsErrCd.SEND404, "제작성공(makeok) 단계가 아닙니다."); throw new EnsException(EnsErrCd.SEND404, "제작성공(makeok) 단계가 아닙니다.");
} catch (EnsException e) { } catch (EnsException e) {
@ -201,7 +201,7 @@ public class KkoTalkService {
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO<?> sendBulkAll() { public EnsResponseVO<?> sendBulkAll() {
List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdInAndSendDtBefore(PostSeCd.kkoMydoc, Arrays.asList(StatCd.makeok), LocalDateTime.now()) List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdInAndSendDtBefore(PostSeCd.kkoTalk, Arrays.asList(StatCd.makeok), LocalDateTime.now())
.stream() .stream()
.map(row -> row.getSendMastId()) .map(row -> row.getSendMastId())
.collect(Collectors.toList()); .collect(Collectors.toList());

Loading…
Cancel
Save