feat(product-family): replace legacy good merge with family mechanism in config view and public detail

This commit is contained in:
yeuimu
2026-08-28 14:14:58 +08:00
parent 14c53504f0
commit 4eadb67c36
11 changed files with 2894 additions and 2710 deletions
+9
View File
@@ -13,6 +13,7 @@ export interface GoodRelations {
goodName: string | null;
goodImage: string | null;
goodPrice: unknown;
family?: { id: bigint; familyCode: string | null; familyName: string } | null;
detail?: {
productCode: string | null;
syncedAt: Date;
@@ -127,6 +128,7 @@ export class GoodDto {
sizeRowCount: number;
packageRowCount: number;
productCode: string | null;
family?: { familyId: string; familyCode: string | null; familyName: string } | null;
} | null;
static from(
@@ -215,6 +217,13 @@ export class GoodDto {
sizeRowCount: GoodDto.jsonRows(rel.originGood.detail?.sizeChart),
packageRowCount: GoodDto.jsonRows(rel.originGood.detail?.packageSpecs),
productCode: rel.originGood.detail?.productCode ?? null,
family: rel.originGood.family
? {
familyId: rel.originGood.family.id.toString(),
familyCode: rel.originGood.family.familyCode,
familyName: rel.originGood.family.familyName,
}
: null,
}
: null,
};