diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 88e899361..c53a00978 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -784,7 +784,20 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context, } } jxutils.RefreshOrderSkuRelated(order) - num, err := dao.UpdateEntity(db, order, "EarningPrice") + storeID := 0 + if order.StoreID == 0 { + storeID = order.JxStoreID + } else { + storeID = order.StoreID + } + store, _ := dao.GetStoreDetail(db, storeID, order.VendorID) + payPercentage := store.PayPercentage + if payPercentage <= 50 { + order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100 + } else { + order.NewEarningPrice = order.EarningPrice + } + num, err := dao.UpdateEntity(db, order, "EarningPrice", "NewEarningPrice") if err != nil { return nil, err }