feat: 지원 현황 미리보기 API 추가 - #815
Conversation
Walkthrough
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
There was a problem hiding this comment.
🧹 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
📒 Files selected for processing (7)
src/main/java/com/example/solidconnection/application/controller/ApplicationController.javasrc/main/java/com/example/solidconnection/application/dto/ApplicationPreviewResponse.javasrc/main/java/com/example/solidconnection/application/dto/ApplicationUniversityPreviewResponse.javasrc/main/java/com/example/solidconnection/application/repository/ApplicationRepository.javasrc/main/java/com/example/solidconnection/application/service/ApplicationQueryService.javasrc/main/java/com/example/solidconnection/university/repository/UnivApplyInfoRepository.javasrc/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java
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/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
📒 Files selected for processing (4)
src/main/java/com/example/solidconnection/application/repository/ApplicationRepository.javasrc/main/java/com/example/solidconnection/application/service/ApplicationQueryService.javasrc/main/java/com/example/solidconnection/university/repository/UnivApplyInfoRepository.javasrc/test/java/com/example/solidconnection/application/service/ApplicationQueryServiceTest.java
|
리뷰 반영했습니다.
커밋: 99fe568 |
관련 이슈
작업 내용
지원 현황 제한 공개 API
인증 사용자가 성적/어학 제출 또는 승인 전에도 자신의 모교 기준 지원 대학을 확인할 수 있도록 GET /applications/preview를 추가했습니다.
응답 예시는 다음과 같습니다.
{ "totalUniversityCount": 3, "universities": [ { "id": 1, "koreanName": "괌대학", "studentCapacity": 5, "region": "미주권", "country": "미국", "logoImageUrl": "https://...", "backgroundImageUrl": "https://..." } ] }특이 사항
클라이언트 호출 분기는 다음과 같습니다.
예를 들어 경희대학교 사용자라면 서버가 토큰의 사용자 정보에서 경희대학교 모교 ID를 확인하고, 경희대학교에 연결된 대학만 반환합니다.
리뷰 요구사항 (선택)
검증