From 128646fcf1162f322343c5f160f23dcae9a44303 Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 16 Feb 2019 17:45:32 +0800 Subject: [PATCH] - protect jd order isGift --- business/partner/purchase/jd/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index 3d143aee7..a24f726fe 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -154,7 +154,7 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo if skuCostumeProperty, ok := product["skuCostumeProperty"]; ok { sku.SkuName += skuCostumeProperty.(string) } - if product["isGift"].(bool) { + if isGift, ok := product["isGift"].(bool); ok && isGift { sku.SkuType = 1 } order.Skus = append(order.Skus, sku)