From 0ecc8b87279b23bd03b04cbc1a4a1aef2640109d Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 19 Jul 2019 09:33:03 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=A5=BF=E7=99=BEGetEbai?= =?UTF-8?q?CatIDFromName=E4=B8=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/ebaiapi/shop_sku.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platformapi/ebaiapi/shop_sku.go b/platformapi/ebaiapi/shop_sku.go index 0cd64f29..a4f33995 100644 --- a/platformapi/ebaiapi/shop_sku.go +++ b/platformapi/ebaiapi/shop_sku.go @@ -401,6 +401,12 @@ func (a *API) GetEbaiCatIDFromName(shopID, catName string) (ebaiCatID int64) { ebaiCatID = v.CategoryID break } + for _, v2 := range v.Children { + if v2.Name == catName { + ebaiCatID = v2.CategoryID + break + } + } } } return ebaiCatID