mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 01:49:19 +08:00
feat: 新增拼多多店铺管理和商品管理
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
import type { PddGoodsDTO, PddGoodsVO } from './types';
|
||||
|
||||
/** 分页查询拼多多渠道商品 */
|
||||
export async function getPddGoodsPageApi(
|
||||
params: PageQueryDTO<PddGoodsDTO.Filters>,
|
||||
) {
|
||||
return requestClient.post<PageResultVO<PddGoodsVO.Info>>(
|
||||
'/channel/pdd/goods/list',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/** 拼多多商品详情(含 SKU) */
|
||||
export async function getPddGoodsDetailApi(id: number) {
|
||||
return requestClient.get<PddGoodsVO.Info>(`/channel/pdd/goods/detail/${id}`);
|
||||
}
|
||||
|
||||
/** 删除拼多多商品及 SKU */
|
||||
export async function deletePddGoodsApi(id: number) {
|
||||
return requestClient.delete<void>(`/channel/pdd/goods/delete/${id}`);
|
||||
}
|
||||
|
||||
/** 按渠道店铺同步商品 */
|
||||
export async function syncPddGoodsByShopApi(pddShopId: number) {
|
||||
return requestClient.post<PddGoodsVO.SyncResult>(
|
||||
`/channel/pdd/goods/sync/${pddShopId}`,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,59 @@
|
||||
export namespace PddGoodsDTO {
|
||||
export interface Filters {
|
||||
/** 渠道店铺ID(channel_pdd_shop.id) */
|
||||
shopId?: number;
|
||||
mallId?: number;
|
||||
goodsName?: string;
|
||||
goodsId?: string;
|
||||
/** 0否 1是 */
|
||||
isOnsale?: number;
|
||||
/** 0否 1是 */
|
||||
isMoreSku?: number;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace PddGoodsVO {
|
||||
export interface Sku {
|
||||
id?: number;
|
||||
goodsRowId?: number;
|
||||
goodsId?: string;
|
||||
skuId?: string;
|
||||
spec?: string;
|
||||
specDetails?: string;
|
||||
skuQuantity?: number;
|
||||
reserveQuantity?: number;
|
||||
isSkuOnsale?: number;
|
||||
outerGoodsId?: string;
|
||||
outerId?: string;
|
||||
}
|
||||
|
||||
export interface Info {
|
||||
id: number;
|
||||
companyId?: number;
|
||||
shopId?: number;
|
||||
mallId?: number;
|
||||
goodsId?: string;
|
||||
goodsName?: string;
|
||||
goodsQuantity?: number;
|
||||
goodsReserveQuantity?: number;
|
||||
imageUrl?: string;
|
||||
thumbUrl?: string;
|
||||
isMoreSku?: number;
|
||||
isOnsale?: number;
|
||||
pddCreatedAt?: string;
|
||||
lastSyncTime?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
skus?: Sku[];
|
||||
}
|
||||
|
||||
export interface SyncResult {
|
||||
pddShopId: number;
|
||||
mallId?: number;
|
||||
syncedCount?: number;
|
||||
createdCount?: number;
|
||||
updatedCount?: number;
|
||||
skuCount?: number;
|
||||
pageCount?: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user