diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 97dabda92..3b11f94e7 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -156,6 +156,7 @@ type Skus struct { // BatchInitData 批量创建商品 func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string) error { + globals.SugarLogger.Debugf("=") foodDataList := make([]map[string]interface{}, len(fromSku)) for i, storeSku := range fromSku { foodData := make(map[string]interface{}) @@ -167,8 +168,8 @@ func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mt } skus2 := make([]*Skus, 0, 0) for i2 := 0; i2 < len(skus); i2++ { - if skus[i].Weight != "" && skus[i].WeightForUnit != "" { - skus[i].WeightForUnit = "" + if skus[i2].Weight != "" && skus[i2].WeightForUnit != "" { + skus[i2].WeightForUnit = "" } skus2 = append(skus2, skus2[i2]) }