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: