260812_02_ENH: 예약 내역 조회의 초 처리 수정
This commit is contained in:
@@ -69,8 +69,14 @@ public class ReserveService {
|
|||||||
boolean requestPast,
|
boolean requestPast,
|
||||||
LocalDateTime now
|
LocalDateTime now
|
||||||
) {
|
) {
|
||||||
LocalDateTime startDt = requestPast ? now.minusMinutes(NOTIFICATION_RANGE_MINUTES) : now;
|
LocalDateTime currentMinute = now.withSecond(0).withNano(0);
|
||||||
LocalDateTime endDt = now.plusMinutes(NOTIFICATION_RANGE_MINUTES);
|
LocalDateTime startDt = requestPast
|
||||||
|
? currentMinute.minusMinutes(NOTIFICATION_RANGE_MINUTES)
|
||||||
|
: currentMinute;
|
||||||
|
LocalDateTime endDt = currentMinute
|
||||||
|
.plusMinutes(NOTIFICATION_RANGE_MINUTES)
|
||||||
|
.withSecond(59)
|
||||||
|
.withNano(999_999_999);
|
||||||
return toDtosWithProjectNames(
|
return toDtosWithProjectNames(
|
||||||
listReserveRepository.findNotifications(userId, startDt, endDt)
|
listReserveRepository.findNotifications(userId, startDt, endDt)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user