diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/node/BaseNode.java b/blade-core-tool/src/main/java/org/springblade/core/tool/node/BaseNode.java index 8eb7fa5..9566373 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/node/BaseNode.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/node/BaseNode.java @@ -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 children = new ArrayList<>();//子孙节点 + /** + * 主键ID + */ + protected Integer id; + + /** + * 父节点ID + */ + protected Integer parentId; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + protected List children = new ArrayList<>(); }