diff --git a/business/controller/elm/order.go b/business/controller/elm/order.go index fbbf7af30..168a0ea52 100644 --- a/business/controller/elm/order.go +++ b/business/controller/elm/order.go @@ -194,11 +194,6 @@ func (c *OrderController) GetOrder(orderID string) (order *model.GoodsOrder, err } return order, err } -func setOrederDetailFee(result map[string]interface{}, order *model.GoodsOrder) { - //var skuTotalPmFee, orderPmFee, skuTotalPmSubsidy, orderPmSubsidy float64 - - order.BoxFee = jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["packageFee"])) -} // func (c *OrderController) onOrderNew(msg map[string]interface{}) (response *elmapi.CallbackResponse) { diff --git a/business/controller/jd/waybill.go b/business/controller/jd/waybill.go index 0d98972ed..0aacb59bd 100644 --- a/business/controller/jd/waybill.go +++ b/business/controller/jd/waybill.go @@ -26,6 +26,8 @@ func (c *WaybillController) onWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) ( order.Status = model.WaybillStatusNew case jdapi.DeliveryStatusAccepted: if result, err := api.JdAPI.QuerySingleOrder(msg.OrderID); err == nil { + // 默认配送费=订单应付运费(orderReceivableFreight) + //订单应付运费为未优惠前应付运费(满免优惠,运费优惠券,VIP免基础运费,用户小费)ps:用户小费是用户给配送员的小费 order.DesiredFee = utils.Interface2Int64WithDefault(result["orderReceivableFreight"], 0) + utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0) + utils.Interface2Int64WithDefault(result["tips"], 0)