未验证 提交 d00627ff 编写于 作者: G GabrielWithTina 提交者: GitHub

Return ProcessDefinition ID when call ProcessController.createProject. (#2849)

Return Scheduler ID when call SchedulerController.createScheduler.

client need the created object ID to bind the relationship between client system and Dolphinscheduler system.
上级 1c153454
......@@ -159,6 +159,9 @@ public class ProcessDefinitionService extends BaseDAGService {
processDefine.setUpdateTime(now);
processDefine.setFlag(Flag.YES);
processDefineMapper.insert(processDefine);
// return processDefinition object with ID
result.put(Constants.DATA_LIST, processDefineMapper.selectById(processDefine.getId()));
putMsg(result, Status.SUCCESS);
result.put("processDefinitionId",processDefine.getId());
return result;
......
......@@ -165,6 +165,9 @@ public class SchedulerService extends BaseService {
processDefinition.setReceivers(receivers);
processDefinition.setReceiversCc(receiversCc);
processDefinitionMapper.updateById(processDefinition);
// return scheduler object with ID
result.put(Constants.DATA_LIST, scheduleMapper.selectById(scheduleObj.getId()));
putMsg(result, Status.SUCCESS);
result.put("scheduleId", scheduleObj.getId());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册