Commit 1058b9e3 authored by 黎博's avatar 黎博

bug fix

parent cbdea75f
...@@ -505,7 +505,7 @@ public class DatabaseSyncServiceImpl implements DatabaseSyncService { ...@@ -505,7 +505,7 @@ public class DatabaseSyncServiceImpl implements DatabaseSyncService {
if (columnArrayStr.length() == 0) { if (columnArrayStr.length() == 0) {
columnArrayStr.append("`").append(column).append("`"); columnArrayStr.append("`").append(column).append("`");
} else { } else {
columnArrayStr.append(",`").append(columnArrayStr).append("`"); columnArrayStr.append(",`").append(column).append("`");
} }
} }
...@@ -586,8 +586,8 @@ public class DatabaseSyncServiceImpl implements DatabaseSyncService { ...@@ -586,8 +586,8 @@ public class DatabaseSyncServiceImpl implements DatabaseSyncService {
log.info("本次同步{}.{}表,不保留业务数据", dbName, tableName); log.info("本次同步{}.{}表,不保留业务数据", dbName, tableName);
if (dbList.contains(dbName)) { if (dbList.contains(dbName)) {
// 如果表存在,则首先删除表 // 如果表存在,则首先删除表
log.info("表存在,首先删除表: {}", tableName);
String dropTableSql = String.format("DROP TABLE if exists %s", tableName); String dropTableSql = String.format("DROP TABLE if exists %s", tableName);
log.info("首先执行删除表的SQL: {}", dropTableSql);
preparedStatement = connection.prepareStatement(dropTableSql); preparedStatement = connection.prepareStatement(dropTableSql);
preparedStatement.execute(); preparedStatement.execute();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment