|
@@ -61,11 +61,12 @@ type PermissionNode struct {
|
|
|
func assemblePermissionNode(list []*models.ChartPermission, node *PermissionNode, current int, level int) {
|
|
|
if node != nil && current < level {
|
|
|
for _, permission := range list {
|
|
|
- if permission.ParentID == node.ID {
|
|
|
+ if permission.ParentId == node.ID {
|
|
|
+
|
|
|
childNode := &PermissionNode{
|
|
|
- ID: permission.ChartPermissionID,
|
|
|
+ ID: permission.ChartPermissionId,
|
|
|
Name: permission.PermissionName,
|
|
|
- ParentID: permission.ParentID,
|
|
|
+ ParentID: permission.ParentId,
|
|
|
}
|
|
|
node.Children = append(node.Children, childNode)
|
|
|
assemblePermissionNode(list, childNode, current+1, level)
|