From 0a5bc73fee3984ed03ccc6c8512e906021ebbc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 13 May 2020 10:41:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdshopapi/sku.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformapi/jdshopapi/sku.go b/platformapi/jdshopapi/sku.go index 33c859fc..96ad2290 100644 --- a/platformapi/jdshopapi/sku.go +++ b/platformapi/jdshopapi/sku.go @@ -301,7 +301,10 @@ func (a *API) FindValuesByAttrId(categoryAttrId int) (findValuesByAttrIdResult [ if err == nil { utils.Map2StructByJson(result["jingdong_category_read_findValuesByAttrIdUnlimit_responce"].(map[string]interface{})["findvaluesbyattridunlimit_result"], &findValuesByAttrIdResult, false) } - return findValuesByAttrIdResult, findValuesByAttrIdResult[len(findValuesByAttrIdResult)-1].OrderSort, err + if len(findValuesByAttrIdResult) > 0 { + maxOrder = findValuesByAttrIdResult[len(findValuesByAttrIdResult)-1].OrderSort + } + return findValuesByAttrIdResult, maxOrder, err } //新增类目属性值