Skip to content

refactor: 응답 객체에 프로필 이미지 url 포함#118

Merged
Jjiggu merged 2 commits into
developfrom
feature/#108-Store-Caeching
Jul 17, 2025
Merged

refactor: 응답 객체에 프로필 이미지 url 포함#118
Jjiggu merged 2 commits into
developfrom
feature/#108-Store-Caeching

Conversation

@Jjiggu

@Jjiggu Jjiggu commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

작업 요약

  • StoreRankingDto에 profileUrl 필드 추가
  • findStoreInfoByIds 쿼리 수정
  • StoreInfo profileUrl 필드 추가

Issue Link

#108

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 신규 기능

    • 매장 랭킹 및 정보 조회 시 매장 프로필 이미지 URL이 함께 제공됩니다.
  • 버그 수정

    • 일부 매장 정보 조회 시 프로필 이미지가 없을 경우 빈 문자열로 처리됩니다.

@Jjiggu Jjiggu self-assigned this Jul 17, 2025
@Jjiggu Jjiggu added the refactor 리팩토링 label Jul 17, 2025
@coderabbitai

coderabbitai Bot commented Jul 17, 2025

Copy link
Copy Markdown

Walkthrough

profileUrl 필드가 매장 관련 DTO(StoreRankingDto, StoreInfo)에 추가되었고, 매장 랭킹 및 정보 조회 시 프로필 이미지 URL이 함께 반환되도록 관련 서비스 및 쿼리 로직이 확장되었습니다. 기존 로직에는 영향이 없으며, 데이터 반환 구조만 변경되었습니다.

Changes

파일(들) 변경 요약
.../statistic/dto/StoreRankingDto.java
.../statistic/dto/StoreInfo.java
profileUrl 필드 추가, 생성자에 해당 파라미터 및 필드 초기화 코드 추가
.../statistic/service/impl/RankingServiceImpl.java StoreRankingDto 생성 시 profileUrl 전달 추가, 주석 내 데이터 소스 설명 수정
.../statistic/repository/StatisticCustomRepositoryImpl.java 매장 정보 조회 쿼리에 프로필 이미지 URL(left join 및 coalesce) 추가, DTO 매핑에 profileUrl 반영

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 포함)
Loading

Possibly related PRs

  • GTable/NoWait_BE_MultiModule#113: 매장 프로필 이미지 업로드 기능 및 관련 API 변경을 구현하여, 본 PR과 같이 매장 프로필 이미지의 처리 및 데이터 반환 구조에 직접적인 코드 레벨 연관성이 있습니다.
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot requested a review from HyemIin July 17, 2025 08:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bec7eed and 84985a0.

📒 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 객체가 적절히 생성되고 있습니다.

@Jjiggu Jjiggu merged commit 2e0b651 into develop Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant