Skip to content

fix: 롯데시네마 BookingSeatCount를 잔여 좌석으로 매핑 - #176

Merged
hmmhmmhm merged 2 commits into
hmmhmmhm:mainfrom
vkehfdl1:fix/lotte-booking-seat-count-available
Aug 18, 2026
Merged

hmmhmmhm merged 2 commits into
hmmhmmhm:mainfrom
vkehfdl1:fix/lotte-booking-seat-count-available

Conversation

@vkehfdl1

Copy link
Copy Markdown
Contributor

변경 요약

롯데시네마 GetPlaySequence.BookingSeatCount를 bookedSeats로 옮기고 remainingSeats = total - BookingSeatCount로 계산하던 매핑이 반대입니다. 공식 필드명은 예매된 수처럼 보이지만, 실제 값은 예매 가능(잔여) 좌석 수입니다.

이 PR은 정규화 매핑을 고칩니다.

remainingSeats = BookingSeatCount
bookedSeats    = TotalSeatCount - BookingSeatCount

버그 증명

같은 회차를 공식 LCWS와 대조했습니다. 2026-08-17 롯데시네마 안양일번가(CinemaID=3032), 19:50 오디세이 5관:

source 값
GetPlaySequence.TotalSeatCount 193
GetPlaySequence.BookingSeatCount 159
기존 daiso bookedSeats / remainingSeats 159 / 34
GetSeats.BookingSeats.length (실제 점유) 34
GetSeats SeatStatusCode=0 (실제 빈 좌석) 159

BookingSeatCount는 잔여 159석과 같고, GetSeats 점유 34석과 같습니다. 기존 라벨대로 읽으면 잔여가 많은 회차가 매진처럼 보입니다.

네트워크 분석 문서에 있던 GetSeats.BookingCount=4 vs BookingSeatCount=28 불일치도 같은 이유입니다. 32 - 28 = 4로 맞습니다.

관련 이슈

체크리스트

  • npm run typecheck 통과
  • npm run lint 통과
  • npm run lint:biome 통과
  • npm test 통과 (1644)
  • OpenAPI 예시와 롯데 분석 문서 업데이트
  • 민감 정보 미포함

테스트 방법

npx vitest run tests/services/lottecinema/client.test.ts -t '극장/영화 조합별 회차를 정규화한다'
npm test

픽스처 TotalSeatCount=32, BookingSeatCount=28에서 remainingSeats는 28, bookedSeats는 4여야 합니다.

참고 사항

공개 daiso@1.0.10 CLI//api/lottecinema/seats 응답을 깨는 breaking change입니다. 라벨을 그대로 믿던 클라이언트는 잔여/예매가 뒤집혀 있었습니다.

공식 GetPlaySequence.BookingSeatCount는 예매된 수가 아니라 예매 가능 좌석 수다.
GetSeats 점유 좌석 수와 대조하면 bookedSeats/remainingSeats 라벨이 반대였다.

related: NomaDamas/k-skill#598
@vkehfdl1
vkehfdl1 requested a review from hmmhmmhm as a code owner August 17, 2026 10:38
@vkehfdl1

Copy link
Copy Markdown
Contributor Author

안녕하세요.
NomaDamas/k-skill#598
해당 이슈 참고 바랍니다.
감사합니다.

@hmmhmmhm

Copy link
Copy Markdown
Owner

확인 감사합니다

@hmmhmmhm
hmmhmmhm merged commit a92595e into hmmhmmhm:main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants