product: 规格新增关联平台店铺字段,ProductSpec 支持绑定店铺列表

- ProductServiceImpl / ProductSpecServiceImpl: 规格关联平台店铺逻辑
- UpdateProductDTO: 增加 platform_shop_ids 字段
- OrderMapper: 关联查询优化
- 前端: ProductFormModal / ProductCard 适配多店铺绑定
This commit is contained in:
小蟑螂
2026-05-03 23:50:03 +08:00
parent 63e54279c0
commit 74eb45b76c
7 changed files with 279 additions and 54 deletions
@@ -27,14 +27,18 @@ export namespace ProductDTO {
categoryId?: number;
/** 主图图片ID */
mainImageId?: number;
/** 商品规格列表(如果提供,则更新这些规格) */
/** 商品规格列表:含 id 为更新,不含 id 为新增 */
specs?: UpdateSpec[];
/** 编辑时从商品上移除的规格 ID(须为打开表单时已有的规格) */
removedSpecIds?: number[];
}
/** 商品规格DTO(创建时) */
export interface Spec {
/** 规格名称 */
name: string;
/** 链接规格名称 */
linkName?: string;
/** 规格编码 */
specCode?: string;
/** 商品成本 */
@@ -67,10 +71,12 @@ export namespace ProductDTO {
/** 更新商品规格参数 */
export interface UpdateSpec {
/** 规格ID(必填,用于确定更新哪个规格) */
id: number;
/** 规格ID:有值表示更新已有规格;不传或空表示新增一条规格 */
id?: number;
/** 规格名称 */
name: string;
/** 链接规格名称 */
linkName?: string;
/** 规格编码 */
specCode?: string;
/** 商品成本 */