This commit is contained in:
default
2018-10-17 14:32:34 +08:00
parent ad5fcec365
commit 589f49d620
2 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ public class SyncThread implements Runnable {
logger.info("获取分库数据库连接信息"+url);
List<Record> find = Db.use("masterDataSource").find("select * from table_sync_info where db_id=? ",
syncDbInfo.get("id"));
logger.info("查询主库须向分库同步数据信息"+JSON.toJSONString(find));
//logger.info("查询主库须向分库同步数据信息"+JSON.toJSONString(find));
if (find != null && find.size() > 0) {
for (final Record record : find) {
// 循环同步数据标识
@@ -187,7 +187,7 @@ public class SyncThread implements Runnable {
if (updateDatas != null && updateDatas.size() > 0) {
if(record.getStr("table_name").equals("event_record_library")) {
for(Record updateData:updateDatas) {
updateData.set("old_id",updateData.getLong("id"));
updateData.set("old_id",updateData.getLong(record.getStr("id_name")));
updateData.set("db_id", -1);
updateData.remove("id");
updateData.remove("sync_status");