创建标品优化

This commit is contained in:
苏尹岚
2020-04-17 13:57:39 +08:00
parent 2c39a2b3e7
commit feb6dbbdf4

View File

@@ -1968,7 +1968,11 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
} }
} }
} }
skuName.Skus[0].SpecUnit = model.SpecialSpecUnit if getNetUpcInfo.SpecUnit != "" {
skuName.Skus[0].SpecUnit = getNetUpcInfo.SpecUnit
} else {
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
}
} else { } else {
productInfo := productInfos[0] productInfo := productInfos[0]
if productInfo.Name == "" { if productInfo.Name == "" {
@@ -2049,7 +2053,11 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
} }
} }
if productInfo.SpecUnit == "" { if productInfo.SpecUnit == "" {
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0] if getNetUpcInfo.SpecUnit != "" {
skuName.Skus[0].SpecUnit = getNetUpcInfo.SpecUnit
} else {
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
}
} else { } else {
skuName.Skus[0].SpecUnit = productInfo.SpecUnit skuName.Skus[0].SpecUnit = productInfo.SpecUnit
} }