✨ [feat] 관리자 검수 완료 목록 API - #117
Conversation
관리자 검수 화면에서 승인/반려 이력을 볼 수 있도록 completions/reviewed, proofs/reviewed 조회를 추가한다.
📝 WalkthroughWalkthroughAdmin review APIs now expose approved and rejected community-mission proofs with pagination, plus up to 50 reviewed mission completions. New DTOs, repository queries, service mappings, controller endpoints, timestamps, statuses, and presigned media URLs support both responses. ChangesReviewed admin results
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AdminClient
participant ReviewController
participant ReviewQueryService
participant ReviewRepository
AdminClient->>ReviewController: Request reviewed records
ReviewController->>ReviewQueryService: Query approved/rejected records
ReviewQueryService->>ReviewRepository: Fetch ordered reviewed records
ReviewRepository-->>ReviewQueryService: Return records
ReviewQueryService-->>ReviewController: Map response DTOs
ReviewController-->>AdminClient: Return ApiResponse
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/kotlin/com/zerost/api/communitymission/domain/CommunityMissionProofRepository.kt`:
- Around line 34-35: Update findAllByStatusIn so its `@EntityGraph` no longer
includes the images collection, preserving only the to-one associations for
paged database pagination. Load images separately after retrieving the page,
using the entity’s existing batch-loading mechanism such as `@BatchSize` rather
than collection fetch-joining the paged query.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4be49e27-48c3-4c22-9257-822d7483c48c
📒 Files selected for processing (9)
src/main/kotlin/com/zerost/api/communitymission/application/AdminCommunityMissionReviewQueryService.ktsrc/main/kotlin/com/zerost/api/communitymission/domain/CommunityMissionProofRepository.ktsrc/main/kotlin/com/zerost/api/communitymission/presentation/AdminCommunityMissionReviewController.ktsrc/main/kotlin/com/zerost/api/communitymission/presentation/dto/AdminCommunityMissionProofReviewedItemResponse.ktsrc/main/kotlin/com/zerost/api/communitymission/presentation/dto/AdminCommunityMissionProofReviewedPageResponse.ktsrc/main/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryService.ktsrc/main/kotlin/com/zerost/api/mission/domain/MissionCompletionRepository.ktsrc/main/kotlin/com/zerost/api/mission/presentation/AdminMissionReviewController.ktsrc/main/kotlin/com/zerost/api/mission/presentation/dto/AdminMissionReviewedItemResponse.kt
| @EntityGraph(attributePaths = ["communityMission", "proofRequirement", "user", "images"]) | ||
| fun findAllByStatusIn(statuses: Collection<CommunityMissionProofStatus>, pageable: Pageable): Page<CommunityMissionProof> |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Inspect Hibernate pagination/fetch configuration and existing batching support.
rg -n -i \
'fail_on_pagination_over_collection_fetch|default_batch_fetch_size|`@BatchSize`|EntityGraph\(attributePaths.*images' \
src .github 2>/dev/nullRepository: team-0st/BE
Length of output: 792
Avoid fetch-loading images in this paged query. findAllByStatusIn(..., pageable) uses @EntityGraph with the images collection, which can trigger in-memory pagination or fail when collection-fetch pagination is disallowed. Load the page of proofs first, then fetch images separately; @BatchSize can help with the follow-up loads.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@src/main/kotlin/com/zerost/api/communitymission/domain/CommunityMissionProofRepository.kt`
around lines 34 - 35, Update findAllByStatusIn so its `@EntityGraph` no longer
includes the images collection, preserving only the to-one associations for
paged database pagination. Load images separately after retrieving the page,
using the entity’s existing batch-loading mechanism such as `@BatchSize` rather
than collection fetch-joining the paged query.
Summary
GET /api/v1/admin/missions/completions/reviewed— 승인·반려 일일 인증 최대 50건GET /api/v1/admin/community-missions/proofs/reviewed— 승인·반려 공동 인증 페이지Test plan
Summary by CodeRabbit