This commit is contained in:
suyl
2021-07-07 17:54:11 +08:00
parent 106caf9666
commit 2026d07e47

View File

@@ -513,9 +513,13 @@ func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int)
earningPrice = shopPrice earningPrice = shopPrice
} }
} }
} else {
if shopPrice == 0 {
earningPrice = salePrice * 70 / 100
} else { } else {
earningPrice = shopPrice earningPrice = shopPrice
} }
}
storePayPercentage = ConstrainPayPercentage(storePayPercentage) storePayPercentage = ConstrainPayPercentage(storePayPercentage)
if storePayPercentage <= 0 { if storePayPercentage <= 0 {
storePayPercentage = model.DefaultEarningPricePercentage storePayPercentage = model.DefaultEarningPricePercentage