feat: 新增拼多多店铺授权

This commit is contained in:
2026-08-03 16:08:27 +08:00
parent 4e58b67c13
commit 4aa76cefdf
38 changed files with 1339 additions and 96 deletions
@@ -0,0 +1,12 @@
import type { PddAuthVO } from './types';
import { requestClient } from '#/api/request';
/**
* 获取拼多多店铺授权跳转 URL(绑定指定内部店铺)
*/
export async function getPddAuthorizeUrlApi(shopId: number) {
return requestClient.get<PddAuthVO.AuthorizeUrl>('/ec/pdd/auth/authorize-url', {
params: { shopId },
});
}
@@ -0,0 +1,2 @@
export * from './apis';
export * from './types';
@@ -0,0 +1 @@
export * from './types.vo';
@@ -0,0 +1,12 @@
/**
* 拼多多授权相关 VO
*/
export namespace PddAuthVO {
/** 授权跳转信息 */
export interface AuthorizeUrl {
/** 拼多多授权页完整 URL */
authorizeUrl: string;
/** 本次授权 state */
state: string;
}
}
@@ -2,6 +2,34 @@
* 店铺相关VO类型定义
*/
/** 拼多多外部店铺信息(列表关联返回) */
export interface PddShopInfo {
/** 主键ID */
id: number;
/** 公司ID */
companyId: number;
/** 拼多多授权ID */
pddAuthId?: null | number;
/** 拼多多店铺ID(mall_id) */
mallId: number;
/** 店铺名称 */
mallName?: string;
/** 店铺logo */
logo?: string;
/** 店铺描述 */
mallDesc?: string;
/** 店铺类型:1个人 2企业 3旗舰店 4专卖店 5专营店 6普通店 */
merchantType?: number;
/** 店铺身份:0厂商 1分销商 2都不是 3都是 */
mallCharacter?: number;
/** 最近一次同步时间 */
lastSyncTime?: string;
/** 创建时间 */
createTime?: string;
/** 更新时间 */
updateTime?: string;
}
export namespace ShopVO {
/** 店铺信息 */
export interface Info {
@@ -19,6 +47,10 @@ export namespace ShopVO {
platformId?: number;
/** 平台名称 */
platformName?: string;
/** 外部店铺ID(如拼多多 mall_id) */
externalShopId?: null | string;
/** 关联的拼多多外部店铺(已授权绑定时返回) */
pddShop?: null | PddShopInfo;
/** 创建时间 */
createTime: string;
/** 更新时间 */