Unverified Commit d00627ff authored by GabrielWithTina's avatar GabrielWithTina Committed by GitHub
Browse files

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.
parent 1c153454
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
+3 −0
Original line number Diff line number Diff line
@@ -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());