Skip to content

Commit

Permalink
hotfix: 잘못된 메서드 구현 수정
Browse files Browse the repository at this point in the history
- 리뷰어 ID와 채팅방 ID로 타겟 ID를 조회하는 메서드의 구현을 수정했습니다.
- JPQL 쿼리를 사용하여 정확한 결과를 반환하도록 변경했습니다.

Signed-off-by: Namgyu11 <[email protected]>
  • Loading branch information
Namgyu11 committed Sep 22, 2024
1 parent 5825af1 commit 1b844ae
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public interface AccompanyReviewRepository extends JpaRepository<AccompanyReview

// 특정 유저가 받은 리뷰의 개수 가져오기
int countByTargetId(Long memberId);

List<Long> findAllTargetIdsByReviewerIdAndChatRoomId(Long reviewerId, Long chatRoomId);

@Query("SELECT r.target FROM AccompanyReviewEntity r WHERE r.reviewer = :reviewerId AND r.chatRoom = :chatRoomId")
List<Long> findAllTargetIdsByReviewerIdAndChatRoomId(@Param("reviewerId") Long reviewerId,
@Param("chatRoomId") Long chatRoomId);
}

0 comments on commit 1b844ae

Please sign in to comment.