Browse Source

修改树表代码生成模板

RuoYi 5 years ago
parent
commit
97a0326abd

+ 79 - 0
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/TreeEntity.java

@@ -0,0 +1,79 @@
1
+package com.ruoyi.common.core.web.domain;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+
6
+/**
7
+ * Tree基类
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+public class TreeEntity extends BaseEntity
12
+{
13
+    private static final long serialVersionUID = 1L;
14
+
15
+    /** 父菜单名称 */
16
+    private String parentName;
17
+
18
+    /** 父菜单ID */
19
+    private Long parentId;
20
+
21
+    /** 显示顺序 */
22
+    private Integer orderNum;
23
+
24
+    /** 祖级列表 */
25
+    private String ancestors;
26
+
27
+    /** 子部门 */
28
+    private List<?> children = new ArrayList<>();
29
+
30
+    public String getParentName()
31
+    {
32
+        return parentName;
33
+    }
34
+
35
+    public void setParentName(String parentName)
36
+    {
37
+        this.parentName = parentName;
38
+    }
39
+
40
+    public Long getParentId()
41
+    {
42
+        return parentId;
43
+    }
44
+
45
+    public void setParentId(Long parentId)
46
+    {
47
+        this.parentId = parentId;
48
+    }
49
+
50
+    public Integer getOrderNum()
51
+    {
52
+        return orderNum;
53
+    }
54
+
55
+    public void setOrderNum(Integer orderNum)
56
+    {
57
+        this.orderNum = orderNum;
58
+    }
59
+
60
+    public String getAncestors()
61
+    {
62
+        return ancestors;
63
+    }
64
+
65
+    public void setAncestors(String ancestors)
66
+    {
67
+        this.ancestors = ancestors;
68
+    }
69
+
70
+    public List<?> getChildren()
71
+    {
72
+        return children;
73
+    }
74
+
75
+    public void setChildren(List<?> children)
76
+    {
77
+        this.children = children;
78
+    }
79
+}

+ 1 - 1
ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm

@@ -9,7 +9,7 @@ import com.ruoyi.common.core.annotation.Excel;
9 9
 #if($table.crud)
10 10
 import com.ruoyi.common.core.web.domain.BaseEntity;
11 11
 #elseif($table.tree)
12
-import com.ruoyi.framework.web.domain.TreeEntity;
12
+import com.ruoyi.common.core.web.domain.TreeEntity;
13 13
 #end
14 14
 
15 15
 /**