Repository navigation
Conversation
Add reviews ver 1.1
…работу с этими событиями # Conflicts: # src/main/java/ru/yandex/practicum/filmorate/dal/database/BaseDbStorage.java # src/main/resources/schema.sql
feat: Implement film recommendation system
…фильтры по году и жанру
Модернизация метода, который возвращает популярные фильмы.
Реализовать функции добавления и получения режиссера
@qualifier("filmDbStorage") private FilmStorage filmStorage; В UserService
Add director
…ильмов с сортировкой по их популярности # Conflicts: # src/main/java/ru/yandex/practicum/filmorate/controller/FilmController.java
add-remove-endpoint
Add search
В сущности Event поле id заменила на eventId
В метод getTopByFilters добавлен директор
…при обновлении не передавать его в запросе.
irek-valiev
reviewed
Feb 22, 2026
| """; | ||
| } | ||
| @GetMapping | ||
| public String homePage() { |
| ); | ||
| } | ||
|
|
||
| public Collection<FilmDto> getCommonLikedFilms(Long userId, Long friendId) { |
There was a problem hiding this comment.
добавь проверку, что это не один и тот же пользователь
| log.info("Данные для обновления: [{}]", updatedData); | ||
| } | ||
|
|
||
| public Collection<FilmDto> search(String query, String by) { |
There was a problem hiding this comment.
добавь проверку, что query и by не null и не пустая строка
| public ReviewDto updateReview(ReviewUpdateRequest request) { | ||
| log.info("Обновление данных об отзыве с id={}", request.getReviewId()); | ||
|
|
||
| Review oldReview = reviewStorage.findReviewById(request.getReviewId()) |
There was a problem hiding this comment.
вынеси поиск отзыва/проброс исключения в отдельный метод класса
| } | ||
| } | ||
|
|
||
| if (similarUserId == -1) { |
There was a problem hiding this comment.
рекомендации формируются не по одному пользователю. Нужно определить размуное (10-15) количество пользователей с кем лайки пересекаются. И уже у них собирать фильмы для рекомендации
| Set<Long> similarUserLikes = allLikes.get(similarUserId); | ||
| return similarUserLikes.stream() | ||
| .filter(filmId -> !targetUserLikes.contains(filmId)) | ||
| .map(filmService::findById) |
There was a problem hiding this comment.
фильмы нужно получить за один запрос, а не в потоке по одному обращаться к БД
irek-valiev
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.