Skip to content

Commit 0a91f2b

Browse files
hodoonysw789
andauthored
fix: 면접 예약 API 조회 기능 추가
* feat: 면접 예약 API 구현 * feat: 면접 예약 API InterviewSlotRepository 쿼리 추가 * feat: 면접 예약 API * fix: 면접 예약 API 수정 완료 * feat: Google Credentials 주입 방식 파일이 아닌 JSON 값으로 받도록 수정 - 그 외 코드 포맷팅 개선 * chore: .gitignore 적용되지 않는 항목 제거 * fix: 면접 예약 API 수정 완료 * fix: 면접 예약 API 수정 완료 * fix: 면접 예약 API 조회 기능 추가 --------- Co-authored-by: Seungwan Yoo <[email protected]>
1 parent a61276d commit 0a91f2b

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/main/java/dmu/dasom/api/domain/interview/service/InterviewService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ public interface InterviewService {
2222
// 면접 예약 취소
2323
void cancelReservation(Long reservationId, Long applicantId);
2424

25+
List<InterviewSlotResponseDto> getAllInterviewSlots();
2526

2627
}

src/main/java/dmu/dasom/api/domain/interview/service/InterviewServiceImpl.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,13 @@ public void cancelReservation(Long reservationId, Long applicantId) {
131131
// 예약 삭제
132132
interviewReservationRepository.delete(reservation);
133133
}
134+
135+
@Override
136+
public List<InterviewSlotResponseDto> getAllInterviewSlots() {
137+
return interviewSlotRepository.findAll()
138+
.stream()
139+
.map(InterviewSlotResponseDto::new)
140+
.toList();
141+
}
134142

135143
}

src/main/java/dmu/dasom/api/domain/recruit/controller/RecruitController.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,22 @@ public ResponseEntity<Void> reserveInterviewSlot(@Valid @RequestBody InterviewRe
110110
return ResponseEntity.ok().build();
111111
}
112112

113+
// 예약 가능한 면접 일정 조회
114+
@Operation(summary = "예약 가능한 면접 일정 조회", description = "예약 가능한 면접 슬롯 목록을 조회합니다.")
115+
@ApiResponse(responseCode = "200", description = "예약 가능한 면접 슬롯 조회 성공")
116+
@GetMapping("/interview/available")
117+
public ResponseEntity<List<InterviewSlotResponseDto>> getAvailableInterviewSlots() {
118+
List<InterviewSlotResponseDto> availableSlots = interviewService.getAvailableSlots();
119+
return ResponseEntity.ok(availableSlots);
120+
}
121+
122+
// 모든 면접 일정 조회
123+
@Operation(summary = "모든 면접 일정 조회", description = "모든 면접 슬롯 목록을 조회합니다.")
124+
@ApiResponse(responseCode = "200", description = "모든 면접 슬롯 조회 성공")
125+
@GetMapping("/interview/all")
126+
public ResponseEntity<List<InterviewSlotResponseDto>> getAllInterviewSlots() {
127+
List<InterviewSlotResponseDto> allSlots = interviewService.getAllInterviewSlots();
128+
return ResponseEntity.ok(allSlots);
129+
}
113130

114131
}

0 commit comments

Comments
 (0)