|
6 | 6 | import com.somemore.global.common.response.ApiResponse; |
7 | 7 | import com.somemore.volunteerapply.domain.ApplyStatus; |
8 | 8 | import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; |
9 | | -import com.somemore.volunteerapply.dto.response.VolunteerApplyDetailResponseDto; |
| 9 | +import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; |
10 | 10 | import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; |
11 | 11 | import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; |
| 12 | +import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; |
12 | 13 | import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; |
13 | 14 | import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; |
14 | 15 | import io.swagger.v3.oas.annotations.Operation; |
@@ -60,10 +61,32 @@ public ApiResponse<VolunteerApplySummaryResponseDto> getSummaryByRecruitId( |
60 | 61 | ); |
61 | 62 | } |
62 | 63 |
|
| 64 | + @Operation(summary = "특정 봉사자 봉사 지원 리스트 조회", description = "특정 봉사자의 봉사 지원 리스트를 조회합니다.") |
| 65 | + @GetMapping("/volunteer-applies/volunteer/{volunteerId}") |
| 66 | + public ApiResponse<Page<VolunteerApplyRecruitInfoResponseDto>> getVolunteerAppliesByVolunteerId( |
| 67 | + @PathVariable UUID volunteerId, |
| 68 | + @PageableDefault(sort = "created_at", direction = DESC) Pageable pageable, |
| 69 | + @RequestParam(required = false) Boolean attended, |
| 70 | + @RequestParam(required = false) ApplyStatus status |
| 71 | + ) { |
| 72 | + VolunteerApplySearchCondition condition = VolunteerApplySearchCondition.builder() |
| 73 | + .attended(attended) |
| 74 | + .status(status) |
| 75 | + .pageable(pageable) |
| 76 | + .build(); |
| 77 | + |
| 78 | + return ApiResponse.ok( |
| 79 | + 200, |
| 80 | + volunteerApplyQueryFacadeUseCase.getVolunteerAppliesByVolunteerId(volunteerId, |
| 81 | + condition), |
| 82 | + "봉사 지원 리스트 조회 성공" |
| 83 | + ); |
| 84 | + } |
| 85 | + |
63 | 86 | @Secured("ROLE_CENTER") |
64 | 87 | @Operation(summary = "지원자 리스트 조회", description = "특정 모집글에 대한 지원자 리스트를 조회합니다.") |
65 | 88 | @GetMapping("/volunteer-applies/recruit-board/{recruitBoardId}") |
66 | | - public ApiResponse<Page<VolunteerApplyDetailResponseDto>> getVolunteerApplies( |
| 89 | + public ApiResponse<Page<VolunteerApplyVolunteerInfoResponseDto>> getVolunteerApplies( |
67 | 90 | @CurrentUser UUID centerId, |
68 | 91 | @PathVariable Long recruitBoardId, |
69 | 92 | @PageableDefault(sort = "created_at", direction = DESC) Pageable pageable, |
|
0 commit comments