mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 07:09:20 +08:00
feat: 完成初版拼多多订单同步
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user