From ba8d0ad0aa98795d67dd063c697c260387d52969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 27 Nov 2025 15:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A5=BF=E7=99=BE=E5=B1=9E=E6=80=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/ebai/store_sku2.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/ebai/store_sku2.go b/business/partner/purchase/ebai/store_sku2.go index 3f78e7ea6..0c50c324c 100644 --- a/business/partner/purchase/ebai/store_sku2.go +++ b/business/partner/purchase/ebai/store_sku2.go @@ -563,6 +563,7 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE attr["status"] = 1 // 正常 sepcProperty := make([]map[string]interface{}, 0, 0) + catProperty := make([]map[string]interface{}, 0, 0) attributeList := make([]*AttributeListEBai, 0, 0) err = utils.UnmarshalUseNumber(utils.MustMarshal(storeSku.EbaiAttribute), &attributeList) for _, al := range attributeList { @@ -573,11 +574,18 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE } property["value_id"] = pv.ValueId property["value_text"] = pv.ValueData - sepcProperty = append(sepcProperty) + sepcProperty = append(sepcProperty, property) + catProperty = append(catProperty, map[string]interface{}{ + "propId": al.PropertyId, + "propText": al.PropertyName, + "valueId": pv.ValueId, + "valueText": pv.ValueData, + }) } } attr["spec_property"] = sepcProperty params["sku_spec"] = []interface{}{attr} + params["cat_property"] = []interface{}{attr} } // todo 饿百如果给的UPC是空要报错,但如果我要删除UPC怎么弄? // if storeSku.Upc != "" { @@ -599,7 +607,7 @@ type AttributeListEBai struct { PropertyId int64 `json:"propertyId"` PropertyName string `json:"propertyName"` PropertyValues []struct { - ValueId int64 `json:"ValueId"` // 属性值id + ValueId int64 `json:"valueId"` // 属性值id ValueData string `json:"valueData"` // 属性值内容 } `json:"propertyValues"` // 属性值列表