From 8bc40a3a4b885dfc1c64875c5177b44403f34552 Mon Sep 17 00:00:00 2001 From: smallchill Date: Fri, 20 Dec 2019 12:00:34 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E8=B6=85=E7=AE=A1=E5=8F=AF=E7=9C=8B?= =?UTF-8?q?=E5=88=B0=E6=89=80=E6=9C=89=E9=83=A8=E9=97=A8tree=E8=8A=82?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/springblade/system/mapper/DeptMapper.xml | 2 +- .../org/springblade/system/service/impl/DeptServiceImpl.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml index 83158d43..e85ff7ba 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.xml @@ -35,7 +35,7 @@ diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java index e0fbada4..fbf5d64c 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.exceptions.ApiException; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.node.ForestNodeMerger; import org.springblade.core.tool.utils.Func; @@ -47,6 +48,9 @@ public class DeptServiceImpl extends ServiceImpl implements ID @Override public List tree(String tenantId) { + if (AuthUtil.isAdministrator()) { + tenantId = StringPool.EMPTY; + } return ForestNodeMerger.merge(baseMapper.tree(tenantId)); }