fix: challengeCertificationRepository 삭제 및 통합#390
Conversation
WalkthroughThe ChallengeCertificationRepository is relocated from the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Unit Test Coverage Report
|
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 (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
domainpackage 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
MemberCertifiedCountProjectioninterface properly definesgetMemberId()returningLongandgetCertifiedCount()returningint, which correctly maps to the query'sASaliases. The JPQL query syntax is valid, and theGROUP BYclause efficiently batches certification counts for multiple members. No changes are needed.
1-1: No issues found. The migration fromdomain.certification.repositorytodomain.certification.domainis 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; | |||
There was a problem hiding this comment.
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
#️⃣ 연관된 이슈
📝 작업 내용
📷 스크린샷
💬 리뷰 요구사항(선택)
📌 PR 진행 시 참고사항
P1: 꼭 반영해 주세요 (Request Changes) – 이슈나 취약점 관련P2: 반영을 고려해 주세요 (Comment) – 개선 의견P3: 단순 제안 (Chore)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.