From 73d99734f2b06fffe6c54b6005f6d863988a8124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 2 Jun 2020 08:35:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E8=AE=A2=E5=8D=95newraingpri?= =?UTF-8?q?ce=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jxcallback/scheduler/basesch/basesch_ext.go | 14 +++++++------- business/partner/purchase/jd/order.go | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/business/jxcallback/scheduler/basesch/basesch_ext.go b/business/jxcallback/scheduler/basesch/basesch_ext.go index 556879844..a0b537749 100644 --- a/business/jxcallback/scheduler/basesch/basesch_ext.go +++ b/business/jxcallback/scheduler/basesch/basesch_ext.go @@ -41,13 +41,13 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order * courierVendorID := storeCourier.VendorID bill, err2 := c.CreateWaybill(courierVendorID, order, maxDeliveryFee) if err = err2; err == nil { - stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "") - if len(stores) > 0 { - if stores[0].PayPercentage <= 50 { - order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 100 - dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice") - } - } + // stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "") + // if len(stores) > 0 { + // if stores[0].PayPercentage <= 50 { + // order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - stores[0].PayPercentage/2)) / 100 + // dao.UpdateEntity(dao.GetDB(), order, "NewEarningPrice") + // } + // } globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill) bills = append(bills, bill) if createOnlyOne { diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index a194711a5..4185d3501 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -73,6 +73,7 @@ func (c *PurchaseHandler) updateOrderFinancialInfo(a *jdapi.API, orderID string) if err == nil { if orderSettlement != nil { updateOrderBySettleMent(order, orderSettlement) + globals.SugarLogger.Debugf("updateOrderBySettleMent", order.NewEarningPrice) err = partner.CurOrderManager.UpdateOrderFields(order, []string{ /*"WaybillTipMoney", */ "TotalShopMoney", "PmSubsidyMoney", "NewEarningPrice"}) } }