Repository navigation
feat: 매장 선택(메인 검색 결과) pickupStores 쿼리 추가 - #532
Conversation
홈 메인 검색(지역·픽업 날짜·시간 → 검색하기) 결과인 매장 선택 화면에 맞는 API가 없어 FE가 todayPickupStores로 임시 연결 중이었음(오늘 외 날짜 미지원, 시간은 클라이언트 필터, 지도 마커 없음, 정렬 미전달).
- SDL: pickupStores(input: PickupStoresInput!): PickupStoreConnection!(비로그인 가능)
- date 필수("YYYY-MM-DD" KST), time 선택("HH:mm"), regionIds, sort(StoreSort, 기본 인기순), offset/limit(≤50)
- 항목은 StoreCard + latitude/longitude(지도 마커, 미설정 null). 슬롯은 싣지 않음(시안 카드에 없음)
- 시간 필터: 그 슬롯이 정확히 예약 가능한 매장만(영업시간·리드타임·capacity·휴무 반영). 생략·null이면 그날 슬롯이 하나라도 있는 매장
- 검증: 형식 오류 INVALID_DATE / INVALID_TIME_VALUE, 오늘보다 앞선 날짜는 신규 PICKUP_DATE_PAST(400). 정책 상한(MAX_DAYS_AHEAD 365일)을 넘으면 조회 없이 빈 결과
- StorePickupAvailabilityService.openSlotsOn: todayPickupStores에 있던 "후보 × 하루 → 예약 가능 매장" 판정(벌크 조회 4회 + evaluatePickupDay)을 날짜 인자로 분리. todayPickupStores도 이것을 오늘로 호출(동작 불변)
- 후보 select에 좌표 추가, toCoordinate를 store-detail 매퍼에서 export해 재사용
테스트
- store-pickup-stores.service.spec 20건: 날짜 판정(요일 휴무·미설정·다른 요일·특별휴무·capacity·max_days_ahead·리드타임·오늘), 시간 필터(정확 일치·격자 밖·리드타임 마감·생략/null), 입력 검증 표 9건, 정렬·지역·페이지·좌표
- store-pickup-stores-query.resolver.spec 2건(찜 여부·비로그인)
- 오늘 픽업 service·resolver spec은 provider만 추가하고 그대로 통과
- 반증: 시간 필터 제거·available 무시·과거 검사 제거·날짜 무시·좌표 제거·sort 무시 6가지 모두 실패로 잡힘
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 90/100 (Excellent)진단 486건 (error 12).
architecture / security 상위 항목
|
Coverage report
Show new covered files 🐣
Test suite run success4292 tests passing in 386 suites. Report generated by 🧪jest coverage report action from fb09834 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
요약
todayPickupStores로 임시 연결해 두어서, 오늘 외 날짜는 안내 문구만 띄우고 시간은 클라이언트에서 거르며 지도 마커와 정렬은 비어 있었습니다.pickupStores(input: PickupStoresInput!): PickupStoreConnection!을 추가합니다(비로그인 가능).date(필수, "YYYY-MM-DD" KST),time(선택, "HH:mm"),regionIds,sort(#531의StoreSort, 기본 인기순),offset/limit(≤50)StoreCard+latitude/longitude(지도 마커, 미설정 null). 시안 카드에 없는 슬롯 배열은 싣지 않습니다.INVALID_DATE/INVALID_TIME_VALUE, 오늘보다 앞선 날짜는 신규PICKUP_DATE_PAST(400)입니다.MAX_DAYS_AHEAD365일)을 넘는 날짜는 조회 없이 빈 결과입니다. 매장별max_days_ahead를 넘으면 그 매장만 빠집니다.todayPickupStores에 있던 "후보 × 하루 → 예약 가능 매장" 판정(벌크 조회 4회 +evaluatePickupDay)을StorePickupAvailabilityService.openSlotsOn으로 분리했습니다.todayPickupStores도 이것을 오늘 날짜로 호출합니다. 동작은 그대로이고 기존 spec이 수정 없이 통과합니다(provider 추가만).toCoordinate를 export해 재사용합니다.테스트
store-pickup-stores.service.spec20건max_days_ahead·리드타임·오늘 날짜·365일 초과store-pickup-stores-query.resolver.spec2건: 찜 여부, 비로그인플랜 대조
pickupStores쿼리·PickupStoresInput(date 필수·time 선택·regionIds·sort·offset/limit)PickupStoreConnection·PickupStoreItem { store, latitude, longitude }todayPickupStores가 재사용(동작 불변)StorePickupAvailabilityService.openSlotsOnMAX_DAYS_AHEAD) 초과 시 빈 결과로 처리했습니다. 그 이상의 날짜는 어느 매장도 열릴 수 없어 같은 결과이고, 극단 연도의 DB 경계 문제도 함께 피합니다.PICKUP_DATE_PAST(400) 추가todayPickupStores회귀