查询菜单是报错修改

This commit is contained in:
ys.git 2025-12-19 17:36:31 +08:00
parent 36404dc885
commit a6ee4e329d

View File

@ -68,9 +68,14 @@ public class ModelMenuPermissionServiceImpl implements ModelMenuPermissionServic
if (ObjectUtils.isEmpty(menuName)) {
throw new RuntimeException("根据ID查询菜单时ID未传入");
}
ModelMenuDictionaryPojo modelMenuDictionaryPojo = businessDatabase.getBusinessDatabase()
ModelMenuDictionaryPojo modelMenuDictionaryPojo = null;
try {
modelMenuDictionaryPojo = businessDatabase.getBusinessDatabase()
.eq("menu_name", menuName)
.doQuery(ModelMenuDictionaryPojo.class).get(0);
.doQueryFirst(ModelMenuDictionaryPojo.class);
} catch (Exception e) {
throw new RuntimeException("查询权限菜单时发生异常", e);
}
return modelMenuDictionaryPojo;
}