修复bug

This commit is contained in:
hoteas 2021-09-25 04:36:07 +08:00
parent d1a8f6c668
commit deb3e54cc3
2 changed files with 6 additions and 6 deletions

View File

@ -15,16 +15,16 @@ var categoryCtr = Ctr{
for _, v := range childData1 { for _, v := range childData1 {
data := that.Db.Get("category", "*", Map{"parent_id": v.GetCeilInt("id")}) data := that.Db.Get("category", "*", Map{"parent_id": v.GetCeilInt("id")})
if data != nil {
childData = append(childData, data) childData = append(childData, data)
} }
}
} else { } else {
childData = that.Db.Select("category", "*", Map{"parent_id": parentId}) childData = that.Db.Select("category", "*", Map{"parent_id": parentId})
} }
for _, v := range childData { for _, v := range childData {
v["child"] = that.Db.Select("category", "*", Map{"parent_id": v.GetCeilInt("id")}) v["child"] = that.Db.Select("category", "*", Map{"parent_id": v.GetCeilInt("id")})
} }

Binary file not shown.