🐛 数据源模糊查询失败

(cherry picked from commit 818e19b102e21c4f60d15bedd6a4d48b3711851d)
This commit is contained in:
冷冷 committed 2024-06-20 16:52:34 +08:00
1 parent 63032e672f
commit b4db53891d
2 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
<properties>
<magic.version>2.0.2</magic.version>
<screw.version>0.0.4</screw.version>
<screw.version>0.0.5</screw.version>
<db2.version>11.5.0.0</db2.version>
<anyline.version>8.7.1-jdk17-20232101</anyline.version>
<configuration.version>1.10</configuration.version>
@@ -111,7 +111,12 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
// 手动切换数据源
DynamicDataSourceContextHolder.push(table.getDsName());
List<Table> tableList = ServiceProxy.metadata().tables().values().stream()
.filter(t -> StrUtil.containsIgnoreCase(t.getTableName(), table.getTableName())).toList();
.filter(t -> {
if (StrUtil.isBlank(table.getTableName())) {
return true;
}
return StrUtil.containsIgnoreCase(t.getName(false), table.getTableName());
}).toList();
// 根据 page 进行分页
List<Table> records = CollUtil.page((int) page.getCurrent() - 1, (int) page.getSize(), tableList);