This commit is contained in:
suyl
2021-05-26 10:44:10 +08:00
parent 304fac1dd8
commit 166a8ca76b

View File

@@ -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: