Skip to content

Commit

Permalink
Fix : Spring Data JPA 메서드 명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunw9 committed Sep 1, 2024
1 parent e8c84c3 commit eac47c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public List<Diary> findTodayDiary(LocalDateTime start) {
public boolean findIfUserHasDeletedDiary(LocalDateTime start) {
Long userId = JwtUtil.getLoginMemberId();
LocalDateTime end = start.plusDays(1);
return diaryRepository.findDiariesByUserIdAndCreatedAtBetweenAndDeletedTrue(userId, start, end);
return diaryRepository.existsByUserIdAndCreatedAtBetweenAndIsDeletedTrue(userId, start, end);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ public interface JpaDiaryRepository extends JpaRepository<Diary, Long> {

List<Diary> findDiariesByUserId(Long userId);

boolean findDiariesByUserIdAndCreatedAtBetweenAndDeletedTrue(Long userId, LocalDateTime start, LocalDateTime end);
boolean existsByUserIdAndCreatedAtBetweenAndIsDeletedTrue(Long userId, LocalDateTime start, LocalDateTime end);
}

0 comments on commit eac47c6

Please sign in to comment.