更新数据同步

This commit is contained in:
2025-11-17 16:37:15 +08:00
parent 84acc5c1e4
commit 53aedbc048
4 changed files with 36 additions and 6 deletions

View File

@@ -96,7 +96,9 @@ public class jobController {
*/
@GetMapping("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());
for (BizDbConfig config : configs) {
CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {

View File

@@ -87,12 +87,36 @@ public class BizDbConfig implements Serializable {
/**
* schema名称
*/
@TableField("schema_name")
private String schemaName;
@TableField("db_schema_name")
private String dbSchemaName;
/**
* 更新时间
*/
@TableField("update_time")
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;
}

View File

@@ -29,7 +29,7 @@ public class demo {
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
})
.strategyConfig(builder -> {
builder.addInclude("data_table_info,data_table_field")
builder.addInclude("biz_db_config")
.addTablePrefix("biz_,erp_")
.entityBuilder()
.enableLombok()

View File

@@ -14,13 +14,17 @@
<result column="db_password" property="dbPassword" />
<result column="description" property="description" />
<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="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>
<!-- 通用查询结果列 -->
<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>
</mapper>