조사를 완료했습니다. 뱃지가 그려지는 진입점부터 백엔드 API까지 전 경로를 추적했습니다. 결론부터 정리합니다.
프론트는 노출조건에 상품별 지원금 대상 여부 필드 하나를 AND로 추가하면 됩니다.
// 현재
isKt4SaleFestaPeriod() && !product.isSoldOut && !product.isOnlineEvent
// 변경 후
isKt4SaleFestaPeriod() && !product.isSoldOut && !product.isOnlineEvent && product.isSaleFestaSupport
이를 위해 백엔드는 상품 응답에 "지원금 지원상품 여부" 필드를 내려줘야 하고, 뱃지가 노출되는 모든 화면의 상품 데이터 소스가 그 대상입니다.
뱃지는 Items/ProductCard, Items/Carousel 두 컴포넌트에서만 렌더링됩니다. 이 둘로 데이터를 흘려보내는 경로는 다음 9곳이며, 백엔드 API 기준으로는 3개로 수렴합니다.
| # | 노출 화면 | 컴포넌트 | 프론트 포맷 함수 | 백엔드 API |
|---|---|---|---|---|
| 1 | 메인 프리오더 | Items/Carousel | formatToProduct (@/libs/format) |
GET /products |
| 2 | 메인 K-Style | Items/Carousel | 〃 | GET /products |
| 3 | J-POP New Releases | Items/Carousel | 〃 | GET /products |
| 4 | 스토어프론트 Preorder | Items/Carousel | 〃 | GET /products |
| 5 | 스토어프론트 ByCategory(뷰티/패션) | Items/Carousel | 〃 | GET /products |
| 6 | 상품목록(goodsList) | Items/ProductCard | 〃 (SSR + 무한스크롤) | GET /products |
| 7 | 상품상세-아티스트 상품 | Items/Carousel | formatArtistBrandProduct |
POST /selectArtistBrandList (legacy) |
| 8 | 이벤트(eventinfo) | Items/ProductCard | formatToProduct (eventinfo/libs) |
이벤트 상품 V2 API |
| 9 | 이벤트(eventsub) | Items/ProductCard | formatToProduct (eventsub/libs) |
이벤트 상품 V2 API |
GET /products — 일반 상품 리스트 (V1) ★최우선productFetcher.get('/products') — src/hooks/useProductsQuery.ts, src/pages/k-fashion/hooks/useProductsQuery.ts, src/services/productList/hooks/useInfiniteProductsQuery.ts, goodsList SSRProductV1 (src/types/products.ts:120) — camelCasesaleYn: 'Y' | 'N', onlineEventYn: 'Y' | 'N'saleFestaSupportYn: 'Y' | 'N' (또는 boolean)POST /selectArtistBrandList — 아티스트/브랜드 상품 (legacy)legacyApiFetcher.post('/selectArtistBrandList') — src/pages/iteminfo/hooks/useArtistProducts.ts