master
chengqf 2 years ago
parent 67eb92e7ab
commit 6e1f5fb2f9

@ -205,7 +205,6 @@ public class IdcServiceImpl implements IdcService {
return; return;
} }
} }
String[] syncTables = TableUtils.syncTables(); String[] syncTables = TableUtils.syncTables();
for (int i = 0; i < syncTables.length; i++) { for (int i = 0; i < syncTables.length; i++) {
String[] tnames = syncTables[i].split("/"); String[] tnames = syncTables[i].split("/");
@ -223,6 +222,7 @@ public class IdcServiceImpl implements IdcService {
private void syncData(String t, boolean isUpload, String syncIp) { private void syncData(String t, boolean isUpload, String syncIp) {
boolean sync = true; boolean sync = true;
try {
String[] tnames = t.split("/"); String[] tnames = t.split("/");
String lastUpdateTime = getUpdateTime(tnames[2] + "." + tnames[0]); String lastUpdateTime = getUpdateTime(tnames[2] + "." + tnames[0]);
@ -266,6 +266,9 @@ public class IdcServiceImpl implements IdcService {
} }
} }
//} //}
} catch (Exception ex) {
}
} }
@ -504,12 +507,14 @@ public class IdcServiceImpl implements IdcService {
int childNum = -1; int childNum = -1;
/*子表*/ /*子表*/
String[] syncTables = TableUtils.syncTables(); String[] syncTables = TableUtils.syncTables();
if(!StringUtils.isEmpty(tableKey)) {
for (String str : syncTables) { for (String str : syncTables) {
if (str.contains("/" + tableKey + "/")) { if (str.contains("/" + tableKey + "/")) {
childNum++; childNum++;
childs[childNum] = str; childs[childNum] = str;
} }
} }
}
Map<String, String> table = dbDao.getMysql(tableName); Map<String, String> table = dbDao.getMysql(tableName);
if (!(table != null && table.get("tableName") != null)) if (!(table != null && table.get("tableName") != null))
return false; return false;

Loading…
Cancel
Save