Browse Source

fix bug, update action would change the user of definition.

pull/1/head
baoliang 6 years ago
parent
commit
94ea607f06
  1. 2
      escheduler-api/src/main/java/cn/escheduler/api/controller/ProcessDefinitionController.java
  2. 5
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java

2
escheduler-api/src/main/java/cn/escheduler/api/controller/ProcessDefinitionController.java

@ -127,7 +127,7 @@ public class ProcessDefinitionController extends BaseController{
logger.info("login user {}, update process define, project name: {}, process define name: {}, " +
"process_definition_json: {}, desc: {}, locations:{}, connects:{}",
loginUser.getUserName(), projectName, name, processDefinitionJson,desc, locations, connects);
Map<String, Object> result = processDefinitionService.updateProccessDefinition(loginUser, projectName, id, name,
Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectName, id, name,
processDefinitionJson, desc, locations, connects);
return returnDataList(result);
}catch (Exception e){

5
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java

@ -247,9 +247,9 @@ public class ProcessDefinitionService extends BaseDAGService {
* @param connects
* @return
*/
public Map<String, Object> updateProccessDefinition(User loginUser, String projectName, int id, String name,
public Map<String, Object> updateProcessDefinition(User loginUser, String projectName, int id, String name,
String processDefinitionJson, String desc,
String locations, String connects) throws JsonProcessingException {
String locations, String connects) {
Map<String, Object> result = new HashMap<>(5);
Project project = projectMapper.queryByName(projectName);
@ -284,7 +284,6 @@ public class ProcessDefinitionService extends BaseDAGService {
processDefine.setName(name);
processDefine.setReleaseState(ReleaseState.OFFLINE);
processDefine.setProjectId(project.getId());
processDefine.setUserId(loginUser.getId());
processDefine.setProcessDefinitionJson(processDefinitionJson);
processDefine.setDesc(desc);
processDefine.setLocations(locations);

Loading…
Cancel
Save