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