完成匹配、跟价、权限部分
This commit is contained in:
@@ -931,10 +931,13 @@ export interface PriceTrackShopQueueItem {
|
||||
matchMessage?: string;
|
||||
platform?: string;
|
||||
companyName?: string;
|
||||
skipAsins?: Record<string, string[]>;
|
||||
}
|
||||
|
||||
export interface PriceTrackMatchShopsVo {
|
||||
items: PriceTrackShopQueueItem[];
|
||||
skipAsinsByCountry?: Record<string, string[]>;
|
||||
asinRowsByCountry?: Record<string, PriceTrackAsinParsedRow[]>;
|
||||
}
|
||||
|
||||
export interface PriceTrackCountryPreferenceVo {
|
||||
@@ -970,9 +973,25 @@ export interface PriceTrackHistoryVo {
|
||||
items: PriceTrackHistoryItem[];
|
||||
}
|
||||
|
||||
export interface PriceTrackAsinParsedRow {
|
||||
shopMallName?: string;
|
||||
asin?: string;
|
||||
price?: string;
|
||||
recommendedPrice?: string;
|
||||
minimumPrice?: string;
|
||||
firstPlace?: string;
|
||||
secondPlace?: string;
|
||||
cartShopName?: string;
|
||||
priceChangeStatus?: string;
|
||||
modifyCount?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface PriceTrackCreateTaskVo {
|
||||
taskId: number;
|
||||
items: PriceTrackHistoryItem[];
|
||||
skipAsinsByCountry?: Record<string, string[]>;
|
||||
asinRowsByCountry?: Record<string, PriceTrackAsinParsedRow[]>;
|
||||
}
|
||||
|
||||
export interface PriceTrackTaskSummary {
|
||||
@@ -1046,11 +1065,52 @@ export function putPriceTrackCountryPreference(countryCodes: string[]) {
|
||||
);
|
||||
}
|
||||
|
||||
export function matchPriceTrackShops(shopNames: string[]) {
|
||||
export function matchPriceTrackShops(
|
||||
shopNames: string[],
|
||||
options?: {
|
||||
asinFiles?: string[];
|
||||
countryCodes?: string[];
|
||||
},
|
||||
) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackMatchShopsVo>, { userId: number; shopNames: string[] }>(
|
||||
post<
|
||||
JavaApiResponse<PriceTrackMatchShopsVo>,
|
||||
{ userId: number; shopNames: string[]; asinFiles?: string[]; countryCodes?: string[] }
|
||||
>(
|
||||
`${JAVA_API_PREFIX}/price-track/match-shops`,
|
||||
{ userId: getCurrentUserId(), shopNames },
|
||||
{
|
||||
userId: getCurrentUserId(),
|
||||
shopNames,
|
||||
asinFiles: options?.asinFiles || [],
|
||||
countryCodes: options?.countryCodes || [],
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getShopMatchTaskProgressBatch(taskIds: number[]) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<ShopMatchTaskBatchVo>, { taskIds: number[] }>(
|
||||
`${JAVA_API_PREFIX}/shop-match/tasks/progress/batch`,
|
||||
{ taskIds },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getProductRiskTaskProgressBatch(taskIds: number[]) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<ProductRiskTaskBatchVo>, { taskIds: number[] }>(
|
||||
`${JAVA_API_PREFIX}/product-risk-resolve/tasks/progress/batch`,
|
||||
{ taskIds },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getDeleteBrandTaskProgress(taskIds: number[]) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<DeleteBrandTaskBatchVo>, { taskIds: number[] }>(
|
||||
`${JAVA_API_PREFIX}/delete-brand/tasks/progress/batch`,
|
||||
{ taskIds },
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1116,6 +1176,15 @@ export function getPriceTrackTasksBatch(taskIds: number[]) {
|
||||
);
|
||||
}
|
||||
|
||||
export function getPriceTrackTaskProgressBatch(taskIds: number[]) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackTaskBatchVo>, { taskIds: number[] }>(
|
||||
`${JAVA_API_PREFIX}/price-track/tasks/progress/batch`,
|
||||
{ taskIds },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getPriceTrackResultDownloadUrl(resultId: number) {
|
||||
return getJavaDownloadUrl(`/price-track/results/${resultId}/download`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user