jiangshuai
2023-11-15 57c1d91e82ec4085ccedf099063cd14e609a301f
controllers/location.go
@@ -98,6 +98,11 @@
      if location.ParentId == 0 {
         tree = append(tree, location)
      } else {
         if _, ok := m[location.ParentId]; !ok {
            tree = append(tree, location)
            continue
         }
         m[location.ParentId].Children = make([]*models.Location, 0)
         m[location.ParentId].Children = append(m[location.ParentId].Children, location)
      }
   }