-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 동아리 지원 내역 리스트 조회 API 추가 #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new API endpoint to retrieve a list of club applications for club managers. The endpoint filters applications based on the club's current recruitment period, returning all applications for always-recruiting clubs or only those within the specified date range for time-limited recruitment.
Changes:
- Added
GET /clubs/{clubId}/applicationsendpoint to retrieve club application history - Implemented filtering logic based on recruitment period (always-recruiting vs. date-range)
- Created new repository queries with JOIN FETCH to eagerly load user data and avoid N+1 queries
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ClubService.java | Added getClubApplications method with authorization checks and findApplicationsByRecruitmentPeriod helper method to filter applications |
| ClubApplyRepository.java | Added two query methods to fetch applications with user data: one for all applications and one filtered by date range |
| ClubApplicationsResponse.java | Created new DTO to encapsulate application list responses with applicant details |
| ClubController.java | Implemented controller method to handle the new endpoint |
| ClubApi.java | Added API interface definition with OpenAPI documentation |
| ClubRecruitment.java | Made images field final (good practice improvement) |
| ClubRecruitmentUpdateRequest.java | Reorganized imports |
| ClubTagMap.java | Removed extra blank line |
| ClubMember.java | Reorganized imports |
| ClubsResponse.java | Removed extra blank line |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (recruitment.getIsAlwaysRecruiting()) { | ||
| return clubApplyRepository.findAllByClubIdWithUser(clubId); | ||
| } | ||
|
|
||
| LocalDateTime startDateTime = recruitment.getStartDate().atStartOfDay(); | ||
| LocalDateTime endDateTime = recruitment.getEndDate().atTime(LocalTime.MAX); |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential NullPointerException if isAlwaysRecruiting is null. When isAlwaysRecruiting is null, the if condition evaluates to false (due to unboxing), and the code proceeds to call getStartDate().atStartOfDay() and getEndDate().atTime() on lines 133-134. However, if the recruitment was created with null dates and null isAlwaysRecruiting, this would throw a NullPointerException. Consider adding explicit null checks or using Boolean.TRUE.equals(recruitment.getIsAlwaysRecruiting()) to safely handle null values.
🔍 개요
🚀 주요 변경 내용
GET /clubs/{clubId}/applications엔드포인트를 추가했습니다.현재 동아리의 모집 일정(
startDate,endDate) 범위에서 지원한 리스트를 반환합니다.지원 id, 지원자 학번, 지원자 이름, 지원 일시의 정보가 나옵니다.
💬 참고 사항
✅ Checklist (완료 조건)