Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/db

This commit is contained in:
YunaiV 2024-05-01 08:34:33 +08:00
commit 6f68834249

View File

@ -49,12 +49,15 @@ public class DatabaseTableServiceImpl implements DatabaseTableService {
// 使用 MyBatis Plus Generator 解析表结构
DataSourceConfig dataSourceConfig = new DataSourceConfig.Builder(config.getUrl(), config.getUsername(),
config.getPassword()).build();
StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder();
StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder().enableSkipView(); // 忽略视图业务上一般用不到
if (StrUtil.isNotEmpty(name)) {
strategyConfig.addInclude(name);
} else {
// 移除工作流和定时任务前缀的表名 // TODO 未来做成可配置
// 移除工作流和定时任务前缀的表名
strategyConfig.addExclude("ACT_[\\S\\s]+|QRTZ_[\\S\\s]+|FLW_[\\S\\s]+");
// 移除 ORACLE 相关的系统表
strategyConfig.addExclude("IMPDP_[\\S\\s]+|ALL_[\\S\\s]+|HS_[\\S\\\\s]+");
strategyConfig.addExclude("[\\S\\s]+\\$[\\S\\s]+|[\\S\\s]+\\$"); // 表里不能有 $一般有都是系统的表
}
GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 LocalDateTime 类型不使用 LocalDate