提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.sys.modular.rest.model; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.roses.core.util.ToolUtil; |
|
4 |
import cn.stylefeng.roses.kernel.model.tree.Tree; |
|
5 |
import lombok.Data; |
|
6 |
|
|
7 |
import java.util.List; |
|
8 |
|
|
9 |
/** |
|
10 |
* <p> |
|
11 |
* 菜单树形节点 |
|
12 |
* </p> |
|
13 |
* |
|
14 |
* @author stylefeng |
|
15 |
* @since 2019-04-01 |
|
16 |
*/ |
|
17 |
@Data |
|
18 |
public class MenuTreeNode implements Tree { |
|
19 |
|
|
20 |
private static final long serialVersionUID = 1L; |
|
21 |
|
|
22 |
/** |
|
23 |
* 主键id |
|
24 |
*/ |
|
25 |
private Long menuId; |
|
26 |
|
|
27 |
/** |
|
28 |
* 菜单编号 |
|
29 |
*/ |
|
30 |
private String code; |
|
31 |
|
|
32 |
/** |
|
33 |
* 菜单父编号 |
|
34 |
*/ |
|
35 |
private String pcode; |
|
36 |
|
|
37 |
/** |
|
38 |
* 当前菜单的所有父菜单编号 |
|
39 |
*/ |
|
40 |
private String pcodes; |
|
41 |
|
|
42 |
/** |
|
43 |
* 菜单名称 |
|
44 |
*/ |
|
45 |
private String name; |
|
46 |
|
|
47 |
/** |
|
48 |
* 菜单图标 |
|
49 |
*/ |
|
50 |
private String icon; |
|
51 |
|
|
52 |
/** |
|
53 |
* url地址 |
|
54 |
*/ |
|
55 |
private String url; |
|
56 |
|
|
57 |
/** |
|
58 |
* 菜单排序号 |
|
59 |
*/ |
|
60 |
private Integer sort; |
|
61 |
|
|
62 |
/** |
|
63 |
* 菜单层级 |
|
64 |
*/ |
|
65 |
private Integer levels; |
|
66 |
|
|
67 |
/** |
|
68 |
* 是否是菜单(字典) |
|
69 |
*/ |
|
70 |
private String menuFlag; |
|
71 |
|
|
72 |
/** |
|
73 |
* 备注 |
|
74 |
*/ |
|
75 |
private String description; |
|
76 |
|
|
77 |
/** |
|
78 |
* 菜单状态(字典) |
|
79 |
*/ |
|
80 |
private String status; |
|
81 |
|
|
82 |
/** |
|
83 |
* 是否打开新页面的标识(字典) |
|
84 |
*/ |
|
85 |
private String newPageFlag; |
|
86 |
|
|
87 |
/** |
|
88 |
* 是否打开(字典) |
|
89 |
*/ |
|
90 |
private String openFlag; |
|
91 |
|
|
92 |
/** |
|
93 |
* 系统分类(字典) |
|
94 |
*/ |
|
95 |
private String systemType; |
|
96 |
|
|
97 |
/** |
|
98 |
* 状态名称 |
|
99 |
*/ |
|
100 |
private String statusName; |
|
101 |
|
|
102 |
/** |
|
103 |
* 是否是菜单名称 |
|
104 |
*/ |
|
105 |
private String isMenuName; |
|
106 |
|
|
107 |
/** |
|
108 |
* 子节点 |
|
109 |
*/ |
|
110 |
private List<MenuTreeNode> childrenNodes; |
|
111 |
|
|
112 |
@Override |
|
113 |
public String getNodeId() { |
|
114 |
if (ToolUtil.isNotEmpty(code)) { |
|
115 |
return code; |
|
116 |
} else { |
|
117 |
return "0"; |
|
118 |
} |
|
119 |
} |
|
120 |
|
|
121 |
@Override |
|
122 |
public String getNodeParentId() { |
|
123 |
if (ToolUtil.isNotEmpty(pcode)) { |
|
124 |
return pcode; |
|
125 |
} else { |
|
126 |
return "0"; |
|
127 |
} |
|
128 |
} |
|
129 |
|
|
130 |
@Override |
|
131 |
public void setChildrenNodes(List childrenNodes) { |
|
132 |
this.childrenNodes = childrenNodes; |
|
133 |
} |
|
134 |
} |