From e19b0f54944b720159996a04e2ffcb2270246b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=BE=E5=AF=8C=E6=96=8C?= Date: Sun, 7 Sep 2025 11:31:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(farm):=20=E7=89=A9=E7=A7=8D=E5=BA=93?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 分页查询条件bug --- .../farm/service/specieslibrary/SpeciesLibraryServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/specieslibrary/SpeciesLibraryServiceImpl.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/specieslibrary/SpeciesLibraryServiceImpl.java index fb3e226e..cdd670b5 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/specieslibrary/SpeciesLibraryServiceImpl.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/specieslibrary/SpeciesLibraryServiceImpl.java @@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import jakarta.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -385,7 +386,7 @@ public class SpeciesLibraryServiceImpl implements SpeciesLibraryService { List allDicts = twoDictMapper.selectList(wrapperX); List matchedDicts = null; - if (req.getName() != null) { + if (StringUtils.isEmpty(req.getName() )) { // 查找匹配的节点 matchedDicts = allDicts.stream().filter(dict -> dict.getName().equals(req.getName())).collect(Collectors.toList()); if (matchedDicts.isEmpty()) {