Commit b2cda752 authored by 黎博's avatar 黎博

优化/pipeliine/modify接口

parent def3710f
...@@ -132,12 +132,19 @@ public class PipelineController { ...@@ -132,12 +132,19 @@ public class PipelineController {
for (Pipeline pipeline: pipelineList) { for (Pipeline pipeline: pipelineList) {
if (pipelineDb.getId().equals(pipeline.getId())) { if (pipelineDb.getId().equals(pipeline.getId())) {
flag = true; flag = true;
break;
} }
} }
if (!flag) { if (!flag) {
pipelineService.removeById(pipelineDb.getId()); pipelineService.removeById(pipelineDb.getId());
} }
} }
// 判断是否有新增的
for (Pipeline pipeline: pipelineList) {
if (pipeline.getId() == null) {
pipeline.setDingRobotId(dingRobotId);
}
}
// 剩下的直接更新 // 剩下的直接更新
return JsonResult.buildSuccessResult(pipelineService.saveOrUpdateBatch(pipelineList)); return JsonResult.buildSuccessResult(pipelineService.saveOrUpdateBatch(pipelineList));
} }
......
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