From a5bc0662e28a470f987d1ad8d3c49b298f626833 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Wed, 31 Aug 2022 16:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=83=A8=E8=BD=AC=E6=8D=A2=E4=B8=BA?= =?UTF-8?q?=E8=87=AA=E5=A2=9Eid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/huoran/iasf/entity/SysPermission.java | 2 +- .../com/huoran/iasf/service/impl/PermissionServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/huoran/iasf/entity/SysPermission.java b/src/main/java/com/huoran/iasf/entity/SysPermission.java index 103206d..6f5b6ca 100644 --- a/src/main/java/com/huoran/iasf/entity/SysPermission.java +++ b/src/main/java/com/huoran/iasf/entity/SysPermission.java @@ -45,7 +45,7 @@ public class SysPermission implements Serializable { @NotNull(message = "所属菜单不能为空") @ApiModelProperty(value = "父级菜单权限id") - private String pid; + private Integer pid; @ApiModelProperty(value = "排序") private Integer orderNum; diff --git a/src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java index 71d08fc..9535e4b 100644 --- a/src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java @@ -251,7 +251,7 @@ public class PermissionServiceImpl extends ServiceImpl build(List treeNodes) { List trees = new ArrayList<>(); for (SysPermission treeNode : treeNodes) { - if ("0".equals(treeNode.getPid())) { + if (treeNode.getPid()==0) { treeNode.setLevel(1); trees.add(findChildren(treeNode,treeNodes)); }