From c6eed9a6360995c56abccd25f594351e53cd54d0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 1 May 2024 08:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91Oracle=20?= =?UTF-8?q?=E8=87=AA=E5=B8=A6=E7=B3=BB=E7=BB=9F=E8=A1=A8=EF=BC=8C=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/service/db/DatabaseTableServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java index cc995dd74d..c1c9d3edee 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java @@ -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