[Feat/#190] 상품 임시저장을 마켓 목록 동기화 방식으로 변경 - #191
Conversation
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
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 |
| val requestIds = commands.map { it.id }.toSet() | ||
| val idsToDelete = preparedProductRepository.findAllIdsByMarketId(marketId).filter { it !in requestIds } | ||
|
|
#️⃣연관된 이슈
📝작업 내용
상품 임시저장(
PUT /draft)이 이제 요청 바디를 마켓 임시저장 목록의 최종 상태로 취급한다. 바디에 없는 ID의 기존 임시저장 상품은 삭제하고, 있는 상품은 갱신한다.PreparedProductRepository에 마켓의 임시저장 상품 ID 목록 조회 메서드(findAllIdsByMarketId) 추가 — 전체 엔티티 대신 ID projection 쿼리로 조회PreparedProductUpdater.updateDrafts→syncDrafts(marketId, commands)로 변경. 마켓 기존 임시저장 ID 중 바디에 없는 것은softDeleteByIds로 삭제, 나머지는 갱신. 삭제·갱신을@Transactional로 원자적으로 묶음 (PreparedProductConfirmer와 동일한 Implement Layer 패턴)PreparedProductService.saveDrafts가 새 동기화 로직 호출validateOwnership,validateAllInMarket)은 유지 — 바디 ID는 여전히 해당 마켓의 임시저장 상품이어야 함(새 상품 생성 없음)💬리뷰 요구사항(선택)
BaseSoftDeleteEntity, 기존softDeleteByIds재사용)