+букинг

This commit is contained in:
lynxwq2
2025-12-04 17:48:01 +03:00
parent 8882846020
commit efbe78f118
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ import java.util.Optional;
@Service
@Repository
public interface BookingRepository extends JpaRepository<Booking, Long> {
List<Booking> findByDateInAndEmployee_Code(List<LocalDate> dates, String code);
List<Booking> findByDateIn(List<LocalDate> dates);
Optional<Booking> findById(Long id);
}

View File

@@ -64,7 +64,7 @@ public class BookingServiceImpl implements BookingService {
List<Place> allPlaces = placeRepository.findAll();
// 4. Находим все бронирования на целевые даты
List<Booking> bookings = bookingRepository.findByDateInAndEmployee_Code(targetDates, employeeCode);
List<Booking> bookings = bookingRepository.findByDateIn(targetDates);
// 5. Группируем бронирования по датам
Map<LocalDate, List<Booking>> bookingsByDate = bookings.stream()