平台价保留到毛,活动价不变
This commit is contained in:
@@ -259,9 +259,19 @@ func ConstrainPricePercentage(percentage int) int {
|
||||
return percentage
|
||||
}
|
||||
|
||||
func CaculateSkuActVendorPrice(price, percentage, priceAdd int) (vendorPrice int) {
|
||||
percentage = ConstrainPricePercentage(percentage)
|
||||
vendorPrice = int(math.Round(float64(price*percentage)/100)) + priceAdd
|
||||
if vendorPrice < 1 {
|
||||
vendorPrice = 1
|
||||
}
|
||||
return vendorPrice
|
||||
}
|
||||
|
||||
func CaculateSkuVendorPrice(price, percentage, priceAdd int) (vendorPrice int) {
|
||||
percentage = ConstrainPricePercentage(percentage)
|
||||
vendorPrice = int(math.Round(float64(price*percentage)/100)) + priceAdd
|
||||
vendorPrice = int(math.Ceil(float64(vendorPrice)/10) * 10)
|
||||
if vendorPrice < 1 {
|
||||
vendorPrice = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user