From f3e1f4e83beaa628976ecf36cb0e07a352428d40 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, 25 May 2020 14:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E8=AE=A2=E5=8D=95=E8=AE=A1?= =?UTF-8?q?=E7=AE=97newearningprice2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jd/order.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index 78328428e..07e500d79 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -6,6 +6,8 @@ import ( "strings" "time" + "git.rosy.net.cn/jx-callback/business/model/dao" + "git.rosy.net.cn/jx-callback/business/jxutils/tasksch" "git.rosy.net.cn/baseapi/platformapi/autonavi" @@ -71,7 +73,7 @@ func (c *PurchaseHandler) updateOrderFinancialInfo(a *jdapi.API, orderID string) if err == nil { if orderSettlement != nil { updateOrderBySettleMent(order, orderSettlement) - err = partner.CurOrderManager.UpdateOrderFields(order, []string{ /*"WaybillTipMoney", */ "TotalShopMoney", "PmSubsidyMoney"}) + err = partner.CurOrderManager.UpdateOrderFields(order, []string{ /*"WaybillTipMoney", */ "TotalShopMoney", "PmSubsidyMoney", "NewEarningPrice"}) } } return err @@ -135,6 +137,10 @@ func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.Ord // order.WaybillTipMoney = orderSettlement.VenderPaidTips order.TotalShopMoney = orderSettlement.SettlementAmount order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney + stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "") + if len(stores) > 0 { + jxutils.RefreshOrderEarningPrice2(order, stores[0].PayPercentage) + } } }