访问京东API,获取结账必要信息。

This commit is contained in:
lyb
2018-08-10 11:13:51 +08:00
parent 66a90a6f3a
commit 1eb7a1ff03
2 changed files with 2 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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)