API数据表更新
This commit is contained in:
@@ -336,16 +336,16 @@ public class taskDbSync {
|
||||
errorMsg = e.getMessage() != null ? e.getMessage() : e.getClass().getSimpleName();
|
||||
System.err.println("同步数据失败: " + errorMsg);
|
||||
}
|
||||
syncTaskService.updateById(task);
|
||||
DbConfig sourceDbConfig = dbConfigService.getById(task.getSourceDbId());
|
||||
DbConfig targetDbConfig = dbConfigService.getById(task.getTargetDbId());
|
||||
LocalDateTime endTime = LocalDateTime.now();
|
||||
task.setLastSyncTime(endTime);
|
||||
SyncTaskLog taskLog = new SyncTaskLog(task.getTaskId(), task.getTaskName(), task.getSourceDbId(),
|
||||
sourceDbConfig.getDbName(), sourceTable, task.getTargetDbId(), targetDbConfig.getDbName(), targetTable,
|
||||
startTime, endTime, (long) totalRows, (long) successRows, (long) failRows, ustatus,
|
||||
errorMsg, (int) Duration.between(startTime, endTime).getSeconds(), "0");
|
||||
task.setLastSyncTime(endTime);
|
||||
taskLogService.save(taskLog);
|
||||
syncTaskService.updateById(task);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user