|
|
@ -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;
|
|
|
|