From b3d6017cf1ba73c631546fae5b544d438adb29b4 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Fri, 29 Jan 2021 19:39:22 +0800 Subject: [PATCH] aa --- business/jxcallback/orderman/order.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 274cdf3eb..a78294967 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -208,14 +208,14 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m //更新订单new_earning_price if order.EarningType == model.EarningTypePoints { waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID) - store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID) + // store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID) if waybill == nil { - if (order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100)) && store.PayPercentage <= 50 { - order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100) + if (order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-order.OrderPayPercentage/2)/int64(100)) && order.OrderPayPercentage <= 50 { + order.NewEarningPrice = order.TotalShopMoney * int64(100-order.OrderPayPercentage/2) / int64(100) } } else { - if (order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100)) && store.PayPercentage <= 50 { - order.NewEarningPrice = order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) - waybill.DesiredFee + if (order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-order.OrderPayPercentage/2)/int64(100)) && order.OrderPayPercentage <= 50 { + order.NewEarningPrice = order.TotalShopMoney*int64(100-order.OrderPayPercentage/2)/int64(100) - waybill.DesiredFee } } dao.UpdateEntity(db, order, "NewEarningPrice")