From 0b8fb6f22a2149f56e8bd59e16df6d7fca399c7d Mon Sep 17 00:00:00 2001 From: HyeonsuLee Date: Fri, 6 Dec 2024 12:58:17 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benefit/repository/BenefitCategoryMapRepository.java | 8 +++++--- .../koreatech/koin/domain/shop/service/ShopService.java | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/in/koreatech/koin/domain/benefit/repository/BenefitCategoryMapRepository.java b/src/main/java/in/koreatech/koin/domain/benefit/repository/BenefitCategoryMapRepository.java index f21ae492e..cb2590edb 100644 --- a/src/main/java/in/koreatech/koin/domain/benefit/repository/BenefitCategoryMapRepository.java +++ b/src/main/java/in/koreatech/koin/domain/benefit/repository/BenefitCategoryMapRepository.java @@ -11,9 +11,11 @@ public interface BenefitCategoryMapRepository extends Repository findAllByBenefitCategoryId(Integer benefitCategoryId); - @Query("SELECT bcm FROM BenefitCategoryMap bcm " + - "JOIN FETCH bcm.shop s " + - "JOIN FETCH bcm.benefitCategory bc") + @Query(""" + SELECT bcm FROM BenefitCategoryMap bcm + JOIN FETCH bcm.shop s + JOIN FETCH bcm.benefitCategory bc + """) List findAllWithFetchJoin(); BenefitCategoryMap save(BenefitCategoryMap benefitCategoryMap); diff --git a/src/main/java/in/koreatech/koin/domain/shop/service/ShopService.java b/src/main/java/in/koreatech/koin/domain/shop/service/ShopService.java index e2293184c..d73512fbb 100644 --- a/src/main/java/in/koreatech/koin/domain/shop/service/ShopService.java +++ b/src/main/java/in/koreatech/koin/domain/shop/service/ShopService.java @@ -107,9 +107,9 @@ public void publishCallNotification(Integer shopId, Integer studentId) { if (isSubscribeReviewNotification(studentId)) { ShopReviewNotification shopReviewNotification = ShopReviewNotification.builder() - .shopId(shopId) - .studentId(studentId) - .build(); + .shopId(shopId) + .studentId(studentId) + .build(); double score = LocalDateTime.now(clock).plusHours(1).toEpochSecond(ZoneOffset.UTC); shopReviewNotificationRedisRepository.save(shopReviewNotification, score);