Skip to content

Commit

Permalink
fix: 충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
devhoya97 committed Jul 25, 2024
2 parents 83b6b8c + 58960dd commit 163c01e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
public interface VisitRepository extends JpaRepository<Visit, Long> {
List<Visit> findAllByTravelIdAndIsDeletedIsFalse(@Param("travelId") long travelId);

long countByPinIdAndIsDeletedIsFalseAndVisitedAtBefore(Long pinId, LocalDate visitedAt);

@Query("SELECT CASE WHEN COUNT(v) > 0 THEN true ELSE false END FROM Visit v WHERE v.travel.id = :travelId")
boolean existsByTravelId(@Param("travelId") Long travelId);

long countByPinIdAndIsDeletedIsFalseAndVisitedAtBefore(Long pinId, LocalDate visitedAt);
}

0 comments on commit 163c01e

Please sign in to comment.