v3.5.4版本提交
CI / verify (pull_request) Waiting to run

This commit is contained in:
2026-08-21 15:48:15 +08:00
parent 26334ed072
commit a01217539c
32 changed files with 2278 additions and 147 deletions
+75 -1
View File
@@ -8,16 +8,48 @@ export interface CityDto {
maxPartnerCommissionRate?: number;
}
export type ProductSaleUnit = 'BOTTLE' | 'BOX';
export interface ProductSpecValueDto {
id: string;
name: string;
}
export interface ProductSpecAttrDto {
id: string;
name: string;
values: ProductSpecValueDto[];
}
export interface ProductSkuDto {
id: string;
/** 规格值 id 列表(与 specAttrs 轴顺序对应) */
specValueIds: string[];
specText: string;
price: number;
benefitAmount: number;
status: string;
allowOnlinePurchase: boolean;
allowCrossCityDelivery: boolean;
allowOnSitePickup: boolean;
saleUnit: ProductSaleUnit;
bottlesPerUnit: number;
isDefault: boolean;
}
export interface ProductDto {
id: string;
skuCode: string;
name: string;
subtitle?: string | null;
/** 拍平价:可售 SKU 最低价 / 默认 SKU 价 */
price: number;
benefitAmount: number;
benefitDisplay?: number;
aromaType: string;
status: string;
/** 规格文案(默认/展示 SKU) */
spec?: string;
/** 封面图(common_resource COVER / cover_resource_id */
mainImageUrl?: string | null;
/** 轮播图(bizType=CAROUSEL;无则回退封面) */
@@ -25,12 +57,21 @@ export interface ProductDto {
/** 详情长图(bizType=DETAIL 或 detailContent JSON */
detailImageUrls?: string[];
detailContent?: ProductDetailContentDto | null;
/** 是否允许现场取货下单 */
/** 是否允许现场取货下单(拍平自展示 SKU */
allowOnSitePickup?: boolean;
/** 是否允许配送到址(同城线上购买) */
allowOnlinePurchase?: boolean;
/** 是否允许跨城配送 */
allowCrossCityDelivery?: boolean;
/** v3.5.4:是否配置了销售规格(多 SKU) */
specEnabled?: boolean;
/** 列表轻量:展示 SKU 销售单位 */
saleUnit?: ProductSaleUnit;
/** 详情:规格轴 */
specAttrs?: ProductSpecAttrDto[];
/** 详情:可售 SKU(含 OFF_SALE 供前端灰置时可带 status */
skus?: ProductSkuDto[];
defaultSkuId?: string;
}
export interface ProductDetailFeatureDto {
@@ -68,3 +109,36 @@ export interface ProductDetailTemplateDto {
createdAt: string;
updatedAt: string;
}
/** Admin 保存规格轴 */
export interface AdminProductSpecValueInput {
/** 已有值 id;新建可省略 */
id?: string;
name: string;
sortOrder?: number;
}
export interface AdminProductSpecAttrInput {
id?: string;
name: string;
sortOrder?: number;
values: AdminProductSpecValueInput[];
}
export interface AdminProductSkuInput {
id?: string;
/** 规格值 id;无规格时为空数组 */
specValueIds?: string[];
skuCode?: string;
barcode69: string;
price: number;
benefitAmount?: number;
status?: string;
allowOnSitePickup?: boolean;
allowOnlinePurchase?: boolean;
allowCrossCityDelivery?: boolean;
saleUnit?: ProductSaleUnit;
bottlesPerUnit?: number;
isDefault?: boolean;
sortOrder?: number;
}
+24
View File
@@ -114,6 +114,22 @@ export type PartnerProxyOrderProductOption = {
allowOnSitePickup?: boolean;
allowOnlinePurchase?: boolean;
allowCrossCityDelivery?: boolean;
specEnabled?: boolean;
saleUnit?: 'BOTTLE' | 'BOX';
defaultSkuId?: string;
skus?: Array<{
id: string;
specText: string;
price: number;
benefitAmount: number;
status: string;
allowOnSitePickup: boolean;
allowOnlinePurchase: boolean;
allowCrossCityDelivery: boolean;
saleUnit: 'BOTTLE' | 'BOX';
bottlesPerUnit: number;
isDefault: boolean;
}>;
};
export type PartnerProxyOrderPromoOption = {
@@ -145,6 +161,7 @@ export type PartnerProxyOrderPreviewRequest = {
storeId?: string;
receiverCity?: string;
receiverDistrict?: string;
skuId?: string;
};
export type PartnerProxyOrderPreviewResult = {
@@ -153,6 +170,11 @@ export type PartnerProxyOrderPreviewResult = {
benefitAmount: number;
deliveryType: 'LOCAL' | 'CROSS_CITY' | 'ON_SITE_PICKUP';
unitPrice: number;
skuId?: string;
saleUnit?: 'BOTTLE' | 'BOX';
bottlesPerUnit?: number;
bottleQuantity?: number;
minQuantity?: number;
};
export type PartnerProxyOrderCreateRequest = {
@@ -169,6 +191,7 @@ export type PartnerProxyOrderCreateRequest = {
productId: string;
quantity: number;
promoCodeId?: string;
skuId?: string;
};
/** 合伙人代下单列表项(与 OrderDto 兼容,附带收货信息) */
@@ -203,4 +226,5 @@ export type HqProxyOrderCreateRequest = {
productId: string;
quantity: number;
promoCodeId?: string;
skuId?: string;
};