From 4d352e20bc56f3543cd00fea04911f31a98fc5be Mon Sep 17 00:00:00 2001 From: LimHyunwoo <81962309+imenuuu@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:04:52 +0900 Subject: [PATCH] =?UTF-8?q?:recycle:=20:=20=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/runway/controller/StoreController.java | 2 -- .../com/example/runway/repository/StoreReviewRepository.java | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/runway/controller/StoreController.java b/src/main/java/com/example/runway/controller/StoreController.java index d95fbbf..90b8fb1 100644 --- a/src/main/java/com/example/runway/controller/StoreController.java +++ b/src/main/java/com/example/runway/controller/StoreController.java @@ -145,8 +145,6 @@ private CommonResponse getStoreReviewByReviewId(@Authentica StoreRes.ReviewInfo reviewInfo=reviewService.getStoreReviewByReviewId(reviewId,userId); - //reviewService.readReview(reviewId,userId); - return CommonResponse.onSuccess(reviewInfo); } diff --git a/src/main/java/com/example/runway/repository/StoreReviewRepository.java b/src/main/java/com/example/runway/repository/StoreReviewRepository.java index 18a683e..d655245 100644 --- a/src/main/java/com/example/runway/repository/StoreReviewRepository.java +++ b/src/main/java/com/example/runway/repository/StoreReviewRepository.java @@ -14,7 +14,8 @@ public interface StoreReviewRepository extends JpaRepository { Page findByStoreIdAndDeletedOrderByCreatedAtDescIdAsc(Long storeId, boolean b,Pageable pageReq); - @Query(nativeQuery = true,value="select SR.id 'reviewId',SR.user_id'userId',\n" + + @Query(nativeQuery = true, + value="select SR.id 'reviewId',SR.user_id'userId',\n" + " U.profile_url 'profileImgUrl',\n" + " U.nickname,\n" + " SR.img_url 'imgUrl',\n" + @@ -28,7 +29,7 @@ public interface StoreReviewRepository extends JpaRepository { " join User U on U.id = SR.user_id\n" + " join Store S on S.id = SR.store_id\n" + " join Region R on R.id = S.region_id\n" + - " join ReviewKeep K on K.review_id=:reviewId " + + " left join ReviewKeep K on K.review_id=:reviewId " + "where SR.id=:reviewId and SR.deleted=true") StoreReviewRepository.GetStoreReview getStoreReview(@Param("reviewId") Long reviewId, @Param("userId") Long userId);