Skip to content

feat: rival equipped items/#661#665

Merged
chaeyn merged 6 commits into
developfrom
feat/rival-equipped-items/#661
Apr 11, 2026
Merged

feat: rival equipped items/#661#665
chaeyn merged 6 commits into
developfrom
feat/rival-equipped-items/#661

Conversation

@redjungi09

Copy link
Copy Markdown
Collaborator

변경사항

GET /api/compete/rivals 응답의 각 라이벌 객체에 equippedItems 필드 추가
EquippedItemsAssembler.loadByUserIds()로 배치 로딩하여 N+1 방지
라이벌이 없을 때 RivalNotFoundException 대신 빈 리스트 반환으로 변경

관련 이슈

Closes #661

추가 컨텍스트

EquippedItemsAssembler는 기존 랭킹 API에서 사용 중인 컴포넌트를 그대로 재사용했습니다.
stream 내부에서 loadByUserId()를 호출하면 라이벌 수만큼 쿼리가 발생하므로, stream 실행 전에 loadByUserIds(opponentIds)로 한 번에 로딩 후 map으로 조회하는 방식을 적용했습니다.

@redjungi09 redjungi09 self-assigned this Apr 11, 2026
@redjungi09 redjungi09 added the enhancement 새로운 기능 추가 label Apr 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 chaeyn merged commit 20a1a87 into develop Apr 11, 2026
1 check passed
@chaeyn chaeyn deleted the feat/rival-equipped-items/#661 branch April 11, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants