修复后端BUG

This commit is contained in:
super
2026-07-14 22:11:19 +08:00
parent 8a9126e626
commit 8543dad514
11 changed files with 813 additions and 58 deletions
+75 -3
View File
@@ -833,7 +833,45 @@ export type ShopMatchHistoryItem = ProductRiskHistoryItem;
export type ShopMatchHistoryVo = ProductRiskHistoryVo;
export type ShopMatchTaskDetailVo = ProductRiskTaskDetailVo;
export type ShopMatchTaskBatchVo = ProductRiskTaskBatchVo;
export type ShopMatchCreateTaskVo = ProductRiskCreateTaskVo;
export interface ShopMatchCreateTaskItem {
shopName: string;
matched: boolean;
shopId?: string;
platform?: string;
companyName?: string;
openStoreUrl?: string;
matchedUserId?: number;
matchStatus?: string;
matchMessage?: string;
}
export interface ShopMatchCreateTaskResultItem {
resultId?: number;
taskId?: number;
shopName?: string;
shopId?: string;
platform?: string;
companyName?: string;
matched?: boolean;
matchStatus?: string;
matchMessage?: string;
taskStatus?: string;
success?: boolean;
error?: string;
outputFilename?: string;
downloadUrl?: string;
fileJobId?: number;
fileStatus?: string;
fileError?: string;
fileReady?: boolean;
scheduledAt?: string;
}
export interface ShopMatchCreateTaskVo {
taskId: number;
items: ShopMatchCreateTaskResultItem[];
}
export interface ShopMatchTaskStage {
stageIndex?: number;
@@ -1020,14 +1058,14 @@ export function deleteShopMatchHistory(resultId: number) {
}
export function createShopMatchTask(
items: ShopMatchShopQueueItem[],
items: ShopMatchCreateTaskItem[],
countryCodes: string[],
scheduleTimes?: string[],
) {
return unwrapJavaResponse(
post<
JavaApiResponse<ShopMatchCreateTaskVo>,
{ user_id: number; items: ShopMatchShopQueueItem[]; country_codes: string[]; schedule_times?: string[] }
{ user_id: number; items: ShopMatchCreateTaskItem[]; country_codes: string[]; schedule_times?: string[] }
>(`${JAVA_API_PREFIX}/shop-match/tasks`, {
user_id: getCurrentUserId(),
items,
@@ -1076,6 +1114,30 @@ export function getShopMatchResultDownloadUrl(resultId: number) {
return getJavaDownloadUrl(`/shop-match/results/${resultId}/download`);
}
export function getShopMatchTaskSkipAsinsPaginated(
taskId: number,
page: number = 1,
pageSize: number = 1000,
options: {
shopName?: string | string[];
countryCode?: string | string[];
} = {},
) {
return unwrapJavaResponse(
get<JavaApiResponse<ShopMatchSkipAsinPageVo>>(
`${JAVA_API_PREFIX}/shop-match/tasks/${taskId}/skip-asins/paginated`,
{
params: {
page,
page_size: pageSize,
...(options.shopName ? { shop_name: options.shopName } : {}),
...(options.countryCode ? { country_code: options.countryCode } : {}),
},
},
),
);
}
export type PatrolDeleteCandidateVo = ProductRiskCandidateVo;
export type PatrolDeleteDashboardVo = ProductRiskDashboardVo;
export type PatrolDeleteShopQueueItem = ProductRiskShopQueueItem;
@@ -2474,6 +2536,16 @@ export interface SkipPriceAsinPageVo {
minimum_price_by_country_and_asin?: Record<string, Record<string, string>>;
}
export interface ShopMatchSkipAsinPageVo {
page: number;
pageSize: number;
total: number;
totalPages: number;
queryAsins: QueryAsinCountryAsins[];
skipAsinsByCountry: Record<string, string[]>;
skipAsinDetailsByCountry: Record<string, Array<{ asin?: string; minimumPrice?: string }>>;
}
export function deletePendingPriceTrackShopResult(shopName: string) {
return unwrapJavaResponse(
del<JavaApiResponse<PriceTrackPendingDeleteVo>>(