diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/DeptMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/DeptMapper.java index 3b586bb79..ba5fba762 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/DeptMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/DeptMapper.java @@ -13,7 +13,7 @@ public interface DeptMapper extends BaseMapperX { default List selectList(DeptListReqVO reqVO) { return selectList(new LambdaQueryWrapperX() - .eq(DeptDO::getTenantId,reqVO.getTenantId()) + .eq(null != reqVO.getTenantId(), DeptDO::getTenantId, reqVO.getTenantId()) .likeIfPresent(DeptDO::getName, reqVO.getName()) .eqIfPresent(DeptDO::getStatus, reqVO.getStatus())); }