feat: 商品详情大SKU改为单接口异步提交
All checks were successful
Build and Deploy TenantUI / build-and-deploy (push) Successful in 53s
All checks were successful
Build and Deploy TenantUI / build-and-deploy (push) Successful in 53s
This commit is contained in:
@@ -24,6 +24,13 @@ export type ProductSkuSaveJobStatus =
|
||||
| 'running'
|
||||
| 'succeeded';
|
||||
|
||||
/** 商品异步保存中的 SKU 任务状态。 */
|
||||
export type ProductSaveAsyncSkuJobStatus =
|
||||
| 'failed'
|
||||
| 'not_required'
|
||||
| 'queued'
|
||||
| 'running';
|
||||
|
||||
/** 分类展示渠道。 */
|
||||
export type ProductCategoryChannel = 'dine_in' | 'pickup' | 'wm';
|
||||
|
||||
@@ -270,6 +277,15 @@ export interface SaveProductDto {
|
||||
warningStock?: null | number;
|
||||
}
|
||||
|
||||
/** 商品异步保存响应。 */
|
||||
export interface SaveProductAsyncDto {
|
||||
message: null | string;
|
||||
productId: string;
|
||||
skuJobId: null | string;
|
||||
skuJobStatus: ProductSaveAsyncSkuJobStatus;
|
||||
storeId: string;
|
||||
}
|
||||
|
||||
/** 创建 SKU 异步保存任务参数。 */
|
||||
export interface CreateProductSkuSaveJobDto {
|
||||
productId: string;
|
||||
@@ -727,6 +743,11 @@ export async function saveProductApi(data: SaveProductDto) {
|
||||
return requestClient.post<ProductDetailDto>('/product/save', data);
|
||||
}
|
||||
|
||||
/** 异步保存商品(基础信息落库 + SKU 入队)。 */
|
||||
export async function saveProductAsyncApi(data: SaveProductDto) {
|
||||
return requestClient.post<SaveProductAsyncDto>('/product/save-async', data);
|
||||
}
|
||||
|
||||
/** 创建 SKU 异步保存任务。 */
|
||||
export async function createProductSkuSaveJobApi(
|
||||
data: CreateProductSkuSaveJobDto,
|
||||
|
||||
Reference in New Issue
Block a user