访问京东API,获取结账必要信息。
This commit is contained in:
@@ -194,11 +194,6 @@ func (c *OrderController) GetOrder(orderID string) (order *model.GoodsOrder, err
|
|||||||
}
|
}
|
||||||
return order, 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) {
|
func (c *OrderController) onOrderNew(msg map[string]interface{}) (response *elmapi.CallbackResponse) {
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ func (c *WaybillController) onWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (
|
|||||||
order.Status = model.WaybillStatusNew
|
order.Status = model.WaybillStatusNew
|
||||||
case jdapi.DeliveryStatusAccepted:
|
case jdapi.DeliveryStatusAccepted:
|
||||||
if result, err := api.JdAPI.QuerySingleOrder(msg.OrderID); err == nil {
|
if result, err := api.JdAPI.QuerySingleOrder(msg.OrderID); err == nil {
|
||||||
|
// 默认配送费=订单应付运费(orderReceivableFreight)
|
||||||
|
//订单应付运费为未优惠前应付运费(满免优惠,运费优惠券,VIP免基础运费,用户小费)ps:用户小费是用户给配送员的小费
|
||||||
order.DesiredFee = utils.Interface2Int64WithDefault(result["orderReceivableFreight"], 0) +
|
order.DesiredFee = utils.Interface2Int64WithDefault(result["orderReceivableFreight"], 0) +
|
||||||
utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0) +
|
utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0) +
|
||||||
utils.Interface2Int64WithDefault(result["tips"], 0)
|
utils.Interface2Int64WithDefault(result["tips"], 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user