更新数据同步
This commit is contained in:
@@ -96,7 +96,9 @@ public class jobController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("getJobDataTableMarge")
|
@GetMapping("getJobDataTableMarge")
|
||||||
public ApiResult<?> getJobDataTableMarge() {
|
public ApiResult<?> getJobDataTableMarge() {
|
||||||
List<BizDbConfig> configs = bizDbConfigService.list();
|
QueryWrapper<BizDbConfig> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("is_enabled","1");
|
||||||
|
List<BizDbConfig> configs = bizDbConfigService.list(queryWrapper);
|
||||||
List<CompletableFuture<Void>> futures = new ArrayList<>(configs.size());
|
List<CompletableFuture<Void>> futures = new ArrayList<>(configs.size());
|
||||||
for (BizDbConfig config : configs) {
|
for (BizDbConfig config : configs) {
|
||||||
CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
|
||||||
|
|||||||
@@ -87,12 +87,36 @@ public class BizDbConfig implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* schema名称
|
* schema名称
|
||||||
*/
|
*/
|
||||||
@TableField("schema_name")
|
@TableField("db_schema_name")
|
||||||
private String schemaName;
|
private String dbSchemaName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@TableField("update_time")
|
@TableField("update_time")
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField("f_tenant_id")
|
||||||
|
private String fTenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程id
|
||||||
|
*/
|
||||||
|
@TableField("f_flow_id")
|
||||||
|
private String fFlowId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程任务主键
|
||||||
|
*/
|
||||||
|
@TableField("f_flow_task_id")
|
||||||
|
private String fFlowTaskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程任务状态
|
||||||
|
*/
|
||||||
|
@TableField("f_flow_state")
|
||||||
|
private Integer fFlowState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class demo {
|
|||||||
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
|
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
|
||||||
})
|
})
|
||||||
.strategyConfig(builder -> {
|
.strategyConfig(builder -> {
|
||||||
builder.addInclude("data_table_info,data_table_field")
|
builder.addInclude("biz_db_config")
|
||||||
.addTablePrefix("biz_,erp_")
|
.addTablePrefix("biz_,erp_")
|
||||||
.entityBuilder()
|
.entityBuilder()
|
||||||
.enableLombok()
|
.enableLombok()
|
||||||
|
|||||||
@@ -14,13 +14,17 @@
|
|||||||
<result column="db_password" property="dbPassword" />
|
<result column="db_password" property="dbPassword" />
|
||||||
<result column="description" property="description" />
|
<result column="description" property="description" />
|
||||||
<result column="is_enabled" property="isEnabled" />
|
<result column="is_enabled" property="isEnabled" />
|
||||||
<result column="schema_name" property="schemaName" />
|
<result column="db_schema_name" property="dbSchemaName" />
|
||||||
<result column="update_time" property="updateTime" />
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="f_tenant_id" property="fTenantId" />
|
||||||
|
<result column="f_flow_id" property="fFlowId" />
|
||||||
|
<result column="f_flow_task_id" property="fFlowTaskId" />
|
||||||
|
<result column="f_flow_state" property="fFlowState" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
create_time, id, db_type, db_name, db_ip, db_port, db_username, db_password, description, is_enabled, schema_name, update_time
|
create_time, id, db_type, db_name, db_ip, db_port, db_username, db_password, description, is_enabled, db_schema_name, update_time, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user