创建标品优化
This commit is contained in:
@@ -1953,6 +1953,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
if v.SpecQuality != 0 {
|
||||
skuName.Skus[0].SpecQuality = v.SpecQuality
|
||||
skuName.Skus[0].Weight = int(utils.Str2Int64(utils.Float64ToStr(float64(v.SpecQuality))))
|
||||
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
|
||||
} else {
|
||||
_, _, _, _, _, specQuality := jxutils.SplitSkuName(v.Name)
|
||||
if specQuality != 0 {
|
||||
@@ -1967,11 +1968,11 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
return retVal, err
|
||||
}
|
||||
}
|
||||
}
|
||||
if getNetUpcInfo.SpecUnit != "" {
|
||||
skuName.Skus[0].SpecUnit = getNetUpcInfo.SpecUnit
|
||||
} else {
|
||||
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 {
|
||||
productInfo := productInfos[0]
|
||||
@@ -2028,6 +2029,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
if v.SpecQuality != 0 {
|
||||
skuName.Skus[0].SpecQuality = v.SpecQuality
|
||||
skuName.Skus[0].Weight = int(utils.Str2Int64(utils.Float64ToStr(float64(v.SpecQuality))))
|
||||
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
|
||||
} else {
|
||||
_, _, _, _, _, specQuality := jxutils.SplitSkuName(v.Name)
|
||||
if specQuality != 0 {
|
||||
@@ -2051,15 +2053,15 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
skuName.Skus[0].SpecQuality = productInfo.SpecQuality
|
||||
}
|
||||
}
|
||||
}
|
||||
if productInfo.SpecUnit == "" {
|
||||
if getNetUpcInfo.SpecUnit != "" {
|
||||
skuName.Skus[0].SpecUnit = getNetUpcInfo.SpecUnit
|
||||
if productInfo.SpecUnit == "" {
|
||||
if getNetUpcInfo.SpecUnit != "" {
|
||||
skuName.Skus[0].SpecUnit = getNetUpcInfo.SpecUnit
|
||||
} else {
|
||||
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
|
||||
}
|
||||
} else {
|
||||
skuName.Skus[0].SpecUnit = model.SpecUnitNames[0]
|
||||
skuName.Skus[0].SpecUnit = productInfo.SpecUnit
|
||||
}
|
||||
} else {
|
||||
skuName.Skus[0].SpecUnit = productInfo.SpecUnit
|
||||
}
|
||||
if len(productInfo.ImgList) > 0 {
|
||||
skuName.Img = productInfo.ImgList[0]
|
||||
|
||||
Reference in New Issue
Block a user