Skip to content

fix: challengeCertificationRepository 삭제 및 통합#390

Merged
sanchaehwa merged 1 commit intomainfrom
fix/rankmodule
Nov 30, 2025
Merged

fix: challengeCertificationRepository 삭제 및 통합#390
sanchaehwa merged 1 commit intomainfrom
fix/rankmodule

Conversation

@sanchaehwa
Copy link
Member

@sanchaehwa sanchaehwa commented Nov 30, 2025

#️⃣ 연관된 이슈

ex) close #Issue number

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

📷 스크린샷

이미지

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 명칭

📌 PR 진행 시 참고사항

  • 리뷰어는 좋은 코드 방향을 제시하되, 수정을 강요하지 않습니다.
  • 좋은 코드를 발견하면 칭찬과 격려를 아끼지 않습니다.
  • 리뷰는 Reviewer로 지정된 시점 기준으로 3일 이내에 진행해 주세요.
  • Comment 작성 시 아래 Prefix를 사용해 주세요:
    • P1: 꼭 반영해 주세요 (Request Changes) – 이슈나 취약점 관련
    • P2: 반영을 고려해 주세요 (Comment) – 개선 의견
    • P3: 단순 제안 (Chore)

Summary by CodeRabbit

  • Refactor
    • Internal reorganization of data access components to improve code structure and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

Walkthrough

The ChallengeCertificationRepository is relocated from the repository package to the domain package. The old repository file is deleted and a new one is created at the domain location with the findCertifiedCountByMemberIds query method. Dependent imports in WeeklyRankingService are updated accordingly.

Changes

Cohort / File(s) Change Summary
Repository relocation
src/main/java/com/example/green/domain/certification/domain/ChallengeCertificationRepository.java, src/main/java/com/example/green/domain/certification/repository/ChallengeCertificationRepository.java
Moved ChallengeCertificationRepository from repository package to domain package; new location includes findCertifiedCountByMemberIds(List<Long> memberIds) JPQL query method returning MemberCertifiedCountProjection. Old repository file deleted.
Import updates
src/main/java/com/example/green/domain/dashboard/rankingmodule/service/WeeklyRankingService.java
Updated import path for ChallengeCertificationRepository from domain.certification.repository to domain.certification.domain.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify all references to the old domain.certification.repository.ChallengeCertificationRepository import path have been updated across the codebase
  • Confirm the JPQL query in the new location is syntactically correct and equivalent to previous implementation
  • Check for any other files that may reference the deleted repository file that were not included in this diff

Possibly related PRs

Poem

🐰 From repository to domain's embrace,
A hop and a bound to a better place,
With imports refreshed and queries arranged,
The rabbit approves of this wise rearrange! 📦✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: deletion and consolidation of ChallengeCertificationRepository, which matches the actual changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/rankmodule

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Unit Test Coverage Report

Total Project Coverage 34.51%
File Coverage [34.31%]
WeeklyRankingService.java 34.31%

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 9816715 and 1280217.

📒 Files selected for processing (3)
  • src/main/java/com/example/green/domain/certification/domain/ChallengeCertificationRepository.java (2 hunks)
  • src/main/java/com/example/green/domain/certification/repository/ChallengeCertificationRepository.java (0 hunks)
  • src/main/java/com/example/green/domain/dashboard/rankingmodule/service/WeeklyRankingService.java (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/com/example/green/domain/certification/repository/ChallengeCertificationRepository.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: check
🔇 Additional comments (3)
src/main/java/com/example/green/domain/dashboard/rankingmodule/service/WeeklyRankingService.java (1)

16-16: Import updated to track repository relocation.

The import path has been correctly updated to reflect the repository's new location. However, note that placing repositories in the domain package is unconventional—see detailed architectural feedback in ChallengeCertificationRepository.java.

src/main/java/com/example/green/domain/certification/domain/ChallengeCertificationRepository.java (2)

36-41: The projection interface is correctly defined and matches the query output.

The MemberCertifiedCountProjection interface properly defines getMemberId() returning Long and getCertifiedCount() returning int, which correctly maps to the query's AS aliases. The JPQL query syntax is valid, and the GROUP BY clause efficiently batches certification counts for multiple members. No changes are needed.


1-1: No issues found. The migration from domain.certification.repository to domain.certification.domain is complete—no remaining references to the old package path exist in the codebase, and the old repository file has been removed.

@@ -1,9 +1,13 @@
package com.example.green.domain.certification.domain;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Repository interface should not reside in the domain package.

Spring Data repositories are infrastructure/persistence concerns and conventionally belong in a repository or infrastructure package. The domain package should contain domain models (entities, value objects, domain services), not data-access interfaces. This placement violates separation of concerns and standard Spring Boot/DDD architecture patterns.

Consider moving this interface back to com.example.green.domain.certification.repository:

-package com.example.green.domain.certification.domain;
+package com.example.green.domain.certification.repository;

And update the import in WeeklyRankingService accordingly.

Also applies to: 12-12

@sanchaehwa sanchaehwa merged commit e727699 into main Nov 30, 2025
2 checks passed
@sanchaehwa sanchaehwa deleted the fix/rankmodule branch November 30, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant