feat(fulfillment): 支持手动同步斗鱼外部单协作
This commit is contained in:
@@ -31,6 +31,12 @@ export interface DouyuCollabOrder {
|
||||
shop: string;
|
||||
owner_id: number | null;
|
||||
owner_name: string;
|
||||
source_type: string;
|
||||
source_task_id: number | null;
|
||||
source_order_id: string;
|
||||
source_order_item_id: string;
|
||||
source_platform_order_id: string;
|
||||
last_synced_at: string | null;
|
||||
account_id: number | null;
|
||||
account_username: string;
|
||||
account_uid: string;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import api from './client';
|
||||
import type {
|
||||
PlatformFulfillmentDetail,
|
||||
PlatformFulfillmentCollabSyncResult,
|
||||
PlatformFulfillmentListResponse,
|
||||
PlatformFulfillmentMapping,
|
||||
PlatformFulfillmentSettings,
|
||||
@@ -38,6 +39,11 @@ export const platformFulfillmentApi = {
|
||||
null,
|
||||
{ params: { limit } },
|
||||
),
|
||||
syncCollab: (taskIds: number[]) =>
|
||||
api.post<PlatformFulfillmentCollabSyncResult, PlatformFulfillmentCollabSyncResult>(
|
||||
'/platform-fulfillment/tasks/sync-collab',
|
||||
{ task_ids: taskIds },
|
||||
),
|
||||
getTask: (taskId: number) =>
|
||||
api.get<PlatformFulfillmentDetail, PlatformFulfillmentDetail>(
|
||||
`/platform-fulfillment/tasks/${taskId}`,
|
||||
|
||||
@@ -2213,6 +2213,12 @@ export interface PlatformFulfillmentTask {
|
||||
paidAt: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
collabOrder: {
|
||||
id: number;
|
||||
orderNo: string;
|
||||
status: string;
|
||||
lastSyncedAt: string | null;
|
||||
} | null;
|
||||
account: PlatformFulfillmentAccount | null;
|
||||
lease: { id: number; status: string; expiresAt: string | null } | null;
|
||||
bindTask: PlatformFulfillmentBindTask | null;
|
||||
@@ -2248,3 +2254,20 @@ export interface PlatformFulfillmentListResponse {
|
||||
items: PlatformFulfillmentTask[];
|
||||
pagination: { page: number; pageSize: number; total: number };
|
||||
}
|
||||
|
||||
export interface PlatformFulfillmentCollabSyncItem {
|
||||
taskId: number;
|
||||
action: 'created' | 'updated' | 'skipped' | 'failed';
|
||||
reason: string;
|
||||
collabOrderId: number | null;
|
||||
orderNo: string;
|
||||
}
|
||||
|
||||
export interface PlatformFulfillmentCollabSyncResult {
|
||||
requested: number;
|
||||
created: number;
|
||||
updated: number;
|
||||
skipped: number;
|
||||
failed: number;
|
||||
items: PlatformFulfillmentCollabSyncItem[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user