+ConstrainPayPercentage

This commit is contained in:
gazebo
2019-12-04 18:17:44 +08:00
parent 4d3eb5d94c
commit 5cecffc501
3 changed files with 177 additions and 154 deletions

View File

@@ -326,6 +326,13 @@ func CaculatePriceByPricePack(l model.PricePercentagePack, defPricePercentage, p
return CaculateSkuVendorPrice(price, pricePercentage, priceAdd)
}
func ConstrainPayPercentage(payPerCentage int) int {
if payPerCentage <= 50 {
payPerCentage = 70
}
return payPerCentage
}
func IsSkuSpecial(specQuality float32, specUnit string) bool {
return int(specQuality) == model.SpecialSpecQuality && (specUnit == model.SpecialSpecUnit || specUnit == model.SpecialSpecUnit2)
}