字典查询条件拼接修改

pull/57/head
Liyanjun 2023-07-04 12:24:27 +08:00
parent 0bab416b2b
commit 5db1a31564
1 changed files with 5 additions and 3 deletions

View File

@ -362,9 +362,11 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> 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查询字典