From 1eb7a1ff03ea7492464f34330c375a28719b62c4 Mon Sep 17 00:00:00 2001 From: lyb Date: Fri, 10 Aug 2018 11:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E9=97=AE=E4=BA=AC=E4=B8=9CAPI?= =?UTF-8?q?=EF=BC=8C=E8=8E=B7=E5=8F=96=E7=BB=93=E8=B4=A6=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/controller/elm/order.go | 5 ----- business/controller/jd/waybill.go | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) 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)