CaculateSkuVendorPrice最低价是一分钱

This commit is contained in:
gazebo
2019-10-10 17:10:51 +08:00
parent e131cb1309
commit e6aa0feda1

View File

@@ -250,8 +250,8 @@ func CaculateSkuVendorPrice(price, percentage int) (vendorPrice int) {
percentage = 100
}
vendorPrice = int(math.Round(float64(price*percentage) / 100))
if vendorPrice < 0 {
vendorPrice = 0
if vendorPrice < 1 {
vendorPrice = 1
}
return vendorPrice
}