From b2abaebc97ebefcbd72cf6f28ff9b8698f96b9c8 Mon Sep 17 00:00:00 2001 From: JunsuPark Date: Wed, 4 Sep 2024 10:32:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B3=B5=EC=97=B0=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95=20(#148)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/show/service/ShowService.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java index f6c22e79..ae8c9435 100644 --- a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java +++ b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java @@ -151,16 +151,16 @@ public void alertReservation( ticketingAlertReservationRequest.type().toDomainType() ); - var request = ticketingAlertReservationRequest.toDomainRequest( - showTicketingTime.getShow().getTitle(), - showTicketingTime.getTicketingAt() - ); - - if (request.alertTimes().isEmpty()) { + if (showTicketingTime.getTicketingAt().isBefore(LocalDateTime.now())) { throw new BusinessException(ShowError.TICKETING_ALERT_RESERVED_ERROR); } - var domainResponse = ticketingAlertUseCase.alertReservation(request); + var domainResponse = ticketingAlertUseCase.alertReservation( + ticketingAlertReservationRequest.toDomainRequest( + showTicketingTime.getShow().getTitle(), + showTicketingTime.getTicketingAt() + ) + ); messagePublisher.publishTicketingReservation( "ticketingAlert", TicketingAlertsToReserveServiceMessage.from(domainResponse)