feat: rival equipped items/#661#665
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request integrates EquippedItemsData into the rival acting status feature, updating the DTOs, application data records, and the service layer to include equipped item information for rivals. The feedback highlights an opportunity to optimize resource usage by filtering the current user's ID before loading item data, identifies a potential typo in the EquippedItemsData class that affects API consistency, and recommends strengthening the test suite by adding assertions for the newly introduced field.
chaeyn
approved these changes
Apr 11, 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.
변경사항
GET /api/compete/rivals 응답의 각 라이벌 객체에 equippedItems 필드 추가
EquippedItemsAssembler.loadByUserIds()로 배치 로딩하여 N+1 방지
라이벌이 없을 때 RivalNotFoundException 대신 빈 리스트 반환으로 변경
관련 이슈
Closes #661
추가 컨텍스트
EquippedItemsAssembler는 기존 랭킹 API에서 사용 중인 컴포넌트를 그대로 재사용했습니다.
stream 내부에서 loadByUserId()를 호출하면 라이벌 수만큼 쿼리가 발생하므로, stream 실행 전에 loadByUserIds(opponentIds)로 한 번에 로딩 후 map으로 조회하는 방식을 적용했습니다.