From 4f07f328347ac2154e12d1128a29bf58691f9a6a Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 23 Jun 2021 16:27:54 +0800 Subject: [PATCH] aa --- business/jxcallback/orderman/orderman_ext.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 04087ce0c..8597f9d9e 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -371,13 +371,17 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro sqlParams := []interface{}{model.AfsOrderStatusFinished, order.VendorOrderID, model.YES} if err = dao.GetRow(db, &afsOrder, sql, sqlParams); err == nil && afsOrder != nil { + totalShopMoney := order.TotalShopMoney if afsOrder.AfsTotalShopMoney != 0 { - //报价,要减去商品的京西价 - if order.EarningType == model.EarningTypeQuote { - order.JxIncome = afsOrder.AfsTotalShopMoney - order.EarningPrice - order.DesiredFee + (afsOrder.ShopPrice * int64(order.OrderPayPercentage/100)) - } else { - order.JxIncome = afsOrder.AfsTotalShopMoney * int64(order.OrderPayPercentage/2/100) - } + totalShopMoney = afsOrder.AfsTotalShopMoney + } + //if afsOrder.AfsTotalShopMoney != 0 { + //报价,要减去商品的京西价 + if order.EarningType == model.EarningTypeQuote { + order.JxIncome = totalShopMoney - order.EarningPrice - order.DesiredFee + (afsOrder.ShopPrice * int64(order.OrderPayPercentage/100)) + } else { + order.JxIncome = totalShopMoney * int64(order.OrderPayPercentage/2/100) + //} } } return retVal, err