From a6ee4e329d8789915418302566bde6d73fa9fbf3 Mon Sep 17 00:00:00 2001 From: "ys.git" <18439391935@163.com> Date: Fri, 19 Dec 2025 17:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=8F=9C=E5=8D=95=E6=98=AF?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ModelMenuPermissionServiceImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xdap/self_development/service/impl/ModelMenuPermissionServiceImpl.java b/src/main/java/com/xdap/self_development/service/impl/ModelMenuPermissionServiceImpl.java index 4a8c58d..793e53a 100644 --- a/src/main/java/com/xdap/self_development/service/impl/ModelMenuPermissionServiceImpl.java +++ b/src/main/java/com/xdap/self_development/service/impl/ModelMenuPermissionServiceImpl.java @@ -68,9 +68,14 @@ public class ModelMenuPermissionServiceImpl implements ModelMenuPermissionServic if (ObjectUtils.isEmpty(menuName)) { throw new RuntimeException("根据ID查询菜单时ID未传入"); } - ModelMenuDictionaryPojo modelMenuDictionaryPojo = businessDatabase.getBusinessDatabase() - .eq("menu_name", menuName) - .doQuery(ModelMenuDictionaryPojo.class).get(0); + ModelMenuDictionaryPojo modelMenuDictionaryPojo = null; + try { + modelMenuDictionaryPojo = businessDatabase.getBusinessDatabase() + .eq("menu_name", menuName) + .doQueryFirst(ModelMenuDictionaryPojo.class); + } catch (Exception e) { + throw new RuntimeException("查询权限菜单时发生异常", e); + } return modelMenuDictionaryPojo; }