33import static org .springframework .data .domain .Sort .Direction .DESC ;
44
55import com .somemore .auth .annotation .CurrentUser ;
6+ import com .somemore .facade .volunteerapply .VolunteerApplyQueryFacadeUseCase ;
67import com .somemore .global .common .response .ApiResponse ;
8+ import com .somemore .global .exception .BadRequestException ;
79import com .somemore .volunteerapply .domain .ApplyStatus ;
810import com .somemore .volunteerapply .dto .condition .VolunteerApplySearchCondition ;
911import com .somemore .volunteerapply .dto .response .VolunteerApplyRecruitInfoResponseDto ;
10- import com .somemore .volunteerapply .dto .response .VolunteerApplyResponseDto ;
1112import com .somemore .volunteerapply .dto .response .VolunteerApplySummaryResponseDto ;
1213import com .somemore .volunteerapply .dto .response .VolunteerApplyVolunteerInfoResponseDto ;
13- import com .somemore .facade .volunteerapply .VolunteerApplyQueryFacadeUseCase ;
1414import com .somemore .volunteerapply .usecase .VolunteerApplyQueryUseCase ;
1515import io .swagger .v3 .oas .annotations .Operation ;
1616import io .swagger .v3 .oas .annotations .tags .Tag ;
@@ -37,16 +37,20 @@ public class VolunteerApplyQueryApiController {
3737
3838 @ Operation (summary = "특정 모집글 봉사자 지원 단건 조회" , description = "특정 모집글에 대한 봉사자 지원을 조회합니다." )
3939 @ GetMapping ("/volunteer-apply/recruit-board/{recruitBoardId}/volunteer/{volunteerId}" )
40- public ApiResponse <VolunteerApplyResponseDto > getVolunteerApplyByRecruitIdAndVolunteerId (
40+ public ApiResponse <? > getVolunteerApplyByRecruitIdAndVolunteerId (
4141 @ PathVariable Long recruitBoardId ,
4242 @ PathVariable UUID volunteerId
4343 ) {
44- return ApiResponse .ok (
45- 200 ,
46- volunteerApplyQueryUseCase .getVolunteerApplyByRecruitIdAndVolunteerId (
47- recruitBoardId , volunteerId ),
48- "특정 모집글에 대한 봉사자 지원 단건 조회 성공"
49- );
44+ try {
45+ return ApiResponse .ok (
46+ 200 ,
47+ volunteerApplyQueryUseCase .getVolunteerApplyByRecruitIdAndVolunteerId (
48+ recruitBoardId , volunteerId ),
49+ "특정 모집글에 대한 봉사자 지원 단건 조회 성공"
50+ );
51+ } catch (BadRequestException e ) {
52+ return ApiResponse .ok (210 , "지원 내역이 없습니다." );
53+ }
5054 }
5155
5256 @ Operation (summary = "지원자 통계 조회" , description = "특정 모집글에 대한 지원자 통계를 조회합니다." )
0 commit comments