From 166a8ca76b48668fdbfa5a1573a30a8178537be5 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 26 May 2021 10:44:10 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store_sku.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index bee2c13a4..b60da45fa 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -5680,11 +5680,14 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo if catID != "" { catMap[catList[i].Code] = catID } - LoopCatChild(catList[i].Code, catID, catList[i].Children) + //LoopCatChild(catList[i].Code, catID, catList[i].Children) //美团好像只能建两级分类? - //for j := len(catList[i].Children) - 1; j > -1; j-- { - // jd.AddShopCategory(utils.Str2Int64(catID), catList[i].Children[j].Name, catList[i].Children[j].Level, catList[i].Children[j].Sequence, "") - //} + for j := len(catList[i].Children) - 1; j > -1; j-- { + catID2, _ := jd.AddShopCategory(utils.Str2Int64(catID), catList[i].Children[j].Name, catList[i].Children[j].Level, catList[i].Children[j].Sequence, "") + if catID2 != "" { + catMap[catList[i].Children[j].Code] = catID2 + } + } } } case 1: