From a9d4f52e0e888fb4a7445693a4c564ec5a61de0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 24 Aug 2020 09:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E6=96=B0=E4=BA=AC=E4=B8=9C=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=BB=93=E7=AE=97=E4=BB=B7=E6=97=B6=EF=BC=8C=E4=B9=9F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E5=AE=B6=E6=94=B6=E7=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 5bc54a263..fc5ab3c29 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1297,8 +1297,12 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord order := &model.GoodsOrder{} order.VendorOrderID = utils.Int64ToStr(v.OrderID) dao.GetEntity(db, order, "VendorOrderID") + storeDeatil, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID) order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100) - dao.UpdateEntity(db, order, "TotalShopMoney") + if order.NewEarningPrice == 0 { + jxutils.RefreshOrderEarningPrice2(order, storeDeatil.PayPercentage) + } + dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice") } } return err