- use math.Round in CaculateSkuVendorPrice

This commit is contained in:
gazebo
2018-11-15 10:12:02 +08:00
parent 91b0dd1b22
commit 1f4e9f3813

View File

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