根据excel创建标品

This commit is contained in:
苏尹岚
2020-04-14 09:31:23 +08:00
parent caa350990a
commit a0eb5755d0

View File

@@ -1816,7 +1816,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
specQuality = float32(utils.Str2Float64WithDefault(cell, 0))
}
if k == 4 {
price = int(utils.Str2Float64WithDefault(cell, 0))
price = int(utils.Str2Float64WithDefault(cell, 0) * 100)
}
}
}
@@ -1899,7 +1899,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
skuName.Price = int(utils.Str2Int64(result.Price) * 100)
}
} else {
skuName.Price = v.Price * 100
skuName.Price = v.Price
}
if v.Unit != "" {
if v.Unit == model.UnitNames[0] {
@@ -1959,7 +1959,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
skuName.Price = int(utils.Str2Int64(result.Price) * 100)
}
} else {
skuName.Price = v.Price * 100
skuName.Price = v.Price
}
skuName.Name = productInfo.Name
skuName.Unit = productInfo.Unit