diff --git a/src/main/java/com/drinkeg/drinkeg/wine/controller/WineController.java b/src/main/java/com/drinkeg/drinkeg/wine/controller/WineController.java index def4934..e543330 100644 --- a/src/main/java/com/drinkeg/drinkeg/wine/controller/WineController.java +++ b/src/main/java/com/drinkeg/drinkeg/wine/controller/WineController.java @@ -4,7 +4,6 @@ import com.drinkeg.drinkeg.apipayLoad.ApiResponse; import com.drinkeg.drinkeg.wine.dto.response.SearchWineResponseDTO; import com.drinkeg.drinkeg.wine.dto.response.WineResponseWithThreeReviewsDTO; -import com.drinkeg.drinkeg.wine.dto.response.WineReviewDTO; import com.drinkeg.drinkeg.dto.loginDTO.commonDTO.PrincipalDetail; import com.drinkeg.drinkeg.wine.dto.response.WineReviewResponseDTO; import com.drinkeg.drinkeg.wine.service.WineService; @@ -50,8 +49,7 @@ public ApiResponse showWine(@AuthenticationPrin public ApiResponse showWineReview(@AuthenticationPrincipal PrincipalDetail principalDetail, @PathVariable("wineId") Long wineId, @RequestParam Boolean orderByLatest) { - WineReviewResponseDTO wineReviewResponseDTO = wineService.getWineReviewsByWineId(wineId, principalDetail, orderByLatest); - + WineReviewResponseDTO wineReviewResponseDTO = wineService.getWineReviewsAndIsLikedByWineId(wineId, principalDetail, orderByLatest); return ApiResponse.onSuccess(wineReviewResponseDTO); } diff --git a/src/main/java/com/drinkeg/drinkeg/wine/service/WineService.java b/src/main/java/com/drinkeg/drinkeg/wine/service/WineService.java index e051323..e7e58f4 100644 --- a/src/main/java/com/drinkeg/drinkeg/wine/service/WineService.java +++ b/src/main/java/com/drinkeg/drinkeg/wine/service/WineService.java @@ -16,7 +16,7 @@ public interface WineService { public WineResponseWithThreeReviewsDTO getWineResponseByWineId(Long wineId, PrincipalDetail principalDetail); - public WineReviewResponseDTO getWineReviewsByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest); + public WineReviewResponseDTO getWineReviewsAndIsLikedByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest); public HomeResponseDTO getHomeResponse(PrincipalDetail principalDetail); diff --git a/src/main/java/com/drinkeg/drinkeg/wine/service/WineServiceImpl.java b/src/main/java/com/drinkeg/drinkeg/wine/service/WineServiceImpl.java index 33288dd..4993fc7 100644 --- a/src/main/java/com/drinkeg/drinkeg/wine/service/WineServiceImpl.java +++ b/src/main/java/com/drinkeg/drinkeg/wine/service/WineServiceImpl.java @@ -63,7 +63,7 @@ public WineResponseWithThreeReviewsDTO getWineResponseByWineId(Long wineId, Prin } @Override - public WineReviewResponseDTO getWineReviewsByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest){ + public WineReviewResponseDTO getWineReviewsAndIsLikedByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest){ // 회원을 조회한다. Member member = memberRepository.findByUsername(principalDetail.getUsername()).orElseThrow( () -> new GeneralException(ErrorStatus.MEMBER_NOT_FOUND));