mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【修复】Oracle 自带系统表,影响代码生成
This commit is contained in:
parent
1c9b5ddae9
commit
c6eed9a636
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user