diff --git a/business/partner/purchase/mtwm/store_sku2.go b/business/partner/purchase/mtwm/store_sku2.go index b2bb51db7..5758280eb 100644 --- a/business/partner/purchase/mtwm/store_sku2.go +++ b/business/partner/purchase/mtwm/store_sku2.go @@ -495,9 +495,10 @@ type ValueList struct { func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, nameID int, name string) (attrs string) { var ( - db *dao.DaoDB - tempCatID int64 - attrValue CommonAttrValue + db *dao.DaoDB + tempCatID int64 + attrValue CommonAttrValue + attrValues []CommonAttrValue ) //if nameID != 0 { //是否为纯创建 // if tData, err := dao.GetSkuNames(db, []int{nameID}, nil, "", false); err == nil && len(tData) > 0 { @@ -538,9 +539,9 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na } } } + globals.SugarLogger.Debugf("1 attrValue==================%s", utils.Format4Output(attrValue, false)) + attrValues = append(attrValues, attrValue) } - var attrValues []CommonAttrValue - attrValues = append(attrValues, attrValue) temp, _ := json.Marshal(attrValues) attrs = string(temp) globals.SugarLogger.Debugf("SwitchAttr attrValues=%s", utils.Format4Output(attrValues, false))