Commit 0ee7d414 authored by mcb's avatar mcb

commit

parent 0f3e8b43
...@@ -118,7 +118,14 @@ public class OfflineSynchController { ...@@ -118,7 +118,14 @@ public class OfflineSynchController {
if (StringUtils.isEmpty(taskId)) { if (StringUtils.isEmpty(taskId)) {
return new JsonResult(ResultCode.PARAMS_ERROR); return new JsonResult(ResultCode.PARAMS_ERROR);
} }
JsonResult list = offlineSynchService.taskRunNowByTaskId(taskId); JsonResult list = new JsonResult();
try {
list = offlineSynchService.taskRunNowByTaskId(taskId);
} catch (Exception e) {
list.setMessage(e.getMessage());
list.setCode(ResultCode.INTERNAL_SERVER_ERROR);
e.printStackTrace();
}
return list; return list;
} }
...@@ -307,9 +314,9 @@ public class OfflineSynchController { ...@@ -307,9 +314,9 @@ public class OfflineSynchController {
if (StringUtils.isEmpty(newSynchTaskReq.getTreeName())) { if (StringUtils.isEmpty(newSynchTaskReq.getTreeName())) {
return JsonResult.error(ResultCode.PARAMS_ERROR, "任务名称不能为空"); return JsonResult.error(ResultCode.PARAMS_ERROR, "任务名称不能为空");
} }
/*if (StringUtils.isEmpty(newSynchTaskReq.getType())) { if (StringUtils.isEmpty(newSynchTaskReq.getType())) {
return JsonResult.error(ResultCode.PARAMS_ERROR, "任务类型不能为空"); return JsonResult.error(ResultCode.PARAMS_ERROR, "任务类型不能为空");
}*/ }
if (StringUtils.isEmpty(newSynchTaskReq.getProjectId())) { if (StringUtils.isEmpty(newSynchTaskReq.getProjectId())) {
return JsonResult.error(ResultCode.PARAMS_ERROR, "目标文件夹不能为空"); return JsonResult.error(ResultCode.PARAMS_ERROR, "目标文件夹不能为空");
} }
......
...@@ -22,7 +22,7 @@ public class NewSynchTaskReq implements Serializable { ...@@ -22,7 +22,7 @@ public class NewSynchTaskReq implements Serializable {
/* /*
* 任务类型 * 任务类型
* */ * */
@ApiModelProperty(value = "任务类型:01:离线同步,02:实时同步,03:数据开发") @ApiModelProperty(value = "任务类型:01:离线同步,02:实时同步,03:数据开发,04:脚本开发,05:SQL开发")
@NotNull(message = "任务类型不能为空") @NotNull(message = "任务类型不能为空")
@NotEmpty(message = "任务类型不能为空") @NotEmpty(message = "任务类型不能为空")
private String type; private String type;
...@@ -48,6 +48,9 @@ public class NewSynchTaskReq implements Serializable { ...@@ -48,6 +48,9 @@ public class NewSynchTaskReq implements Serializable {
@NotEmpty(message = "目标文件夹不能为空") @NotEmpty(message = "目标文件夹不能为空")
private String parentId; private String parentId;
@ApiModelProperty(value = "实时任务 同步方式")
private String syncMode;
public String getProjectId() { public String getProjectId() {
return projectId; return projectId;
} }
...@@ -79,4 +82,12 @@ public class NewSynchTaskReq implements Serializable { ...@@ -79,4 +82,12 @@ public class NewSynchTaskReq implements Serializable {
public void setParentId(String parentId) { public void setParentId(String parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
public String getSyncMode() {
return syncMode;
}
public void setSyncMode(String syncMode) {
this.syncMode = syncMode;
}
} }
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
"sourceCsvDelimiter": "", //分隔符 "sourceCsvDelimiter": "", //分隔符
"sourceCsvCharset": "", //字符集编码 "sourceCsvCharset": "", //字符集编码
"sourceCsvHeader": "", //是否含有表头 "sourceCsvHeader": "", //是否含有表头
"null值":"", "nullValue":"", //null值
"compressedFormat":"", //压缩格式 "compressedFormat":"", //压缩格式
"sourceFtpFile": "", //Ftp文件名 "sourceFtpFile": "", //Ftp文件名
"sourceSkipFtpFile": "", //没有数据文件是否跳过 "sourceSkipFtpFile": "", //没有数据文件是否跳过
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
"targetCsvCharset": "",//字符集编码 "targetCsvCharset": "",//字符集编码
"fileType": "", //文件类型 "fileType": "", //文件类型
"datatimeFormat":"",//时间格式 "datatimeFormat":"",//时间格式
"null":"",//表示有null值得字符串 "nullValue":"",//表示有null值得字符串
"prefixConflict":"",//前缀冲突 "prefixConflict":"",//前缀冲突
"markCompletionFile":"",//标记完成文件 "markCompletionFile":"",//标记完成文件
"targetCsvHeader": "", "targetCsvHeader": "",
...@@ -208,12 +208,13 @@ ...@@ -208,12 +208,13 @@
} }
] ]
}, },
//字段映射关系
"mappingRelation":[ "mappingRelation":[
{ {
"sourceFieldId":"", "sourceFieldId":"", //源字段id
"sourceField":"", "sourceField":"", //源字段
"targetFieldId":"", "targetFieldId":"", //目标字段id
"targetField":"" "targetField":"" //目标字段
} }
] ]
}, },
......
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