diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java index bfbe1e4..90fa3c1 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java @@ -339,7 +339,12 @@ public class ModulexController extends JeecgController queryWrapper.eq("requirement_id",requirementid); queryWrapper.eq("fun_level",2); List listrf = requirementFunService.list(queryWrapper); - return Result.OK(listrf.get(0).getFunId()); + if(listrf.size()>0){ + return Result.OK(listrf.get(0).getFunId()); + }else { + return Result.error("无对应模块"); + } + } /** @@ -358,7 +363,12 @@ public class ModulexController extends JeecgController queryWrapper.eq("requirement_id",requirementid); queryWrapper.eq("fun_level",3); List listrf = requirementFunService.list(queryWrapper); - return Result.OK(listrf.get(0).getFunId()); + if(listrf.size()>0){ + return Result.OK(listrf.get(0).getFunId()); + }else { + return Result.error("无对应功能"); + } + } /**