From 46606872618e3ce4136b7fcc68581d51378ee536 Mon Sep 17 00:00:00 2001 From: Hanbee Lee Date: Sun, 11 Feb 2024 02:20:43 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B6=94=EC=B2=9C=EC=9E=91=20=EB=B0=98?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adaptor/RecommendedPopcornAdaptor.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Domain/src/main/java/com/example/domains/recommendedPopcorn/adaptor/RecommendedPopcornAdaptor.java b/Domain/src/main/java/com/example/domains/recommendedPopcorn/adaptor/RecommendedPopcornAdaptor.java index 97c927a..3674333 100644 --- a/Domain/src/main/java/com/example/domains/recommendedPopcorn/adaptor/RecommendedPopcornAdaptor.java +++ b/Domain/src/main/java/com/example/domains/recommendedPopcorn/adaptor/RecommendedPopcornAdaptor.java @@ -36,14 +36,15 @@ public void checkExists(String movieId) { public List findAllThisWeek() { QRecommendedPopcorn recommendedPopcorn = QRecommendedPopcorn.recommendedPopcorn; - LocalDate today = LocalDate.now().plusDays(1); - LocalDate startOfThisWeek = today.with(DayOfWeek.SUNDAY); - LocalDate endOfThisWeek = today.with(DayOfWeek.SATURDAY); + LocalDate today = LocalDate.now(); + LocalDate tomorrow = LocalDate.now().plusDays(1); + LocalDate startOfThisWeek = tomorrow.with(DayOfWeek.SUNDAY); + LocalDate endOfThisWeek = tomorrow.with(DayOfWeek.SATURDAY); return jpaQueryFactory .selectFrom(recommendedPopcorn) .where( - recommendedPopcorn.createdAt.between(startOfThisWeek.atStartOfDay(), endOfThisWeek.atTime(23, 59, 59)) + recommendedPopcorn.createdAt.between(today.atStartOfDay(), endOfThisWeek.atTime(23, 59, 59)) ) .orderBy( recommendedPopcorn.createdAt.asc()