Skip to content

✨ [feat] 관리자 검수 완료 목록 API - #117

Merged
yn2511 merged 1 commit into
developfrom
feat/admin-review-completed-list
Jul 24, 2026
Merged

yn2511 merged 1 commit into
developfrom
feat/admin-review-completed-list

Conversation

@yn2511

@yn2511 yn2511 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • GET /api/v1/admin/missions/completions/reviewed — 승인·반려 일일 인증 최대 50건
  • GET /api/v1/admin/community-missions/proofs/reviewed — 승인·반려 공동 인증 페이지

Test plan

  • ADMIN으로 reviewed 조회 시 PENDING 미포함
  • 최신 검수 순 정렬
  • 비ADMIN 403

Summary by CodeRabbit

  • New Features
    • Added admin endpoints to view reviewed community-mission proofs and mission completions.
    • Reviewed records include approval status, submission and review dates, participant and mission details, and accessible image links.
    • Community-mission reviews support pagination and display the most recently reviewed items first.

관리자 검수 화면에서 승인/반려 이력을 볼 수 있도록
completions/reviewed, proofs/reviewed 조회를 추가한다.
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Admin 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.

Changes

Reviewed admin results

Layer / File(s) Summary
Community-mission reviewed proofs
src/main/kotlin/com/zerost/api/communitymission/...
Adds a paginated reviewed-proof response, repository filtering for approved/rejected proofs, service mapping with review metadata and presigned image URLs, and GET /proofs/reviewed.
Mission reviewed completions
src/main/kotlin/com/zerost/api/mission/...
Adds reviewed-completion DTO mapping, a repository query limited to 50 approved/rejected records, and GET /completions/reviewed.

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
Loading

Possibly related PRs

  • team-0st/BE#68: Introduced the community-mission proof persistence layer extended by the reviewed-proof query.
  • team-0st/BE#69: Established the community-mission admin review flow extended with reviewed results.
  • team-0st/BE#115: Added the presigned media mapping pattern reused for reviewed proofs.

Suggested reviewers: joonkyolee

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning Summary와 Test plan은 있으나 템플릿의 Issue Number, 리뷰 요청사항, 테스트 결과 섹션이 빠져 있습니다. Issue Number, 리뷰 요청사항, 테스트 결과를 템플릿대로 추가하고 각 섹션을 채워주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 관리자 검수 완료 목록 API 추가라는 मुख्य 변경을 잘 요약합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/admin-review-completed-list

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

@yn2511
yn2511 merged commit f270bfa into develop Jul 24, 2026
1 of 2 checks passed

@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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4f6ec11 and 6f39040.

📒 Files selected for processing (9)
  • src/main/kotlin/com/zerost/api/communitymission/application/AdminCommunityMissionReviewQueryService.kt
  • src/main/kotlin/com/zerost/api/communitymission/domain/CommunityMissionProofRepository.kt
  • src/main/kotlin/com/zerost/api/communitymission/presentation/AdminCommunityMissionReviewController.kt
  • src/main/kotlin/com/zerost/api/communitymission/presentation/dto/AdminCommunityMissionProofReviewedItemResponse.kt
  • src/main/kotlin/com/zerost/api/communitymission/presentation/dto/AdminCommunityMissionProofReviewedPageResponse.kt
  • src/main/kotlin/com/zerost/api/mission/application/AdminMissionReviewQueryService.kt
  • src/main/kotlin/com/zerost/api/mission/domain/MissionCompletionRepository.kt
  • src/main/kotlin/com/zerost/api/mission/presentation/AdminMissionReviewController.kt
  • src/main/kotlin/com/zerost/api/mission/presentation/dto/AdminMissionReviewedItemResponse.kt

Comment on lines +34 to +35
@EntityGraph(attributePaths = ["communityMission", "proofRequirement", "user", "images"])
fun findAllByStatusIn(statuses: Collection<CommunityMissionProofStatus>, pageable: Pageable): Page<CommunityMissionProof>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚀 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/null

Repository: 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.

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