From a42516c76e19c0784283438c84214e72643ae36f Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 15 May 2019 08:53:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20createPromotionSku=E4=B8=AD=E6=8A=8Adata?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BD=93=E6=88=90=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E5=A4=84=E7=90=86=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdapi/promotion_sku.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformapi/jdapi/promotion_sku.go b/platformapi/jdapi/promotion_sku.go index ece80fed..f4fabbdc 100644 --- a/platformapi/jdapi/promotion_sku.go +++ b/platformapi/jdapi/promotion_sku.go @@ -150,8 +150,9 @@ func (a *API) createPromotionSku(promotionType int, infoId int64, outInfoId stri } else { jdParams[KeyOutInfoId] = outInfoId } - result, err := a.AccessAPINoPage(getPromotionCmd("createPromotionSku", promotionType), jdParams, nil, nil, genNoPageResultParser("errorCode", "errorInfos", "data", "0")) - if err == nil { + // todo 当前是在出错时,把data中的数据当成错误信息处理的 + result, err := a.AccessAPINoPage(getPromotionCmd("createPromotionSku", promotionType), jdParams, nil, nil, genNoPageResultParser("errorCode", "data", "", "0")) + if err == nil && result != nil { err = utils.Map2StructByJson(result, &skusResult, false) } return skusResult, err