Skip to content

Commit 49c7198

Browse files
committed
feat(volunteer-apply): 특정 봉사 지원 리스트 조회 기능 API
1 parent 00fe262 commit 49c7198

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import com.somemore.global.common.response.ApiResponse;
77
import com.somemore.volunteerapply.domain.ApplyStatus;
88
import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition;
9-
import com.somemore.volunteerapply.dto.response.VolunteerApplyDetailResponseDto;
9+
import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto;
1010
import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto;
1111
import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto;
12+
import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto;
1213
import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase;
1314
import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase;
1415
import io.swagger.v3.oas.annotations.Operation;
@@ -60,10 +61,32 @@ public ApiResponse<VolunteerApplySummaryResponseDto> getSummaryByRecruitId(
6061
);
6162
}
6263

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+
6386
@Secured("ROLE_CENTER")
6487
@Operation(summary = "지원자 리스트 조회", description = "특정 모집글에 대한 지원자 리스트를 조회합니다.")
6588
@GetMapping("/volunteer-applies/recruit-board/{recruitBoardId}")
66-
public ApiResponse<Page<VolunteerApplyDetailResponseDto>> getVolunteerApplies(
89+
public ApiResponse<Page<VolunteerApplyVolunteerInfoResponseDto>> getVolunteerApplies(
6790
@CurrentUser UUID centerId,
6891
@PathVariable Long recruitBoardId,
6992
@PageableDefault(sort = "created_at", direction = DESC) Pageable pageable,

0 commit comments

Comments
 (0)