Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aee9aa0

Browse files
StepFive: update ReservationService.java
1 parent 86c6ab9 commit aee9aa0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎StepFive/src/main/java/me/oldboy/services/ReservationService.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
- поиск всех бронирований по ID временного слота (slotId);
3535
- поиск всех бронирований по ID места (placeId);
3636
*/
37+
38+
/**
39+
* Service class for reservation managing.
40+
*/
3741
@Service
3842
@Transactional(readOnly = true)
3943
public class ReservationService {
@@ -256,6 +260,13 @@ public Optional<List<ReservationReadDto>> findByDate(LocalDate date) throws Rese
256260
.collect(Collectors.toList()));
257261
}
258262

263+
/**
264+
* Find all available slots for a specific date
265+
*
266+
* @param date specific date
267+
* @return collection of free slots selected by places
268+
* @throws ReservationServiceException catches any exceptions from the service layer when calculating free slots
269+
*/
259270
@Measurable
260271
public Map<Long, List<Long>> findAllFreeSlotsByDate(LocalDate date) {
261272
/* Проверяем есть ли вообще брони на заданную дату - есть дергаем список */

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /