From c598f54e6a8e7281bf9e1aa8f13eeb258f488ced Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 16 Feb 2019 18:07:45 +0800 Subject: [PATCH] - handle field missing in jd.setOrederDetailFee --- business/partner/purchase/jd/order.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index a24f726fe..706488eb6 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -168,9 +168,9 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo } func setOrederDetailFee(result map[string]interface{}, order *model.GoodsOrder) { - order.BoxFee = utils.MustInterface2Int64(result["packagingMoney"]) + order.BoxFee = utils.Interface2Int64WithDefault(result["packagingMoney"], 0) order.PlatformFeeRate = model.JdPlatformFeeRate - order.BillStoreFreightFee = utils.MustInterface2Int64(result["merchantPaymentDistanceFreightMoney"]) + utils.MustInterface2Int64(result["tips"]) + order.BillStoreFreightFee = utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0) + utils.Interface2Int64WithDefault(result["tips"], 0) } //