From cbc1a4fb885eef6a3bc921ee267b7f3ac3600095 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 16 May 2019 11:05:24 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=9C=A8=E5=88=9B=E5=BB=BA=E7=BE=8E?= =?UTF-8?q?=E5=9B=A2=E8=BF=90=E5=8D=95=E6=97=B6=E7=94=9F=E6=88=90=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/waybill.go | 11 ++++++++--- business/partner/delivery/mtps/waybill.go | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/business/jxcallback/orderman/waybill.go b/business/jxcallback/orderman/waybill.go index 83f893758..148013315 100644 --- a/business/jxcallback/orderman/waybill.go +++ b/business/jxcallback/orderman/waybill.go @@ -97,9 +97,14 @@ func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) { } else { addParams := orm.Params{} if bill.Status >= model.WaybillStatusAccepted && bill.Status < model.WaybillStatusEndBegin { - // if bill.Status == model.WaybillStatusAccepted { - // addParams["desired_fee"] = bill.DesiredFee - // } + if bill.Status == model.WaybillStatusAccepted { + if bill.DesiredFee > 0 { + addParams["desired_fee"] = bill.DesiredFee + } + if bill.ActualFee > 0 { + addParams["actual_fee"] = bill.ActualFee + } + } if bill.CourierMobile != "" { addParams["courier_name"] = bill.CourierName addParams["courier_mobile"] = bill.CourierMobile diff --git a/business/partner/delivery/mtps/waybill.go b/business/partner/delivery/mtps/waybill.go index 93d908998..e141b917f 100644 --- a/business/partner/delivery/mtps/waybill.go +++ b/business/partner/delivery/mtps/waybill.go @@ -81,9 +81,9 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m order := c.callbackMsg2Waybill(msg) switch msg.Status { case mtpsapi.OrderStatusWaitingForSchedule: + order.DesiredFee, _ = delivery.CalculateBillDeliveryFee(order) order.Status = model.WaybillStatusNew case mtpsapi.OrderStatusAccepted: - order.DesiredFee, _ = delivery.CalculateBillDeliveryFee(order) order.Status = model.WaybillStatusAccepted case mtpsapi.OrderStatusPickedUp: order.Status = model.WaybillStatusDelivering