feat: 完成初版拼多多订单同步

This commit is contained in:
2026-08-04 16:43:29 +08:00
parent 4aa76cefdf
commit 02cd54ca5c
36 changed files with 2442 additions and 86 deletions
@@ -0,0 +1,24 @@
import type { PddOrderSyncVO } from './types';
import { requestClient } from '#/api/request';
/**
* 按成交日同步一天拼多多订单
*/
export async function syncPddOrdersByDayApi(data: {
shopId: number;
confirmDate: string;
}) {
return requestClient.post<PddOrderSyncVO.Result>('/ec/pdd/order/sync/day', data);
}
/**
* 增量同步
*/
export async function syncPddOrdersIncrementalApi(shopId: number) {
return requestClient.post<PddOrderSyncVO.Result>(
'/ec/pdd/order/sync/incremental',
undefined,
{ params: { shopId } },
);
}
@@ -0,0 +1,2 @@
export * from './apis';
export * from './types';
@@ -0,0 +1 @@
export * from './types.vo';
@@ -0,0 +1,13 @@
/**
* 拼多多订单同步 VO
*/
export namespace PddOrderSyncVO {
export interface Result {
mode: string;
shopId: number;
fetchedCount: number;
upsertedCount: number;
skippedCount: number;
errors?: string[];
}
}