This commit is contained in:
suyl
2021-09-01 16:18:25 +08:00
parent aa1561e6b1
commit de9590fb1b

View File

@@ -107,16 +107,16 @@ func GetCategories(ctx *jxcontext.Context, parentID int, isExd bool) (catList []
for _, v := range cats { for _, v := range cats {
ids = append(ids, v.ID) ids = append(ids, v.ID)
} }
thingMapMap, err2 := dao.GetThingMapMap(db, model.ThingTypeCategory, nil, ids) //thingMapMap, err2 := dao.GetThingMapMap(db, model.ThingTypeCategory, nil, ids)
// globals.SugarLogger.Debug(utils.Format4Output(thingMapMap, false)) // globals.SugarLogger.Debug(utils.Format4Output(thingMapMap, false))
if err = err2; err == nil { //if err = err2; err == nil {
for _, v := range cats { for _, v := range cats {
catList = append(catList, &dao.SkuCategoryWithVendor{ catList = append(catList, &dao.SkuCategoryWithVendor{
SkuCategory: v, SkuCategory: v,
MapList: thingMapMap[int64(v.ID)], //MapList: thingMapMap[int64(v.ID)],
}) })
}
} }
//}
} }
return catList, err return catList, err
} }