From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 25 六月 2025 11:51:38 +0800 Subject: [PATCH] Merge branch 'mdc_hyjs_master' --- lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/entity/SysCategory.java | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 102 insertions(+), 0 deletions(-) diff --git a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/entity/SysCategory.java b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/entity/SysCategory.java new file mode 100644 index 0000000..e86ba7e --- /dev/null +++ b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/entity/SysCategory.java @@ -0,0 +1,102 @@ +package org.jeecg.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Description: 鍒嗙被瀛楀吀 + * @Author: jeecg-boot + * @Date: 2019-05-29 + * @Version: V1.0 + */ +@Data +@TableName("sys_category") +public class SysCategory implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 涓婚敭 + */ + @TableId(type = IdType.ASSIGN_ID) + private String id; + /** + * 鐖剁骇鑺傜偣 + */ + private String pid; + /** + * 绫诲瀷缂栫爜 + */ + @Excel(name = "鍒嗙被缂栫爜", width = 15, orderNum = "1") + private String code; + /** + * 绫诲瀷鍚嶇О + */ + @Excel(name = "鍒嗙被鍚嶇О", width = 15, orderNum = "2") + private String name; + /** + * 鍒涘缓浜� + */ + private String createBy; + /** + * 鍒涘缓鏃ユ湡 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private java.util.Date createTime; + /** + * 鏇存柊浜� + */ + private String updateBy; + /** + * 鏇存柊鏃ユ湡 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private java.util.Date updateTime; + /** + * 鎵�灞為儴闂� + */ + private String sysOrgCode; + /** + * 鏄惁鏈夊瓙鑺傜偣 + */ + private String hasChild; + /** + * 鏍硅妭鐐圭紪鐮� + */ + @Excel(name = "鏍硅妭鐐圭紪鐮�", width = 15, orderNum = "4") + private String rootCode; + /** + * 鎵�鏈夌埗鑺傜偣ID + */ + private String parentIds; + + @TableField(exist = false) + @Excel(name = "鐖惰妭鐐圭紪鐮�", width = 15, orderNum = "3") + private String parentCode; + + @TableField(exist = false) + private List<SysCategory> children; + + @Override + public String toString() { + return "SysCategory [code=" + code + ", name=" + name + "]"; + } + + public void addChild(SysCategory node) { + if (children == null) { + children = new ArrayList<>(); + } + children.add(node); + } +} -- Gitblit v1.9.3