260812_02_ENH: 예약 내역 조회의 초 처리 수정

This commit is contained in:
2026-08-12 16:02:09 +09:00
parent de7c09ac33
commit d975f8ad1f

View File

@@ -69,8 +69,14 @@ public class ReserveService {
boolean requestPast,
LocalDateTime now
) {
LocalDateTime startDt = requestPast ? now.minusMinutes(NOTIFICATION_RANGE_MINUTES) : now;
LocalDateTime endDt = now.plusMinutes(NOTIFICATION_RANGE_MINUTES);
LocalDateTime currentMinute = now.withSecond(0).withNano(0);
LocalDateTime startDt = requestPast
? currentMinute.minusMinutes(NOTIFICATION_RANGE_MINUTES)
: currentMinute;
LocalDateTime endDt = currentMinute
.plusMinutes(NOTIFICATION_RANGE_MINUTES)
.withSecond(59)
.withNano(999_999_999);
return toDtosWithProjectNames(
listReserveRepository.findNotifications(userId, startDt, endDt)
);