From cdac2551cd1ab17f7afec8b6773fcfcd13bcdfb4 Mon Sep 17 00:00:00 2001 From: daeun084 <030804jk@naver.com> Date: Mon, 19 Feb 2024 13:01:36 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20reservation=20date=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reservation/service/ReservationService.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/umc/meme/shop/domain/reservation/service/ReservationService.java b/src/main/java/umc/meme/shop/domain/reservation/service/ReservationService.java index 8e2a04e..5f7b9bf 100644 --- a/src/main/java/umc/meme/shop/domain/reservation/service/ReservationService.java +++ b/src/main/java/umc/meme/shop/domain/reservation/service/ReservationService.java @@ -24,6 +24,7 @@ import umc.meme.shop.global.exception.GlobalException; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -75,7 +76,7 @@ public ReservationCompleteDto createReservation(ReservationRequestDto reservatio for(int i=0; i getModelReservation(Long modelId) { .collect(Collectors.toList()); } + private boolean checkDuplicateReservation(Date date1, Date date2){ + //두 date가 동일하면 false + if(date1.getYear() == date2.getYear()){ + if(date1.getMonth() == date2.getMonth()) + if(date1.getDay() == date2.getDay()) + return true; + } + return false; + } + }