Skip to content

Conversation

@Jjiggu
Copy link
Contributor

@Jjiggu Jjiggu commented Sep 19, 2025

작업 요약

  • Reservation status 초기값 추가

Issue Link

#319

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 버그 수정
    • 입장 처리 과정에서 예약 상태가 비어 있거나 기본값으로 저장되어 화면에 잘못 표시되던 문제를 수정했습니다.
    • 대기/호출 단계의 예약이 확정·취소로 전환될 때 기존 대기열 상태가 정확히 반영되도록 저장 로직을 보강했습니다.
    • 앱 및 관리자 화면의 예약 목록/상세의 상태 표시와 상태별 필터·통계가 더 일관되고 신뢰성 있게 동작합니다.

@Jjiggu Jjiggu self-assigned this Sep 19, 2025
@Jjiggu Jjiggu added the refactor 리팩토링 label Sep 19, 2025
@github-actions github-actions bot requested a review from HyemIin September 19, 2025 16:03
@coderabbitai
Copy link

coderabbitai bot commented Sep 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

ReservationService.processEntryStatus에서 Redis의 currStatus가 WAITING 또는 CALLING일 때, CONFIRMED 및 CANCELLED 경로 모두에서 Reservation.builder()에 ReservationStatus.valueOf(currStatus)를 설정하도록 추가했다. 이는 DB에 생성되는 Reservation의 status가 Redis 상태를 반영하도록 했다.

Changes

Cohort / File(s) Summary
Reservation status sync in builder
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java
processEntryStatus에서 CONFIRMED/CANCELLED 흐름 중 currStatus가 WAITING/CALLING이면 Reservation.builder()에 status를 ReservationStatus.valueOf(currStatus)로 설정하도록 추가. 생성 시점의 DB Reservation.status가 Redis 상태를 반영하도록 수정.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant S as ReservationService
  participant R as Redis
  participant DB as ReservationRepository

  C->>S: processEntryStatus(reservationId, entryStatus)
  S->>R: GET currStatus by reservationId
  R-->>S: currStatus (e.g., WAITING/CALLING)

  alt entryStatus == CONFIRMED or CANCELLED
    opt currStatus in {WAITING, CALLING}
      note over S: Build Reservation with status = valueOf(currStatus)
    end
    S->>DB: Save Reservation (includes status from Redis)
    DB-->>S: Persisted Reservation
  else other flows
    S->>DB: Handle per existing logic
  end

  S-->>C: Result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • HyemIin
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#319-UserService-exception

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cfbd4d2 and d6ea54e.

📒 Files selected for processing (1)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java (2 hunks)

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.

@Jjiggu Jjiggu merged commit 8accae5 into develop Sep 19, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants