Commit a6e6592e authored by mcb's avatar mcb

离线修改

parent 24846237
......@@ -266,12 +266,12 @@ public class OfflineSynchController {
}
/**
* 保存离线任务数据
* 保存/编辑离线任务数据
*
* @return
* @author Bellamy
*/
@ApiOperation(value = "保存离线任务数据", notes = "保存离线任务数据")
@ApiOperation(value = "保存/编辑离线任务数据", notes = "保存/编辑离线任务数据")
@PostMapping(value = "/addSyncTask")
public JsonResult addSyncTask(@RequestBody @Validated SyncDmpTaskAddReq syncDmpTaskAddReq) throws Exception {
JsonResult list = new JsonResult();
......
......@@ -638,6 +638,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task.setTargetTableName(targetTable);
task.setSourceTableName(sourceTableName);
task.setSourceDbName(sourceDbName);
task.setSourceDbId(sourceDbId);
List<DvTaskRuleT> list = new ArrayList<>();
//更新规则信息
List<Map> taskRules = (List<Map>) body.get("taskRules");
......@@ -647,8 +648,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task.setCreateUserId(SessionUtils.getCurrentUserId());
task.setCreateTime(new Date());
dmpDevelopTaskDao.insert(task); //新增任务数据
this.saveTaskHistory(task); //保存任务历史版本
logger.info("======== save sync task end ========");
this.saveTaskHistory(task); //保存任务历史版本
//保存dmp数据校验规则信息
settRuleInfo(taskId, taskRules, list);
} else {
......
......@@ -73,9 +73,9 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into dmp_develop_task(datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS, CREATE_USER_ID, CREATE_TIME,
insert into dmp_develop_task(datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS, CREATE_USER_ID, CREATE_TIME, SOURCE_DB_ID,
UPDATE_USER_ID, UPDATE_TIME, TREE_ID, CHK_RESULT, SYNC_RESULT, CHK_TIME, SYNC_TIME, FLOW_HEADER, FLOW_JSON, VERSION, publish_version, IS_GZIPED,SOURCE_DB_NAME,SOURCE_TABLE_NAME,TARGET_DB_NAME,TARGET_TABLE_NAME)
values (#{datasourceId}, #{taskType}, #{type}, #{scheduleType}, #{isSubmit}, #{taskDesc}, #{data}, #{dataStatus}, #{createUserId}, #{createTime}, #{updateUserId},
values (#{datasourceId}, #{taskType}, #{type}, #{scheduleType}, #{isSubmit}, #{taskDesc}, #{data}, #{dataStatus}, #{createUserId}, #{createTime}, #{sourceDbId}, #{updateUserId},
#{updateTime}, #{treeId}, #{chkResult}, #{syncResult}, #{chkTime}, #{syncTime}, #{flowHeader}, #{flowJson}, #{version}, #{publishVersion,jdbcType=VARCHAR}, #{isGziped}, #{sourceDbName}, #{sourceTableName}, #{targetDbName}, #{targetTableName})
</insert>
......@@ -148,6 +148,21 @@
<if test="isGziped != null">
IS_GZIPED = #{isGziped},
</if>
<if test="sourceDbId != null">
source_db_id = #{sourceDbId},
</if>
<if test="sourceDbName != null and sourceTableName != '' ">
source_db_name = #{sourceDbName},
</if>
<if test="sourceTableName != null and sourceTableName !='' ">
source_table_name = #{sourceTableName},
</if>
<if test="targetDbName != null and targetDbName !='' ">
target_db_name = #{targetDbName},
</if>
<if test="targetTableName != null and targetTableName !='' ">
target_table_name = #{targetTableName},
</if>
</set>
where ID = #{id}
</update>
......
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