From cae3519e7fc626159d15ffa24ac01bfe08e34526 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Mon, 29 Jan 2024 14:10:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.0.5=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=9F=BA=E7=A1=80=E7=B1=BB=EF=BC=8C=E7=94=A8?= =?UTF-8?q?=E6=9D=A5=E9=80=9A=E7=94=A8=E5=93=8D=E5=BA=94=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kernel/rule/pojo/dict/SimpleTreeDict.java | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/pojo/dict/SimpleTreeDict.java diff --git a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/pojo/dict/SimpleTreeDict.java b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/pojo/dict/SimpleTreeDict.java new file mode 100644 index 000000000..527b4e316 --- /dev/null +++ b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/pojo/dict/SimpleTreeDict.java @@ -0,0 +1,90 @@ +/* + * Copyright [2020-2030] [https://www.stylefeng.cn] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点: + * + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改Guns源码头部的版权声明。 + * 3.请保留源码和相关描述文件的项目出处,作者声明等。 + * 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns + * 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns + * 6.若您的项目无法满足以上几点,可申请商业授权 + */ +package cn.stylefeng.roses.kernel.rule.pojo.dict; + +import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription; +import cn.stylefeng.roses.kernel.rule.tree.factory.base.AbstractTreeNode; +import lombok.Data; + +import java.util.List; + +/** + * 只包含id,name,code三个字段的pojo,并且可以带树形结构 + * + * @author fengshuonan + * @since 2024-01-29 14:03 + */ +@Data +public class SimpleTreeDict implements AbstractTreeNode { + + /** + * 业务id + */ + @ChineseDescription("业务id") + private String id; + + /** + * 业务名称 + */ + @ChineseDescription("业务名称") + private String name; + + /** + * 业务编码 + */ + @ChineseDescription("业务编码") + private String code; + + /** + * 业务父级id + */ + @ChineseDescription("业务父级id") + private String parentId; + + /** + * 子集节点 + */ + @ChineseDescription("子集节点") + private List children; + + public SimpleTreeDict() { + } + + @Override + public String getNodeId() { + return id; + } + + @Override + public String getNodeParentId() { + return parentId; + } + + @Override + public void setChildrenNodes(List childrenNodes) { + this.children = childrenNodes; + } + +}