From 5db1a31564854b75474836d03cd8d17162f9190a Mon Sep 17 00:00:00 2001 From: Liyanjun Date: Tue, 4 Jul 2023 12:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=8B=BC=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kernel/dict/modular/service/impl/DictServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel-s-dict/dict-business/src/main/java/cn/stylefeng/roses/kernel/dict/modular/service/impl/DictServiceImpl.java b/kernel-s-dict/dict-business/src/main/java/cn/stylefeng/roses/kernel/dict/modular/service/impl/DictServiceImpl.java index 2b727a8d2..41884fa68 100644 --- a/kernel-s-dict/dict-business/src/main/java/cn/stylefeng/roses/kernel/dict/modular/service/impl/DictServiceImpl.java +++ b/kernel-s-dict/dict-business/src/main/java/cn/stylefeng/roses/kernel/dict/modular/service/impl/DictServiceImpl.java @@ -362,9 +362,11 @@ public class DictServiceImpl extends ServiceImpl implements // 根据名称或者编码进行查询 String searchText = dictRequest.getSearchText(); if (ObjectUtil.isNotEmpty(searchText)) { - queryWrapper.like(SysDict::getDictName, searchText); - queryWrapper.or().like(SysDict::getDictCode, searchText); - queryWrapper.or().like(SysDict::getDictNamePinyin, searchText); + queryWrapper.and(wq -> { + wq.like(SysDict::getDictName, searchText) + .or().like(SysDict::getDictCode, searchText) + .or().like(SysDict::getDictNamePinyin, searchText); + }); } // 根据字典类型id查询字典