Merge remote-tracking branch 'origin/master'

This commit is contained in:
YunaiV 2024-04-22 21:10:49 +08:00
commit ea4db88dab

View File

@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum;
import cn.iocoder.yudao.module.system.service.tenant.TenantService; import cn.iocoder.yudao.module.system.service.tenant.TenantService;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
@ -130,6 +131,10 @@ public class MenuServiceImpl implements MenuService {
@Override @Override
public List<MenuDO> getMenuList(Collection<Long> ids) { public List<MenuDO> getMenuList(Collection<Long> ids) {
// 当ids为空时返回一个空的实例对象
if (CollUtil.isEmpty(ids)) {
return Lists.newArrayList();
}
return menuMapper.selectBatchIds(ids); return menuMapper.selectBatchIds(ids);
} }