From 902949f47618c4a4678a16557cca2ff3ab884902 Mon Sep 17 00:00:00 2001 From: dongkyeomjang Date: Fri, 6 Dec 2024 21:56:06 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20BugFix/#194=20-=20=EB=8C=93?= =?UTF-8?q?=EA=B8=80=20=EC=9E=91=EC=84=B1=EC=9E=90=EA=B0=80=20=EA=B8=80=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1=EC=9E=90=EB=A1=9C=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EB=90=98=EB=8D=98=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?#194?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/service/ProcessCompletedEventService.java | 3 ++- .../application/service/SignUpOwnerByDefaultService.java | 3 ++- .../dto/response/ReadCommentOverviewResponseDto.java | 4 ++-- .../suggestion/application/service/CreateBoardService.java | 4 ++-- .../application/service/ReadCommentOverviewService.java | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/daon/onjung/event/application/service/ProcessCompletedEventService.java b/src/main/java/com/daon/onjung/event/application/service/ProcessCompletedEventService.java index be58652..fbfc384 100644 --- a/src/main/java/com/daon/onjung/event/application/service/ProcessCompletedEventService.java +++ b/src/main/java/com/daon/onjung/event/application/service/ProcessCompletedEventService.java @@ -76,7 +76,8 @@ public void execute(Long eventId) { // 새로운 이벤트 생성 Event newEvent = eventService.createEvent( LocalDate.now(), - LocalDate.now().plusDays(13), +// LocalDate.now().plusDays(13), + LocalDate.now(), // 테스트용 당일 store ); newEvent = eventRepository.save(newEvent); diff --git a/src/main/java/com/daon/onjung/security/application/service/SignUpOwnerByDefaultService.java b/src/main/java/com/daon/onjung/security/application/service/SignUpOwnerByDefaultService.java index 7d9ccbf..7172c93 100644 --- a/src/main/java/com/daon/onjung/security/application/service/SignUpOwnerByDefaultService.java +++ b/src/main/java/com/daon/onjung/security/application/service/SignUpOwnerByDefaultService.java @@ -96,7 +96,8 @@ public void execute(MultipartFile logo, // 생성한 가게에 대한 이벤트 생성 Event event = eventService.createEvent( LocalDate.now(), - LocalDate.now().plusDays(13), +// LocalDate.now().plusDays(13), + LocalDate.now(), // 테스트용. 당일 store ); event = eventRepository.save(event); diff --git a/src/main/java/com/daon/onjung/suggestion/application/dto/response/ReadCommentOverviewResponseDto.java b/src/main/java/com/daon/onjung/suggestion/application/dto/response/ReadCommentOverviewResponseDto.java index 4c321d3..6492947 100644 --- a/src/main/java/com/daon/onjung/suggestion/application/dto/response/ReadCommentOverviewResponseDto.java +++ b/src/main/java/com/daon/onjung/suggestion/application/dto/response/ReadCommentOverviewResponseDto.java @@ -119,9 +119,9 @@ public static CommentInfoDto fromEntity(Comment comment) { } } - public static ReadCommentOverviewResponseDto.CommentDto of(Comment comment, User user, Boolean isMe) { + public static ReadCommentOverviewResponseDto.CommentDto of(Comment comment, Boolean isMe) { return ReadCommentOverviewResponseDto.CommentDto.builder() - .writerInfo(ReadCommentOverviewResponseDto.CommentDto.WriterInfoDto.of(user, isMe)) + .writerInfo(ReadCommentOverviewResponseDto.CommentDto.WriterInfoDto.of(comment.getUser(), isMe)) .commentInfo(ReadCommentOverviewResponseDto.CommentDto.CommentInfoDto.fromEntity(comment)) .build(); } diff --git a/src/main/java/com/daon/onjung/suggestion/application/service/CreateBoardService.java b/src/main/java/com/daon/onjung/suggestion/application/service/CreateBoardService.java index 8b36bfd..4cc9ed0 100644 --- a/src/main/java/com/daon/onjung/suggestion/application/service/CreateBoardService.java +++ b/src/main/java/com/daon/onjung/suggestion/application/service/CreateBoardService.java @@ -61,8 +61,8 @@ public CreateBoardResponseDto execute(UUID accountId, MultipartFile file, Create applicationEventPublisher.publishEvent( scheduledBoardJobService.createScheduledJob( board.getId(), -// board.getEndDate().plusDays(1).atStartOfDay() - LocalDateTime.now().plusMinutes(1) // 테스트용 1분 뒤 + board.getEndDate().plusDays(1).atStartOfDay() +// LocalDateTime.now().plusMinutes(1) // 테스트용 1분 뒤 ) ); diff --git a/src/main/java/com/daon/onjung/suggestion/application/service/ReadCommentOverviewService.java b/src/main/java/com/daon/onjung/suggestion/application/service/ReadCommentOverviewService.java index 637e719..257396b 100644 --- a/src/main/java/com/daon/onjung/suggestion/application/service/ReadCommentOverviewService.java +++ b/src/main/java/com/daon/onjung/suggestion/application/service/ReadCommentOverviewService.java @@ -40,7 +40,7 @@ public ReadCommentOverviewResponseDto execute(UUID accountId, Long boardId, Inte List commentList = comments.getContent().stream() .map(comment -> { Boolean isMe = comment.getUser().getId().equals(user.getId()); - return ReadCommentOverviewResponseDto.CommentDto.of(comment, user, isMe); + return ReadCommentOverviewResponseDto.CommentDto.of(comment, isMe); }) .toList();