123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- package com.sinosoft.lz.system.menu.vo;
- import java.util.ArrayList;
- public class SysMenuTreeNode{
- // 菜单树辅助类
- // private String fd_objectid;
- private String id; // menu_id;
- private String parentId; // parent_menu_id;
- private String menu_name;
- private String menu_url;
- private String sortno;
- private String menu_img;
- private String isParent;
- private ArrayList<SysMenuTreeNode> children = new ArrayList<SysMenuTreeNode>();
- public SysMenuTreeNode(String id, String parentId, String menu_name, String menu_url,
- String sortno, String menu_img) {
- super();
- this.id = id;
- this.parentId = parentId;
- this.menu_name = menu_name;
- this.menu_url = menu_url;
- this.sortno = sortno;
- this.menu_img = menu_img;
- }
- public SysMenuTreeNode(String id, String parentId, String menu_name, String menu_url,
- String sortno, String menu_img, String isParent) {
- super();
- this.id = id;
- this.parentId = parentId;
- this.menu_name = menu_name;
- this.menu_url = menu_url;
- this.sortno = sortno;
- this.menu_img = menu_img;
- this.isParent = isParent;
- }
- public void add(SysMenuTreeNode node) {// 递归添加节点
- if ("0".equals(node.parentId)) {
- this.children.add(node);
- } else if (node.parentId.equals(this.id)) {
- this.children.add(node);
- } else {
- for (SysMenuTreeNode tmp_node : children) {
- tmp_node.add(node);
- }
- }
- }
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public String getParentId() {
- return parentId;
- }
- public void setParentId(String parentId) {
- this.parentId = parentId;
- }
- public String getMenu_name() {
- return menu_name;
- }
- public void setMenu_name(String menu_name) {
- this.menu_name = menu_name;
- }
- public String getMenu_url() {
- return menu_url;
- }
- public void setMenu_url(String menu_url) {
- this.menu_url = menu_url;
- }
- public String getSortno() {
- return sortno;
- }
- public void setSortno(String sortno) {
- this.sortno = sortno;
- }
- public String getMenu_img() {
- return menu_img;
- }
- public void setMenu_img(String menu_img) {
- this.menu_img = menu_img;
- }
- public ArrayList<SysMenuTreeNode> getChildren() {
- return children;
- }
- public void setChildren(ArrayList<SysMenuTreeNode> children) {
- this.children = children;
- }
- public String getIsParent() {
- return isParent;
- }
- public void setIsParent(String isParent) {
- this.isParent = isParent;
- }
- }
|