diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index baad32e92..19a947619 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -372,9 +372,14 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao. } } } - v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, storePayPercentage) + // 直营店始终按比例结算,不考虑活动与结算表 + salePrice := v.SalePrice + if changePriceType == model.StoreChangePriceTypeManagedStore && v.ShopPrice != 0 { + salePrice = 0 + } + v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, salePrice, storePayPercentage) } - // 直营店始终按比例结算 + // 直营店始终按比例结算,不考虑活动与结算表 if changePriceType != model.StoreChangePriceTypeManagedStore { updateSingleOrderEarningPrice(order, db) } diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index 150e96066..03d9d6951 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -466,7 +466,7 @@ func GetVendorName(vendorID int) (vendorName string) { func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) { earningPrice = salePrice - if shopPrice > 0 && shopPrice < earningPrice { + if salePrice == 0 || shopPrice > 0 && shopPrice < earningPrice { earningPrice = shopPrice } if storePayPercentage <= 0 {