Skip to content

feat: 지원 현황 미리보기 API 추가 - #815

Merged
manNomi merged 3 commits into
developfrom
agent/application-status-preview-api
Jul 31, 2026
Merged

feat: 지원 현황 미리보기 API 추가#815
manNomi merged 3 commits into
developfrom
agent/application-status-preview-api

Conversation

@manNomi

@manNomi manNomi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

관련 이슈

작업 내용

지원 현황 제한 공개 API

인증 사용자가 성적/어학 제출 또는 승인 전에도 자신의 모교 기준 지원 대학을 확인할 수 있도록 GET /applications/preview를 추가했습니다.

  • 요청에서 대학 ID를 받지 않습니다.
  • 서버가 인증된 사용자의 homeUniversityId를 직접 사용합니다.
  • 현재 학기이면서 해당 모교에 연결된 지원 가능 대학 수만 totalUniversityCount로 반환합니다.
  • 해당 모교의 승인·미삭제 지원서에 포함된 대학만 중복 없이 반환합니다.
  • 모교가 아직 등록되지 않은 사용자는 다른 학교 데이터가 노출되지 않도록 빈 응답을 받습니다.
  • 지원자 배열, 지원자 수, 닉네임, 성적은 DTO와 쿼리 projection에서 제외했습니다.
  • 기존 GET /applications의 승인 후 전체 조회 정책은 변경하지 않았습니다.

응답 예시는 다음과 같습니다.

{
  "totalUniversityCount": 3,
  "universities": [
    {
      "id": 1,
      "koreanName": "괌대학",
      "studentCapacity": 5,
      "region": "미주권",
      "country": "미국",
      "logoImageUrl": "https://...",
      "backgroundImageUrl": "https://..."
    }
  ]
}

특이 사항

클라이언트 호출 분기는 다음과 같습니다.

  • 비로그인: 지원 API 호출 없음
  • 로그인 + 성적/어학 미제출: GET /applications/preview
  • 로그인 + 성적/어학 제출·미승인: GET /applications/preview
  • 로그인 + 성적/어학 모두 승인: GET /applications

예를 들어 경희대학교 사용자라면 서버가 토큰의 사용자 정보에서 경희대학교 모교 ID를 확인하고, 경희대학교에 연결된 대학만 반환합니다.

리뷰 요구사항 (선택)

  • 요청 파라미터 없이 인증 사용자 모교로 범위를 제한하는 방식
  • 모교 미등록 사용자에게 명시적 오류를 반환하는 정책
  • 전체 대학 수와 지원 대학 목록 모두 같은 모교 범위를 사용하는지
  • 응답에서 지원자 관련 데이터가 완전히 배제되었는지

검증

  • bash gradlew test --tests 'com.example.solidconnection.application.service.ApplicationQueryServiceTest'
  • bash gradlew test
  • Java 21 환경에서 전체 테스트 통과

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

  1. 미리보기 응답 모델 추가
    전체 대학 수와 대학별 정보로 구성된 응답 DTO 및 도메인 매핑 메서드가 추가되었습니다.

  2. 조회 로직 및 저장소 확장
    사용자의 모교와 현재 학기를 기준으로 대학 미리보기 목록과 대학 수를 조회하도록 서비스와 저장소가 확장되었으며, 관련 예외 및 테스트가 추가되었습니다.

  3. API 엔드포인트 추가
    GET /applications/preview가 인증된 사용자 ID로 미리보기 응답을 반환합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: wibaek, whqtker, gyuhyeok99

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed 지원 현황 미리보기 API 추가라는 제목이 이번 변경의 핵심인 GET /applications/preview 추가를 잘 요약합니다.
Description check ✅ Passed 작업 내용, 특이 사항, 리뷰 요구사항, 검증까지 포함되어 있어 템플릿을 대부분 충족합니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/application-status-preview-api

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.

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

🧹 Nitpick comments (1)
src/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java (1)

107-135: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

승인 상태 제외 케이스도 고정해 주세요.

현재는 삭제·중복만 검증합니다. PENDING 또는 REJECTED 지원서가 선택한 대학은 응답에 포함되지 않는 테스트를 추가해 verifyStatus = APPROVED 필터의 회귀를 막아 주세요.

🤖 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/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java`
around lines 107 - 135, Extend the test method
현재_학기에_승인되고_삭제되지_않은_지원서의_대학만_중복_없이_조회한다 to create PENDING and REJECTED
applications selecting universities, then assert those universities are excluded
from getApplicantUniversityPreviews while approved, non-deleted universities
remain included. Use the existing application fixture and status-setting APIs,
and keep the duplicate and deleted-application assertions intact.
🤖 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.

Nitpick comments:
In
`@src/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java`:
- Around line 107-135: Extend the test method
현재_학기에_승인되고_삭제되지_않은_지원서의_대학만_중복_없이_조회한다 to create PENDING and REJECTED
applications selecting universities, then assert those universities are excluded
from getApplicantUniversityPreviews while approved, non-deleted universities
remain included. Use the existing application fixture and status-setting APIs,
and keep the duplicate and deleted-application assertions intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 78cc38a2-27a2-4c85-ab06-e440d97d9736

📥 Commits

Reviewing files that changed from the base of the PR and between dfbb08d and d7e44a7.

📒 Files selected for processing (7)
  • src/main/java/com/example/solidconnection/application/controller/ApplicationController.java
  • src/main/java/com/example/solidconnection/application/dto/ApplicationPreviewResponse.java
  • src/main/java/com/example/solidconnection/application/dto/ApplicationUniversityPreviewResponse.java
  • src/main/java/com/example/solidconnection/application/repository/ApplicationRepository.java
  • src/main/java/com/example/solidconnection/application/service/ApplicationQueryService.java
  • src/main/java/com/example/solidconnection/university/repository/UnivApplyInfoRepository.java
  • src/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java

@Hexeong Hexeong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고생하십니다~ 리뷰 남겨두겠습니다!

@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/java/com/example/solidconnection/application/service/ApplicationQueryService.java`:
- Around line 51-52: ApplicationQueryService의 미리보기 조회 흐름에서 homeUniversityId가
null인 경우 CustomException을 던지지 말고 빈 ApplicationPreviewResponse를 반환하도록 변경하세요. 기존
정상 조회 경로는 유지하고, 해당 예외를 기대하는 테스트는 빈 목록과 총 건수 0을 검증하도록 갱신하세요.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0ae0da3-1c56-43b2-8b4b-25af6a72b587

📥 Commits

Reviewing files that changed from the base of the PR and between d7e44a7 and 99fe568.

📒 Files selected for processing (4)
  • src/main/java/com/example/solidconnection/application/repository/ApplicationRepository.java
  • src/main/java/com/example/solidconnection/application/service/ApplicationQueryService.java
  • src/main/java/com/example/solidconnection/university/repository/UnivApplyInfoRepository.java
  • src/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java

@manNomi

manNomi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

리뷰 반영했습니다.

  • 모교 미등록 시 SCHOOL_EMAIL_NOT_VERIFIED 오류 반환
  • 조회 쿼리를 UnivApplyInfo + EXISTS 구조로 변경
  • DisplayName 및 PENDING/REJECTED 제외 테스트 추가

커밋: 99fe568

@Hexeong Hexeong added 기능 최종 리뷰 최소 1명 필수 labels Jul 30, 2026

@Hexeong Hexeong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고생하셨습니다!

@manNomi
manNomi merged commit 065564c into develop Jul 31, 2026
5 checks passed
@whqtker
whqtker deleted the agent/application-status-preview-api branch August 1, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 최종 리뷰 최소 1명 필수

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants