- 门店价限制不能为负数

- 京东门店价限制为最少一分
This commit is contained in:
gazebo
2019-04-17 15:27:43 +08:00
parent 2cde3ba1b5
commit bfc3b5f945
2 changed files with 14 additions and 3 deletions

View File

@@ -178,7 +178,11 @@ func GetSliceLen(list interface{}) int {
}
func CaculateSkuVendorPrice(price int, percentage int) int {
return int(math.Round(float64(price*percentage) / 100))
storePrice := int(math.Round(float64(price*percentage) / 100))
if storePrice < 0 {
storePrice = 0
}
return storePrice
}
// 生成一个不重复的临时ID