如果平台过来的价格等于0,我们的earningprice就等于0
This commit is contained in:
@@ -504,8 +504,10 @@ func GetVendorName(vendorID int) (vendorName string) {
|
||||
|
||||
func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) {
|
||||
earningPrice = salePrice
|
||||
if salePrice == 0 || shopPrice > 0 && shopPrice < earningPrice {
|
||||
earningPrice = shopPrice
|
||||
if salePrice != 0 {
|
||||
if shopPrice > 0 && shopPrice < earningPrice {
|
||||
earningPrice = shopPrice
|
||||
}
|
||||
}
|
||||
storePayPercentage = ConstrainPayPercentage(storePayPercentage)
|
||||
if storePayPercentage <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user