update 优化 代码生成表名判断 使用开头判断避免误判
| | |
| | | } |
| | | // 过滤并转换表格数据 |
| | | List<GenTable> tables = tablesMap.values().stream() |
| | | .filter(x -> !StringUtils.containsAnyIgnoreCase(x.getName(), TABLE_IGNORE)) |
| | | .filter(x -> !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; |
| | | } |
| | | |
| | | /** |
| | | * 查询据库列表 |
| | | * |