From 59450a4656addda14d56c8cff8f2fbd89e73ae5c Mon Sep 17 00:00:00 2001 From: babylazsss <18150028757@163.com> Date: Wed, 2 Aug 2023 21:44:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8F=9C=E5=8D=95ids?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6select=E6=9F=A5=E8=AF=A2=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=88=97=E8=A1=A8=E6=8A=A5=E9=94=99?= 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 a108e8f77..f90d66c34 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 @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuCreateReqVO; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuUpdateReqVO; @@ -20,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.Collection; +import java.util.Collections; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -130,6 +132,9 @@ public class MenuServiceImpl implements MenuService { @Override public List getMenuList(Collection ids) { + if (CollectionUtil.isEmpty(ids)) { + return Collections.emptyList(); + } return menuMapper.selectBatchIds(ids); }