|
@@ -15,6 +15,7 @@
|
|
|
*/
|
|
|
package org.springblade.core.tool.node;
|
|
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
import lombok.Data;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -28,8 +29,20 @@ import java.util.List;
|
|
|
@Data
|
|
|
public class BaseNode implements INode {
|
|
|
|
|
|
- protected Integer id;//主键ID
|
|
|
- protected Integer parentId;//父节点ID
|
|
|
- protected List<INode> children = new ArrayList<>();//子孙节点
|
|
|
+ /**
|
|
|
+ * 主键ID
|
|
|
+ */
|
|
|
+ protected Integer id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 父节点ID
|
|
|
+ */
|
|
|
+ protected Integer parentId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 子孙节点
|
|
|
+ */
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
+ protected List<INode> children = new ArrayList<>();
|
|
|
|
|
|
}
|