fix: PostSeCd kkoTalk 으로 변경

main
kjh 2 months ago
parent 64b9d1e55a
commit 5bd23444bd

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

Loading…
Cancel
Save