refactor: 응답 객체에 프로필 이미지 url 포함#118
Conversation
Walkthrough
Changes
Sequence Diagram(s)sequenceDiagram
participant AdminAPI as Admin API
participant RankingService as RankingServiceImpl
participant Repo as StatisticCustomRepositoryImpl
participant DB as Database
AdminAPI->>RankingService: getStoreRanking()
RankingService->>Repo: findStoreInfoByIds(storeIds)
Repo->>DB: SELECT store info LEFT JOIN profile image
DB-->>Repo: store info + profileUrl
Repo-->>RankingService: List<StoreInfo>
RankingService-->>AdminAPI: List<StoreRankingDto> (profileUrl 포함)
Possibly related PRs
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/statistic/dto/StoreRankingDto.java(1 hunks)nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/statistic/service/impl/RankingServiceImpl.java(2 hunks)nowait-domain/domain-admin-rdb/src/main/java/com/nowait/domainadminrdb/statistic/dto/StoreInfo.java(1 hunks)nowait-domain/domain-admin-rdb/src/main/java/com/nowait/domainadminrdb/statistic/repository/StatisticCustomRepositoryImpl.java(3 hunks)
🔇 Additional comments (23)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/statistic/service/impl/RankingServiceImpl.java (4)
48-48: 주석 업데이트가 적절합니다.코드 로직과 일치하도록 주석이 정확하게 업데이트되었습니다.
70-71: profileUrl 파라미터 추가가 올바르게 구현되었습니다.StoreRankingDto 생성자에 profileUrl 파라미터가 적절히 추가되었으며, StoreInfo 객체로부터 값을 정확히 가져오고 있습니다.
48-48: 주석 업데이트가 적절합니다.Redis에서 storeId 정보를 가져오는 것을 정확히 반영한 주석 변경입니다.
70-71: 프로필 URL 필드 추가가 올바르게 구현되었습니다.StoreInfo에서 profileUrl을 가져와서 StoreRankingDto 생성자에 전달하는 로직이 정확합니다.
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/statistic/dto/StoreRankingDto.java (5)
14-14: profileUrl 필드 선언이 적절합니다.기존 필드들과 동일한 패턴을 따르고 있으며, final 키워드를 사용하여 불변성을 보장하고 있습니다.
17-17: 생성자 파라미터 추가가 올바릅니다.profileUrl 파라미터가 적절한 위치에 추가되었으며, 타입이 필드 선언과 일치합니다.
25-25: 필드 초기화가 적절합니다.profileUrl 필드가 생성자 파라미터로 올바르게 초기화되고 있습니다.
14-14: 프로필 URL 필드 추가가 적절합니다.final String으로 선언되어 불변성을 유지하고 있습니다.
17-17: 생성자 업데이트가 올바르게 구현되었습니다.새로운 profileUrl 매개변수를 포함하여 생성자가 적절히 수정되었고, 필드 초기화도 정확합니다.
Also applies to: 25-25
nowait-domain/domain-admin-rdb/src/main/java/com/nowait/domainadminrdb/statistic/dto/StoreInfo.java (5)
11-11: profileUrl 필드 선언이 적절합니다.기존 필드들과 일관된 스타일을 따르고 있으며, final 키워드를 사용하여 불변성을 보장하고 있습니다.
13-13: 생성자 파라미터 추가가 올바릅니다.profileUrl 파라미터가 적절한 위치에 추가되었으며, 필드 타입과 일치합니다.
18-18: 필드 초기화가 적절합니다.profileUrl 필드가 생성자 파라미터로 올바르게 초기화되고 있습니다.
11-11: 프로필 URL 필드 추가가 적절합니다.final String으로 선언되어 불변성을 유지하고 있습니다.
13-13: 생성자 업데이트가 올바르게 구현되었습니다.새로운 profileUrl 매개변수를 포함하여 생성자가 적절히 수정되었고, 필드 초기화도 정확합니다.
Also applies to: 18-18
nowait-domain/domain-admin-rdb/src/main/java/com/nowait/domainadminrdb/statistic/repository/StatisticCustomRepositoryImpl.java (9)
24-24: 필요한 import 추가가 적절합니다.프로필 이미지 조회 기능을 위해 필요한 클래스들이 올바르게 import되었습니다.
Also applies to: 26-26, 28-28, 31-31
34-34: @slf4j 어노테이션 추가가 적절합니다.로깅 기능을 위한 어노테이션이 올바르게 추가되었습니다.
44-44: 정적 필드 수정이 올바릅니다.QStore 초기화가 정확하게 수정되었고, 새로운 QStoreImage 필드가 적절히 추가되었습니다.
Also applies to: 46-46
311-315: StoreInfo 매핑 업데이트가 올바릅니다.새로운 profileUrl 필드가 적절히 추가되었으며, 필드 참조가 일관되게 사용되고 있습니다.
24-24: 필요한 임포트와 어노테이션이 적절히 추가되었습니다.ImageType, QStoreImage, Expression 임포트와 @slf4j 어노테이션이 새로운 기능을 위해 올바르게 추가되었습니다.
Also applies to: 26-26, 28-28, 31-31, 34-34
44-44: QStore 초기화 수정이 올바릅니다.
store에서QStore.store로 수정하여 정적 필드 초기화가 정확해졌습니다.
46-46: QStoreImage 정적 필드 추가가 적절합니다.스토어 이미지 조회를 위한 QueryDSL 엔티티가 올바르게 선언되었습니다.
302-307: 프로필 이미지 조회를 위한 쿼리 수정이 잘 구현되었습니다.left join을 사용하여 프로필 이미지가 없는 스토어도 포함시키고, ImageType.PROFILE로 필터링하며, coalesce로 null 값을 빈 문자열로 처리하는 것이 모두 적절합니다.
311-316: StoreInfo 생성자 호출이 올바르게 수정되었습니다.새로운 profileUrl 필드를 포함하여 StoreInfo 객체가 적절히 생성되고 있습니다.
작업 요약
Issue Link
#108
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
신규 기능
버그 수정