Unique Product Upload - Import
Mô tả tổng quan
Upload file CSV chứa danh sách sản phẩm “unique” để xử lý nền (background job).
Sơ đồ hoạt động
---
config:
theme: base
layout: dagre
flowchart:
curve: linear
htmlLabels: true
themeVariables:
edgeLabelBackground: "transparent"
---
flowchart TB
Client[Client App]
Controller[UniqueProductWishlistController]
Service(UniqueProductUploadService)
Storage[(GCS)]
Queue[(Queue)]
Client --- Step1[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #6699cc !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>1</span>
<p style='margin-top: 8px'>POST CSV</p>
</div>
]
Step1 --> Controller
Controller --- Step2[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #6699cc !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>2</span>
<p style='margin-top: 8px'>Auth & Validate</p>
</div>
]
Step2 --> Service
Service --- Step3[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #6699cc !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>3</span>
<p style='margin-top: 8px'>Lưu file</p>
</div>
]
Step3 --> Storage
Service --- Step4[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #6699cc !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>4</span>
<p style='margin-top: 8px'>Đẩy job</p>
</div>
]
Step4 --> Queue
Queue --> Service
Service --> Controller
Controller --> Client
Swagger Link
API: Unique Product Upload Import
API Endpoint
- POST
/api/v1/general/unique-product-upload/import - Auth: Required (General)
- Content-Type: multipart/form-data
Request
file(required): CSV file
Error Handling
| Code | Message |
|---|---|
| 400 | Invalid file |
| 401 | Unauthorized |
| 413 | Payload too large |
| 500 | Internal error |