修复bug
This commit is contained in:
parent
d1a8f6c668
commit
deb3e54cc3
@ -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")})
|
||||||
}
|
}
|
||||||
|
BIN
example/bzyy.exe
BIN
example/bzyy.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user