🐛 Fixing a bug. #820 【菜单管理】新增按钮 > 权限 无法保存

This commit is contained in:
冷冷 committed 2020-03-03 17:17:22 +08:00
1 parent af19ac7baf
commit d883e11fac
2 files changed
+6 -17

No files matched your search

@@ -41,7 +41,7 @@ public class MenuTree extends TreeNode implements Serializable {
@ApiModelProperty(value = "菜单图标")
private String icon;
/**
* 菜单名称
* 菜单名称
*/
@ApiModelProperty(value = "菜单名称")
private String name;
@@ -60,7 +60,7 @@ public class MenuTree extends TreeNode implements Serializable {
* 权限编码
*/
@ApiModelProperty(value = "权限编码")
private String code;
private String permission;
/**
* 菜单类型 (0菜单 1按钮)
*/
@@ -79,26 +79,14 @@ public class MenuTree extends TreeNode implements Serializable {
/**
* 是否包含子节点
*
* @since 3.7
*/
private Boolean hasChildren;
public MenuTree() {
}
public MenuTree(int id, String name, int parentId) {
this.id = id;
this.parentId = parentId;
this.name = name;
this.label = name;
}
public MenuTree(int id, String name, MenuTree parent) {
this.id = id;
this.parentId = parent.getId();
this.name = name;
this.label = name;
}
public MenuTree(MenuVO menuVo) {
this.id = menuVo.getMenuId();
this.parentId = menuVo.getParentId();
@@ -108,6 +96,7 @@ public class MenuTree extends TreeNode implements Serializable {
this.type = menuVo.getType();
this.label = menuVo.getName();
this.sort = menuVo.getSort();
this.permission = menuVo.getPermission();
this.keepAlive = menuVo.getKeepAlive();
}
}
@@ -112,13 +112,13 @@ public class TreeUtil {
node.setParentId(menu.getParentId());
node.setName(menu.getName());
node.setPath(menu.getPath());
node.setCode(menu.getPermission());
node.setLabel(menu.getName());
node.setIcon(menu.getIcon());
node.setType(menu.getType());
node.setSort(menu.getSort());
node.setHasChildren(true);
node.setKeepAlive(menu.getKeepAlive());
node.setPermission(menu.getPermission());
trees.add(node);
}
return TreeUtil.build(trees, root);