Skip to content

✨ Feat: (사용자) 홈 - 면접관/안내자로 배정된 전체 타임슬롯 스케줄 조회 - #175

Merged
EunjinWoo merged 5 commits into
developfrom
feat/#171-home
Feb 1, 2026
Merged

EunjinWoo merged 5 commits into
developfrom
feat/#171-home

Conversation

@EunjinWoo

@EunjinWoo EunjinWoo commented Feb 1, 2026 •

Copy link
Copy Markdown
Member

✨ Related Issue


📌 Task Details

  • 면접관/안내자로 필터링
  • 배정된 모든 면접 스케줄 조회

💬 Review Requirements (Optional)

Summary by CodeRabbit

릴리스 노트

  • 새 기능
    • 사용자가 자신의 역할에 따라 필터링된 인터뷰 일정을 조회할 수 있는 새로운 일정 조회 기능이 추가되었습니다. 이제 사용자는 개인 인터뷰 시간대를 날짜별로 정리하여 확인할 수 있습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@EunjinWoo EunjinWoo self-assigned this Feb 1, 2026
@EunjinWoo EunjinWoo added the 🌟feature 새로운 기능 label Feb 1, 2026
@coderabbitai

coderabbitai Bot commented Feb 1, 2026 •

Copy link
Copy Markdown

요약

사용자의 역할에 따라 필터링된 면접 일정을 조회하는 새로운 엔드포인트 추가 및 이를 지원하는 DTO, 서비스, 저장소, 어셈블러 컴포넌트를 도입했습니다.

변경 사항

응집도 / 파일 요약
컨트롤러 레이어
src/main/java/KUSITMS/WITHUS/domain/interview/interview/controller/InterviewController.java, src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/controller/TimeSlotController.java
면접 일정 조회 엔드포인트 추가 및 기존 타임슬롯 상세 반환 타입 변경
DTO 재구조화
src/main/java/KUSITMS/WITHUS/domain/interview/interview/dto/InterviewResponseDTO.java, src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/dto/TimeSlotResponseDTO.java
면접 일정 응답 DTO에 Schedule, DateGroup 추가 및 TimeSlotResponseDTO를 클래스로 재구조화하여 Detail, ScheduleCard 중첩 레코드 추가
서비스 레이어
src/main/java/KUSITMS/WITHUS/domain/interview/interview/service/InterviewService.java, src/main/java/KUSITMS/WITHUS/domain/interview/interview/service/InterviewServiceImpl.java, src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/service/TimeSlotService.java, src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/service/TimeSlotServiceImpl.java
사용자의 면접 일정 조회 로직 구현 및 타임슬롯 상세 메서드 반환 타입 변경
저장소 레이어
src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/repository/TimeSlot*, src/main/java/KUSITMS/WITHUS/domain/interview/timeslotUser/repository/TimeSlotUser*
ID 목록으로 타임슬롯 조회 및 사용자 역할에 따른 타임슬롯 ID 조회 메서드 추가
새로운 어셈블러
src/main/java/KUSITMS/WITHUS/domain/interview/interview/service/assembler/InterviewScheduleAssembler.java
타임슬롯 사용자 로드, 스케줄 카드 생성, 날짜별 그룹화를 담당하는 새로운 어셈블러 컴포넌트

시퀀스 다이어그램

sequenceDiagram
    actor User
    participant Client
    participant InterviewController
    participant InterviewService
    participant InterviewScheduleAssembler
    participant TimeSlotRepository
    participant TimeSlotUserRepository
    
    User->>Client: GET /me/schedules?role=INTERVIEWER
    Client->>InterviewController: getMyInterviewSchedule(user, role)
    InterviewController->>InterviewService: getMyInterviewSchedule(user, role)
    
    InterviewService->>TimeSlotUserRepository: findMyTimeSlotIds(userId, role)
    TimeSlotUserRepository-->>InterviewService: List<Long> timeSlotIds
    
    InterviewService->>TimeSlotRepository: findAllByIdIn(timeSlotIds)
    TimeSlotRepository-->>InterviewService: List<TimeSlot> slots
    
    InterviewService->>InterviewScheduleAssembler: loadTimeSlotUsersGrouped(timeSlotIds)
    InterviewScheduleAssembler->>TimeSlotUserRepository: findAllByTimeSlotIdInWithUser(timeSlotIds)
    TimeSlotUserRepository-->>InterviewScheduleAssembler: List<TimeSlotUser> users
    InterviewScheduleAssembler-->>InterviewService: Map<Long, List<TimeSlotUser>>
    
    InterviewService->>InterviewScheduleAssembler: buildScheduleCards(slots, tsUsersBySlotId)
    InterviewScheduleAssembler-->>InterviewService: List<ScheduleCard>
    
    InterviewService->>InterviewScheduleAssembler: groupCardsByDate(slots, cards)
    InterviewScheduleAssembler-->>InterviewService: List<DateGroup>
    
    InterviewService-->>InterviewController: Schedule DTO
    InterviewController-->>Client: SuccessResponse<Schedule>
    Client-->>User: 사용자 면접 일정 반환
Loading

예상 코드 리뷰 노력

🎯 4 (복잡함) | ⏱️ ~50분

관련 가능성 있는 PR

  • WITHUS-BE#141: 타임슬롯 지원자/응답 타입 및 관련 저장소/서비스 수정, 타임슬롯 지원자 로드/그룹화 로직 추가
  • WITHUS-BE#161: 면접 타임슬롯 DTO 및 관련 타임슬롯 코드(타임슬롯 저장소/서비스) 수정

추천 리뷰어

  • SeongHo5356
  • KJaeKwan

시를 담은 축하 메시지

🐰 새로운 일정 조회의 장을 열고
날짜별로 면접을 정렬하고
역할에 맞춰 사용자를 필터하네.
어셈블러가 차곡차곡 쌓아
아름다운 스케줄을 완성했군요! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항을 명확하게 요약하고 있습니다. 사용자가 면접관/안내자로 배정된 전체 타임슬롯 스케줄을 조회하는 기능을 구현했으며, 제목이 이를 정확히 반영하고 있습니다.
Description check ✅ Passed PR 설명이 저장소의 필수 템플릿 구조를 따르고 있습니다. 관련 이슈(#171)와 구현된 작업 상세(면접관/안내자 필터링, 배정된 모든 면접 스케줄 조회)가 모두 포함되어 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#171-home

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/dto/TimeSlotResponseDTO.java`:
- Around line 53-64: The ScheduleCard.from factory calls
slot.getInterview().getId() without a null check, risking an NPE; update
TimeSlotResponseDTO.ScheduleCard.from to defensively handle a null interview
(e.g., compute interviewId = slot.getInterview() != null ?
slot.getInterview().getId() : null) before constructing the ScheduleCard,
mirroring the null-check pattern used in Detail.from for organizationRole so the
DTO can be created safely when slot.getInterview() is null.

In
`@src/main/java/KUSITMS/WITHUS/domain/interview/timeslotUser/repository/TimeSlotUserJpaRepository.java`:
- Around line 13-20: The JPQL IN query in
TimeSlotUserJpaRepository.findAllByTimeSlotIdInWithUser can fail when given an
empty timeSlotIds list; add a safe wrapper (e.g., default method
findAllByTimeSlotIdInWithUserSafe) on the TimeSlotUserJpaRepository that returns
Collections.emptyList() if timeSlotIds is null or empty, otherwise delegates to
findAllByTimeSlotIdInWithUser(timeSlotIds), so callers can use the safe method
and avoid the Hibernate "in ()" error.
🧹 Nitpick comments (1)
src/main/java/KUSITMS/WITHUS/domain/interview/timeslot/dto/TimeSlotResponseDTO.java (1)

43-52: ScheduleCard 레코드에 @Schema 어노테이션 누락

Detail 레코드의 필드들은 모두 @Schema 어노테이션이 적용되어 있지만, ScheduleCard 레코드의 필드들에는 누락되어 있습니다. API 문서화의 일관성을 위해 추가를 고려해 주세요.

📝 `@Schema` 어노테이션 추가 제안
 public record ScheduleCard(
-        Long timeSlotId,
-        Long interviewId,
-        String roomName,
+        `@Schema`(description = "타임슬롯 ID") Long timeSlotId,
+        `@Schema`(description = "인터뷰 ID") Long interviewId,
+        `@Schema`(description = "면접실 이름") String roomName,
         `@TimeFormat` LocalTime startTime,
         `@TimeFormat` LocalTime endTime,
-        List<ApplicationResponseDTO.Applicant> applicants,
-        List<UserResponseDTO.Summary> interviewers,
-        List<UserResponseDTO.Summary> assistants
+        `@Schema`(description = "배정된 지원자 목록") List<ApplicationResponseDTO.Applicant> applicants,
+        `@Schema`(description = "면접관 목록") List<UserResponseDTO.Summary> interviewers,
+        `@Schema`(description = "안내자 목록") List<UserResponseDTO.Summary> assistants
 ) {

@EunjinWoo
EunjinWoo merged commit d0e4630 into develop Feb 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant