From 0703c8d15442d0f4cb2bcc61dd391377e896cb9c Mon Sep 17 00:00:00 2001 From: lihaiyang Date: Sat, 13 Apr 2024 23:36:01 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7=E7=9A=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=9C=A8=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=8E=88=E6=9D=83=E8=A7=92=E8=89=B2=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/service/permission/MenuServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index bca2bd95a..0168fbcb1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; import cn.iocoder.yudao.module.system.service.tenant.TenantService; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.utils.Lists; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.context.annotation.Lazy; @@ -130,6 +131,10 @@ public class MenuServiceImpl implements MenuService { @Override public List getMenuList(Collection ids) { + // 当ids为空时,返回一个空的实例对象 + if (CollUtil.isEmpty(ids)) { + return Lists.newArrayList(); + } return menuMapper.selectBatchIds(ids); }