Pre Merge pull request !631 from DoubleH/dev
This commit is contained in:
commit
7ef25563c9
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -137,7 +138,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
}
|
||||
// 过滤并转换表格数据
|
||||
List<GenTable> tables = tablesMap.values().stream()
|
||||
.filter(x -> !startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
||||
.filter(x -> !StrUtil.startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
||||
.filter(x -> {
|
||||
if (CollUtil.isEmpty(tableNames)) {
|
||||
return true;
|
||||
@ -175,16 +176,6 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
public static boolean startWithAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences) {
|
||||
// 判断是否是以指定字符串开头
|
||||
for (CharSequence searchCharSequence : searchCharSequences) {
|
||||
if (StringUtils.startsWithIgnoreCase(cs, searchCharSequence)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询据库列表
|
||||
*
|
||||
@ -203,7 +194,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
}
|
||||
|
||||
List<Table<?>> tableList = tablesMap.values().stream()
|
||||
.filter(x -> !startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
||||
.filter(x -> !StrUtil.startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
||||
.filter(x -> tableNameSet.contains(x.getName())).toList();
|
||||
|
||||
if (CollUtil.isEmpty(tableList)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user