| | |
| | | } |
| | | // 过滤并转换表格数据 |
| | | List<GenTable> tables = tablesMap.values().stream() |
| | | .filter(x -> !startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE)) |
| | | .filter(x -> !StringUtils.startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE)) |
| | | .filter(x -> { |
| | | if (CollUtil.isEmpty(tableNames)) { |
| | | return true; |
| | |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 查询据库列表 |
| | | * |
| | |
| | | } |
| | | |
| | | List<Table<?>> tableList = tablesMap.values().stream() |
| | | .filter(x -> !startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE)) |
| | | .filter(x -> !StringUtils.startWithAnyIgnoreCase(x.getName(), TABLE_IGNORE)) |
| | | .filter(x -> tableNameSet.contains(x.getName())).toList(); |
| | | |
| | | if (CollUtil.isEmpty(tableList)) { |