提交 | 用户 | 时间
|
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 |
* 字典信息 |
|
11 |
* |
|
12 |
* @author fengshuonan |
|
13 |
* @Date 2018/12/8 18:16 |
|
14 |
*/ |
|
15 |
@Data |
|
16 |
public class DeptTreeNode implements Tree { |
|
17 |
|
|
18 |
private static final long serialVersionUID = 1L; |
|
19 |
|
|
20 |
/** |
|
21 |
* 主键id |
|
22 |
*/ |
|
23 |
private Long deptId; |
|
24 |
/** |
|
25 |
* 父部门id |
|
26 |
*/ |
|
27 |
private Long pid; |
|
28 |
/** |
|
29 |
* 父部门名称 |
|
30 |
*/ |
|
31 |
private String pName; |
|
32 |
/** |
|
33 |
* 简称 |
|
34 |
*/ |
|
35 |
private String simpleName; |
|
36 |
/** |
|
37 |
* 全称 |
|
38 |
*/ |
|
39 |
private String fullName; |
|
40 |
/** |
|
41 |
* 描述 |
|
42 |
*/ |
|
43 |
private String description; |
|
44 |
/** |
|
45 |
* 排序 |
|
46 |
*/ |
|
47 |
private Integer sort; |
|
48 |
|
|
49 |
/** |
|
50 |
* 子节点 |
|
51 |
*/ |
|
52 |
private List<MenuTreeNode> childrenNodes; |
|
53 |
|
|
54 |
@Override |
|
55 |
public String getNodeId() { |
|
56 |
if (ToolUtil.isNotEmpty(deptId)) { |
|
57 |
return String.valueOf(deptId); |
|
58 |
} else { |
|
59 |
return "0"; |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
public String getNodeParentId() { |
|
65 |
if (ToolUtil.isNotEmpty(pid)) { |
|
66 |
return String.valueOf(pid); |
|
67 |
} else { |
|
68 |
return "0"; |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
72 |
@Override |
|
73 |
public void setChildrenNodes(List childrenNodes) { |
|
74 |
this.childrenNodes = childrenNodes; |
|
75 |
} |
|
76 |
} |