Skip to content

Commit ced1901

Browse files
committed
feat(WateringLogRepository): 퀘스트용 반열린 구간 [from, to) 조회 메서드 findByUserIdAndWateredAtGreaterThanEqualAndWateredAtLessThan 추가
1 parent adf854f commit ced1901

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/java/com/Rootin/domain/garden/repository/WateringLogRepository.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,20 @@ public interface WateringLogRepository extends JpaRepository<WateringLog, Long>
4848
// 성장 이력 차트용 - 최근 30건
4949
List<WateringLog> findTop30ByUserIdOrderByWateredAtDesc(Long userId);
5050

51-
// 활동 캘린더용 - 기간별 물주기 이력
51+
// 활동 캘린더용 - 기간별 물주기 이력 (inclusive BETWEEN)
5252
List<WateringLog> findByUserIdAndWateredAtBetween(
5353
Long userId,
5454
LocalDateTime from,
5555
LocalDateTime to
5656
);
5757

58+
// 퀘스트용 - 반열린 구간 [from, to) 조회. datetime(6) microsecond 누락 방지
59+
List<WateringLog> findByUserIdAndWateredAtGreaterThanEqualAndWateredAtLessThan(
60+
Long userId,
61+
LocalDateTime from,
62+
LocalDateTime to
63+
);
64+
5865
// 식물 성장 단계 날짜 계산용 — 특정 시점 이후 해당 화분의 물주기 이력 (시간순)
5966
List<WateringLog> findByPotIdAndWateredAtGreaterThanEqualOrderByWateredAtAsc(
6067
Long potId,

0 commit comments

Comments
 (0)