diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java index 5e7af739..f44eacd4 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java @@ -16,7 +16,7 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = true) -public class TreeEntity extends BaseEntity { +public class TreeEntity extends BaseEntity { private static final long serialVersionUID = 1L; @@ -38,6 +38,6 @@ public class TreeEntity extends BaseEntity { */ @TableField(exist = false) @ApiModelProperty(value = "子部门") - private List children = new ArrayList<>(); + private List children = new ArrayList<>(); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java index 46e99368..ccfe07d9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java @@ -24,7 +24,7 @@ import javax.validation.constraints.Size; @EqualsAndHashCode(callSuper = true) @TableName("sys_dept") @ApiModel("部门业务对象") -public class SysDept extends TreeEntity { +public class SysDept extends TreeEntity { private static final long serialVersionUID = 1L; /** diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java index 00db9416..8668481b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java @@ -23,7 +23,7 @@ import javax.validation.constraints.Size; @EqualsAndHashCode(callSuper = true) @TableName("sys_menu") @ApiModel("菜单权限业务对象") -public class SysMenu extends TreeEntity { +public class SysMenu extends TreeEntity { /** * 菜单ID diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java index 1ca4a7ad..b480aa0c 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java @@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) @TableName("test_tree") -public class TestTree extends TreeEntity { +public class TestTree extends TreeEntity { private static final long serialVersionUID = 1L; diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java index 29f4ac97..211a79f1 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java @@ -21,7 +21,7 @@ import javax.validation.constraints.NotNull; @Data @EqualsAndHashCode(callSuper = true) @ApiModel("测试树表业务对象") -public class TestTreeBo extends TreeEntity { +public class TestTreeBo extends TreeEntity { /** * 主键 diff --git a/ruoyi-generator/src/main/resources/vm/java/bo.java.vm b/ruoyi-generator/src/main/resources/vm/java/bo.java.vm index 94d60508..13b98731 100644 --- a/ruoyi-generator/src/main/resources/vm/java/bo.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/bo.java.vm @@ -28,7 +28,7 @@ import com.ruoyi.common.core.domain.TreeEntity; #if($table.crud || $table.sub) #set($Entity="BaseEntity") #elseif($table.tree) -#set($Entity="TreeEntity") +#set($Entity="TreeEntity<${ClassName}Bo>") #end @Data diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm index 2cf259cc..8fde4ade 100644 --- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm @@ -25,7 +25,7 @@ import com.ruoyi.common.core.domain.TreeEntity; #if($table.crud || $table.sub) #set($Entity="BaseEntity") #elseif($table.tree) - #set($Entity="TreeEntity") + #set($Entity="TreeEntity<${ClassName}>") #end @Data @TableName("${tableName}") diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index a5827143..5b6213eb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -143,7 +143,7 @@ public class SysMenuServiceImpl implements ISysMenuService { router.setComponent(getComponent(menu)); router.setQuery(menu.getQueryParam()); router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); - List cMenus = (List) menu.getChildren(); + List cMenus = menu.getChildren(); if (!cMenus.isEmpty() && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { router.setAlwaysShow(true); router.setRedirect("noRedirect");