From cd08000879e6391834690b1ac7501dd3d3df8bd7 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 4 Sep 2019 16:31:56 +0800 Subject: [PATCH] =?UTF-8?q?-=20jdapi.handleBatchOpResult=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=88=A4=E6=96=ADinErr=E5=B0=B1=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdapi/store_sku.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformapi/jdapi/store_sku.go b/platformapi/jdapi/store_sku.go index 45dd44e9..cee2f4cf 100644 --- a/platformapi/jdapi/store_sku.go +++ b/platformapi/jdapi/store_sku.go @@ -149,7 +149,7 @@ func (a *API) GetStationInfoList(stationNo string, skuIds []int64) (priceInfo [] } func (a *API) handleBatchOpResult(batchCount int, inErr error, result interface{}, tagName string) (responseList []*StoreSkuBatchUpdateResponse, err error) { - if inErr != nil { + if result != nil { if err = utils.Map2Struct(result, &responseList, true, tagName); err == nil { var failedList []*StoreSkuBatchUpdateResponse for _, v := range responseList { @@ -257,6 +257,7 @@ func (a *API) BatchUpdateVendibility(trackInfo, outStationNo, stationNo string, } else { jdParams["stationNo"] = stationNo } + // 此函数在全部失败时,err仍然返回成功 result, err := a.AccessAPINoPage2("stock/batchUpdateVendibility", jdParams, nil, nil, genNoPageResultParser("retCode", "retMsg", "data", "0"), trackInfo) if result != nil { var err2 error