新增MySQL和pg数据库的同步
This commit is contained in:
@@ -66,24 +66,6 @@ public class SyncTask implements Serializable {
|
||||
@TableField("target_table")
|
||||
private String targetTable;
|
||||
|
||||
/**
|
||||
* 同步类型(如全量同步、增量同步等)
|
||||
*/
|
||||
@TableField("sync_type")
|
||||
private String syncType;
|
||||
|
||||
/**
|
||||
* 增量同步字段(用于增量同步时的判断依据)
|
||||
*/
|
||||
@TableField("increment_column")
|
||||
private String incrementColumn;
|
||||
|
||||
/**
|
||||
* 定时任务表达式( cron表达式 )
|
||||
*/
|
||||
@TableField("cron_expression")
|
||||
private String cronExpression;
|
||||
|
||||
/**
|
||||
* 是否激活(任务启用状态标识)
|
||||
*/
|
||||
|
||||
@@ -160,7 +160,7 @@ public class taskDbSync {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取PostgreSQL兼容的字段定义
|
||||
* 获取PostgresSQL兼容的字段定义
|
||||
*/
|
||||
private List<String> getColumnDefinitions(JdbcTemplate sourceJdbc, String tableName) throws SQLException {
|
||||
List<String> definitions = new ArrayList<>();
|
||||
|
||||
@@ -29,7 +29,7 @@ public class demo {
|
||||
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
|
||||
})
|
||||
.strategyConfig(builder -> {
|
||||
builder.addInclude("biz_sync_task,biz_db_config")
|
||||
builder.addInclude("biz_sync_task")
|
||||
.addTablePrefix("biz_")
|
||||
.entityBuilder()
|
||||
.enableLombok()
|
||||
@@ -45,7 +45,8 @@ public class demo {
|
||||
.formatServiceImplFileName("%sServiceImpl")
|
||||
.mapperBuilder()
|
||||
.enableBaseResultMap()
|
||||
.enableBaseColumnList();
|
||||
.enableBaseColumnList()
|
||||
.enableFileOverride(); // 开启mapper接口和xml文件覆盖
|
||||
})
|
||||
.templateEngine(new FreemarkerTemplateEngine())
|
||||
.execute();
|
||||
|
||||
Reference in New Issue
Block a user