11package dmu .dasom .api .global .admin .controller ;
22
3+ import dmu .dasom .api .domain .applicant .dto .ApplicantDetailsResponseDto ;
34import dmu .dasom .api .domain .applicant .dto .ApplicantResponseDto ;
45import dmu .dasom .api .domain .applicant .service .ApplicantService ;
56import dmu .dasom .api .global .dto .PageResponse ;
1314import lombok .RequiredArgsConstructor ;
1415import org .springframework .http .ResponseEntity ;
1516import org .springframework .web .ErrorResponse ;
16- import org .springframework .web .bind .annotation .GetMapping ;
17- import org .springframework .web .bind .annotation .RequestMapping ;
18- import org .springframework .web .bind .annotation .RequestParam ;
19- import org .springframework .web .bind .annotation .RestController ;
17+ import org .springframework .web .bind .annotation .*;
2018
2119@ RestController
2220@ RequestMapping ("/api/admin" )
@@ -26,7 +24,7 @@ public class AdminController {
2624 private final ApplicantService applicantService ;
2725
2826 // 지원자 조회
29- @ Operation (summary = "지원자 조회" )
27+ @ Operation (summary = "지원자 전체 조회" )
3028 @ ApiResponses (value = {
3129 @ ApiResponse (responseCode = "200" , description = "지원자 조회 성공" ),
3230 @ ApiResponse (responseCode = "400" , description = "잘못된 요청" ,
@@ -36,7 +34,7 @@ public class AdminController {
3634 examples = {
3735 @ ExampleObject (
3836 name = "조회 결과 없음" ,
39- value = "{ \" code\" : \" C011 \" , \" message\" : \" 조회 결과가 없습니다.\" }"
37+ value = "{ \" code\" : \" C012 \" , \" message\" : \" 조회 결과가 없습니다.\" }"
4038 )
4139 }
4240 )
@@ -49,4 +47,26 @@ public ResponseEntity<PageResponse<ApplicantResponseDto>> getApplicants(
4947 return ResponseEntity .ok (applicantService .getApplicants (page ));
5048 }
5149
50+ // 지원자 상세 조회
51+ @ Operation (summary = "지원자 상세 조회" )
52+ @ ApiResponses (value = {
53+ @ ApiResponse (responseCode = "200" , description = "지원자 상세 조회 성공" ),
54+ @ ApiResponse (responseCode = "400" , description = "잘못된 요청" ,
55+ content = @ Content (
56+ mediaType = "application/json" ,
57+ schema = @ Schema (implementation = ErrorResponse .class ),
58+ examples = {
59+ @ ExampleObject (
60+ name = "조회 결과 없음" ,
61+ value = "{ \" code\" : \" C012\" , \" message\" : \" 조회 결과가 없습니다.\" }"
62+ )
63+ }
64+ )
65+ )
66+ })
67+ @ GetMapping ("/applicants/{id}" )
68+ public ResponseEntity <ApplicantDetailsResponseDto > getApplicant (@ PathVariable ("id" ) @ Min (0 ) final Long id ) {
69+ return ResponseEntity .ok (applicantService .getApplicant (id ));
70+ }
71+
5272}
0 commit comments