Skip to content

Conversation

@dh2906
Copy link
Contributor

@dh2906 dh2906 commented Jan 13, 2026

🔍 개요

  • 동아리 지원 내역 리스트를 조회하는 API 추가한다.

🚀 주요 변경 내용

  • GET /clubs/{clubId}/applications 엔드포인트를 추가했습니다.

  • 현재 동아리의 모집 일정(startDate, endDate) 범위에서 지원한 리스트를 반환합니다.

  • 지원 id, 지원자 학번, 지원자 이름, 지원 일시의 정보가 나옵니다.


💬 참고 사항

  • 이후에는 각 지원서를 상세하게 볼 수 있는 API를 추가할 예정입니다.

✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@dh2906 dh2906 requested a review from Copilot January 13, 2026 07:59
@dh2906 dh2906 self-assigned this Jan 13, 2026
@dh2906 dh2906 added the 기능 새로운 기능을 개발합니다. label Jan 13, 2026
@dh2906
Copy link
Contributor Author

dh2906 commented Jan 13, 2026

@copilot

Copy link

Copilot AI commented Jan 13, 2026

@dh2906 I've opened a new pull request, #122, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a 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}/applications endpoint 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.

Comment on lines +129 to +134
if (recruitment.getIsAlwaysRecruiting()) {
return clubApplyRepository.findAllByClubIdWithUser(clubId);
}

LocalDateTime startDateTime = recruitment.getStartDate().atStartOfDay();
LocalDateTime endDateTime = recruitment.getEndDate().atTime(LocalTime.MAX);
Copy link

Copilot AI Jan 13, 2026

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.

Copilot uses AI. Check for mistakes.
@dh2906 dh2906 merged commit 4bdb92b into main Jan 13, 2026
7 checks passed
@dh2906 dh2906 deleted the feat/CAM-167-get-club-apply-history branch January 19, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants