Skip to content

Commit

Permalink
mod #69: 사용하지 않는 메서드 제거 및 solveHistoryId로 조회하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
GiHoo committed May 9, 2024
1 parent da73ab0 commit 55f6580
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public interface SolveHistoryRepository extends JpaRepository<SolveHistory, Long
@Query("SELECT sh FROM SolveHistory sh WHERE sh.member.id = :memberId AND sh.isCompleted = true")
List<SolveHistory> findByMemberIdAndIsCompletedIsTrue(Long memberId);

@Query("SELECT sh FROM SolveHistory sh WHERE sh.member.id = :memberId AND sh.solveCount = :solveCount")
Optional<SolveHistory> findByMemberIdAndSolveHistoryId(Long memberId, Long solveCount);
@Query("SELECT sh FROM SolveHistory sh WHERE sh.member.id = :memberId AND sh.id = :solveHistoryId")
Optional<SolveHistory> findByMemberIdAndSolveHistoryId(Long memberId, Long solveHistoryId);

@Query("SELECT sh FROM SolveHistory sh WHERE sh.member.id = :memberId AND sh.solveCount = :solveCount AND sh.isCompleted = true")
Optional<SolveHistory> findByMemberIdAndSolveHistoryIdAndIsCompletedIsTrue(Long memberId, Long solveCount);
@Query("SELECT sh FROM SolveHistory sh WHERE sh.member.id = :memberId AND sh.id = :solveHistoryId AND sh.isCompleted = true")
Optional<SolveHistory> findByMemberIdAndSolveHistoryIdAndIsCompletedIsTrue(Long memberId, Long solveHistoryId);
}

0 comments on commit 55f6580

Please sign in to comment.