diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java index 3c3abf37..4ac0f2ca 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java @@ -205,7 +205,10 @@ public class SysDepartRoleController extends JeecgController roleList = sysDepartRoleService.list(new QueryWrapper().eq("depart_id",departId)); List roleIds = roleList.stream().map(SysDepartRole::getId).collect(Collectors.toList()); //根据角色id,用户id查询已授权角色 - List roleUserList = departRoleUserService.list(new QueryWrapper().eq("user_id",userId).in("drole_id",roleIds)); + List roleUserList = null; + if(roleIds!=null && roleIds.size()>0){ + roleUserList = departRoleUserService.list(new QueryWrapper().eq("user_id",userId).in("drole_id",roleIds)); + } result.setSuccess(true); result.setResult(roleUserList); return result;