fix 修复 已经导入的表 未过滤问题
This commit is contained in:
parent
0c4e9dc813
commit
0b78f9361d
@ -131,9 +131,22 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||||||
if (CollUtil.isEmpty(tablesMap)) {
|
if (CollUtil.isEmpty(tablesMap)) {
|
||||||
return TableDataInfo.build();
|
return TableDataInfo.build();
|
||||||
}
|
}
|
||||||
|
List<String> tableNames = baseMapper.selectTableNameList(genTable.getDataName());
|
||||||
|
String[] tableArrays;
|
||||||
|
if (CollUtil.isNotEmpty(tableNames)) {
|
||||||
|
tableArrays = tableNames.toArray(new String[0]);
|
||||||
|
} else {
|
||||||
|
tableArrays = new String[0];
|
||||||
|
}
|
||||||
// 过滤并转换表格数据
|
// 过滤并转换表格数据
|
||||||
List<GenTable> tables = tablesMap.values().stream()
|
List<GenTable> tables = tablesMap.values().stream()
|
||||||
.filter(x -> !StringUtils.containsAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
.filter(x -> !StringUtils.containsAnyIgnoreCase(x.getName(), TABLE_IGNORE))
|
||||||
|
.filter(x -> {
|
||||||
|
if (CollUtil.isEmpty(tableNames)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return !StringUtils.containsAnyIgnoreCase(x.getName(), tableArrays);
|
||||||
|
})
|
||||||
.filter(x -> {
|
.filter(x -> {
|
||||||
boolean nameMatches = true;
|
boolean nameMatches = true;
|
||||||
boolean commentMatches = true;
|
boolean commentMatches = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user