99import dmu .dasom .api .domain .email .enums .MailType ;
1010import dmu .dasom .api .global .dto .PageResponse ;
1111
12+ import dmu .dasom .api .global .generation .service .GenerationService ;
1213import io .swagger .v3 .oas .annotations .Operation ;
1314import io .swagger .v3 .oas .annotations .Parameter ;
1415import io .swagger .v3 .oas .annotations .media .Content ;
@@ -30,6 +31,7 @@ public class AdminController {
3031
3132 private final ApplicantService applicantService ;
3233 private final RecruitService recruitService ;
34+ private final GenerationService generationService ;
3335
3436 // 지원자 조회
3537 @ Operation (summary = "지원자 전체 조회" )
@@ -102,6 +104,24 @@ public ResponseEntity<ApplicantDetailsResponseDto> updateApplicantStatus(
102104 return ResponseEntity .ok (applicantService .updateApplicantStatus (id , request ));
103105 }
104106
107+ // 기수 조회
108+ @ Operation (summary = "현재 저장된 기수 조회" )
109+ @ GetMapping ("/generation" )
110+ public ResponseEntity <String > getCurrentGeneration () {
111+ String currentGeneration = generationService .getCurrentGeneration ();
112+ return ResponseEntity .ok (currentGeneration );
113+ }
114+
115+ // 기수 수정
116+ @ Operation (summary = "기수 수정" )
117+ @ PatchMapping ("/generation" )
118+ public ResponseEntity <Void > updateGeneration (
119+ @ RequestParam @ Parameter (description = "새로운 기수 (예: '1기')" ) String generationValue
120+ ) {
121+ generationService .saveOrUpdateGeneration (generationValue );
122+ return ResponseEntity .ok ().build ();
123+ }
124+
105125 // 모집 일정 수정
106126 @ Operation (summary = "모집 일정 수정" )
107127 @ ApiResponses (value = {
0 commit comments