Commit c68c2a12 authored by mcb's avatar mcb

sync 修改

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