更新数据同步

This commit is contained in:
2025-11-17 19:13:20 +08:00
parent 530e0e1984
commit 6842f7043f
2 changed files with 7 additions and 8 deletions

View File

@@ -122,13 +122,9 @@ public class MysqlUtils {
tableInfo.setDataSource(dbName);
tableInfo.setDataRows(tableRs.getLong("TABLE_ROWS"));
Date createDate = tableRs.getTimestamp("CREATE_TIME");
if (createDate != null) {
tableInfo.setCreateTime(createDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
}
tableInfo.setCreateTime(createDate != null ? createDate : new Date());
Date updateDate = tableRs.getTimestamp("UPDATE_TIME");
if (updateDate != null) {
tableInfo.setUpdateTime(updateDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
}
tableInfo.setUpdateTime(updateDate != null ? updateDate : new Date());
tableInfo.setDs(DateUtils.dsValue());
return tableInfo;
}