- use math.Round in CaculateSkuVendorPrice
This commit is contained in:
@@ -148,7 +148,7 @@ func GetSliceLen(list interface{}) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CaculateSkuVendorPrice(price int, percentage int) int {
|
func CaculateSkuVendorPrice(price int, percentage int) int {
|
||||||
return price * percentage / 100
|
return int(math.Round(float64(price*percentage) / 100))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成一个不重复的临时ID
|
// 生成一个不重复的临时ID
|
||||||
|
|||||||
Reference in New Issue
Block a user