From 1b844ae3e183409304b8c99bc6662fabc26e8672 Mon Sep 17 00:00:00 2001 From: Namgyu11 <103015031+Namgyu11@users.noreply.github.com> Date: Sun, 22 Sep 2024 19:46:42 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EC=9E=98=EB=AA=BB=EB=90=9C=20?= =?UTF-8?q?=EB=A9=94=EC=84=9C=EB=93=9C=20=EA=B5=AC=ED=98=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 리뷰어 ID와 채팅방 ID로 타겟 ID를 조회하는 메서드의 구현을 수정했습니다. - JPQL 쿼리를 사용하여 정확한 결과를 반환하도록 변경했습니다. Signed-off-by: Namgyu11 <103015031+Namgyu11@users.noreply.github.com> --- .../review/repository/AccompanyReviewRepository.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/connectripbe/connectrip_be/review/repository/AccompanyReviewRepository.java b/src/main/java/connectripbe/connectrip_be/review/repository/AccompanyReviewRepository.java index 35c474c8..f1d2d575 100644 --- a/src/main/java/connectripbe/connectrip_be/review/repository/AccompanyReviewRepository.java +++ b/src/main/java/connectripbe/connectrip_be/review/repository/AccompanyReviewRepository.java @@ -23,6 +23,8 @@ public interface AccompanyReviewRepository extends JpaRepository findAllTargetIdsByReviewerIdAndChatRoomId(Long reviewerId, Long chatRoomId); + + @Query("SELECT r.target FROM AccompanyReviewEntity r WHERE r.reviewer = :reviewerId AND r.chatRoom = :chatRoomId") + List findAllTargetIdsByReviewerIdAndChatRoomId(@Param("reviewerId") Long reviewerId, + @Param("chatRoomId") Long chatRoomId); }