!378 优化代码生成列表加载速度

Merge pull request !378 from 与或非/issues/20230116
This commit is contained in:
芋道源码 2023-01-19 01:23:17 +00:00 committed by Gitee
commit 2c8a2600a1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -237,10 +237,6 @@ public class CodegenServiceImpl implements CodegenService {
@Override
public List<DatabaseTableRespVO> getDatabaseTableList(Long dataSourceConfigId, String name, String comment) {
List<TableInfo> tables = databaseTableService.getTableList(dataSourceConfigId, name, comment);
// 移除置顶前缀的表名 // TODO 未来做成可配置
tables.removeIf(table -> table.getName().toUpperCase().startsWith("QRTZ_"));
tables.removeIf(table -> table.getName().toUpperCase().startsWith("ACT_"));
tables.removeIf(table -> table.getName().toUpperCase().startsWith("FLW_"));
// 移除已经生成的表
// 移除在 Codegen 已经存在的
Set<String> existsTables = CollectionUtils.convertSet(

View File

@ -52,7 +52,11 @@ public class DatabaseTableServiceImpl implements DatabaseTableService {
StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder();
if (StrUtil.isNotEmpty(name)) {
strategyConfig.addInclude(name);
} else {
// 移除工作流和定时任务前缀的表名 // TODO 未来做成可配置
strategyConfig.addExclude("ACT_[\\S\\s]+|QRTZ_[\\S\\s]+|FLW_[\\S\\s]+");
}
GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 Date 类型不使用 LocalDate
ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfig, strategyConfig.build(),
null, globalConfig, null);