改造后台权限和APP权限
This commit is contained in:
@@ -955,6 +955,8 @@ export interface PriceTrackDashboardVo {
|
||||
export interface PriceTrackHistoryItem {
|
||||
resultId?: number;
|
||||
taskId?: number;
|
||||
loopRunId?: number;
|
||||
roundIndex?: number;
|
||||
shopName?: string;
|
||||
shopId?: number | string | null;
|
||||
platform?: string;
|
||||
@@ -998,6 +1000,8 @@ export interface PriceTrackTaskSummary {
|
||||
id?: number;
|
||||
taskNo?: string;
|
||||
status?: string;
|
||||
loopRunId?: number;
|
||||
roundIndex?: number;
|
||||
errorMessage?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
@@ -1146,6 +1150,45 @@ export interface PriceTrackCreateTaskRequest {
|
||||
items: PriceTrackShopQueueItem[];
|
||||
asinFiles: string[];
|
||||
countryCodes: string[];
|
||||
loopRunId?: number;
|
||||
roundIndex?: number;
|
||||
shopIndex?: number;
|
||||
}
|
||||
|
||||
export type PriceTrackExecutionMode = "FINITE" | "INFINITE";
|
||||
|
||||
export interface PriceTrackLoopRunCreateRequest {
|
||||
userId: number;
|
||||
statusMode: boolean;
|
||||
asinMode: boolean;
|
||||
items: PriceTrackShopQueueItem[];
|
||||
asinFiles: string[];
|
||||
countryCodes: string[];
|
||||
executionMode: PriceTrackExecutionMode;
|
||||
targetRounds?: number;
|
||||
}
|
||||
|
||||
export interface PriceTrackLoopRunVo {
|
||||
id: number;
|
||||
status?: string;
|
||||
executionMode?: PriceTrackExecutionMode;
|
||||
targetRounds?: number;
|
||||
currentRound?: number;
|
||||
currentShopIndex?: number;
|
||||
totalShopCount?: number;
|
||||
activeTaskId?: number;
|
||||
activeTaskStatus?: string;
|
||||
stopRequested?: boolean;
|
||||
errorMessage?: string;
|
||||
statusMode?: boolean;
|
||||
asinMode?: boolean;
|
||||
asinFiles?: string[];
|
||||
countryCodes?: string[];
|
||||
}
|
||||
|
||||
export interface PriceTrackLoopRunDispatchVo {
|
||||
loopRun?: PriceTrackLoopRunVo;
|
||||
childTaskRequest?: PriceTrackCreateTaskRequest;
|
||||
}
|
||||
|
||||
export function createPriceTrackTask(
|
||||
@@ -1176,6 +1219,52 @@ export function getPriceTrackTasksBatch(taskIds: number[]) {
|
||||
);
|
||||
}
|
||||
|
||||
export function createPriceTrackLoopRun(
|
||||
request: Omit<PriceTrackLoopRunCreateRequest, "userId"> | PriceTrackLoopRunCreateRequest,
|
||||
) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackLoopRunVo>, PriceTrackLoopRunCreateRequest>(
|
||||
`${JAVA_API_PREFIX}/price-track/loop-runs`,
|
||||
{ ...request, userId: getCurrentUserId() },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getPriceTrackLoopRun(loopRunId: number) {
|
||||
return unwrapJavaResponse(
|
||||
get<JavaApiResponse<PriceTrackLoopRunVo>>(
|
||||
`${JAVA_API_PREFIX}/price-track/loop-runs/${loopRunId}?user_id=${encodeURIComponent(String(getCurrentUserId()))}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function dispatchNextPriceTrackLoopRun(loopRunId: number) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackLoopRunDispatchVo>, undefined>(
|
||||
`${JAVA_API_PREFIX}/price-track/loop-runs/${loopRunId}/dispatch-next?user_id=${encodeURIComponent(String(getCurrentUserId()))}`,
|
||||
undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function completePriceTrackLoopChild(loopRunId: number, childTaskId: number) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackLoopRunVo>, { childTaskId: number }>(
|
||||
`${JAVA_API_PREFIX}/price-track/loop-runs/${loopRunId}/child-finished?user_id=${encodeURIComponent(String(getCurrentUserId()))}`,
|
||||
{ childTaskId },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function stopPriceTrackLoopRun(loopRunId: number) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackLoopRunVo>, undefined>(
|
||||
`${JAVA_API_PREFIX}/price-track/loop-runs/${loopRunId}/stop?user_id=${encodeURIComponent(String(getCurrentUserId()))}`,
|
||||
undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getPriceTrackTaskProgressBatch(taskIds: number[]) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<PriceTrackTaskBatchVo>, { taskIds: number[] }>(
|
||||
|
||||
Reference in New Issue
Block a user