- 限制商品价格最低为1分

- 门店商品复制后添加SyncFlagSaleMask
This commit is contained in:
gazebo
2019-03-25 16:30:14 +08:00
parent b9f87b55dd
commit 679b8c7dff
3 changed files with 16 additions and 9 deletions

View File

@@ -72,7 +72,7 @@ func Excel2Slice(reader io.Reader) (contents map[string][][]string) {
if excelFile, err := excelize.OpenReader(reader); err == nil {
contents = make(map[string][][]string)
for _, v := range excelFile.GetSheetMap() {
contents[v] = excelFile.GetRows(v)
contents[v], _ = excelFile.GetRows(v)
}
}
return contents

View File

@@ -167,6 +167,9 @@ func CaculateSkuPrice(unitPrice int, specQuality float32, specUnit string, skuNa
} else if specQuality < 500 {
price = price * 110 / 100
}
if price <= 0 {
price = 1
}
return price
}