From 7ed59caeb1e787ff0233f8d1f71acf55e565e2c7 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Sat, 22 May 2021 18:01:27 +0800 Subject: [PATCH] aa --- business/jxstore/tempop/tempop.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index cb0feb6a1..289471e74 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1939,10 +1939,10 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { //} //mtapi.SetToken(mtAccessToken) catList, _ := mtapi.RetailCatList(mtStoreID) - for _, v := range catList { - catID, _ := jd.AddShopCategory(0, v.Name, v.Level, v.Sequence, "") - for _, vv := range v.Children { - jd.AddShopCategory(utils.Str2Int64(catID), vv.Name, vv.Level, vv.Sequence, "") + for i := len(catList) - 1; i > 0; i-- { + catID, _ := jd.AddShopCategory(0, catList[i].Name, catList[i].Level, catList[i].Sequence, "") + for j := len(catList[i].Children); j > 0; j-- { + jd.AddShopCategory(utils.Str2Int64(catID), catList[i].Children[j].Name, catList[i].Children[j].Level, catList[i].Children[j].Sequence, "") } } return err