Commit c68c2a12 authored by mcb's avatar mcb

sync 修改

parent a6e6592e
......@@ -633,7 +633,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
e.printStackTrace();
}
task.setData(data); //json 数据
task.setScript(body.toString());
//task.setScript(body.toString());
task.setTargetDbName(targetDb);
task.setTargetTableName(targetTable);
task.setSourceTableName(sourceTableName);
......@@ -988,7 +988,9 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
List<SynchTableColumnsReq> list = req.get("params");
Long id = list.get(0).getSourceDbId();
int num = 0;
for (SynchTableColumnsReq str : list) {
num++;
//通过源数据库id ,查询数据源配置
DmpAgentDatasourceInfo dsInfos = offlineSynchDao.querySourceDbInfoBySourceId(str.getSourceDbId());
DmpAgentDatasourceInfo dsInfo = new DmpAgentDatasourceInfo();
......@@ -1017,7 +1019,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
map.put("isPk", 0); //主键
map.put("isPt", 0); //分区
returnData.add(map);
if (id == str.getSourceDbId()) {
if (num == 1) {
syncData.add(map);
}
}
......
......@@ -100,8 +100,8 @@
<if test="taskDesc != null and taskDesc != ''">
TASK_DESC = #{taskDesc},
</if>
<if test="script != null">
SCRIPT = #{script, jdbcType=BLOB},
<if test="data != null">
SCRIPT = #{data, jdbcType=BLOB},
</if>
<if test="dataStatus != null and dataStatus != ''">
DATA_STATUS = #{dataStatus},
......
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