CalvinKirs commented on a change in pull request #5390:
URL: https://github.com/apache/dolphinscheduler/pull/5390#discussion_r630928212
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -502,72 +491,69 @@ public Result viewTree(@ApiIgnore @RequestAttribute(value
= Constants.SESSION_US
@ApiParam(name = "projectName", value =
"PROJECT_NAME", required = true) @PathVariable String projectName,
@RequestParam("processId") Integer id,
@RequestParam("limit") Integer limit) throws
Exception {
-
Map<String, Object> result = processDefinitionService.viewTree(id,
limit);
return returnDataList(result);
}
/**
- * get tasks list by process definition id
+ * get tasks list by process definition code
*
- * @param loginUser login user
- * @param projectName project name
- * @param processDefinitionId process definition id
+ * @param loginUser login user
+ * @param projectName project name
+ * @param processDefinitionCode process definition code
* @return task list
*/
- @ApiOperation(value = "getNodeListByDefinitionId", notes =
"GET_NODE_LIST_BY_DEFINITION_ID_NOTES")
+ @ApiOperation(value = "getNodeListByDefinitionCode", notes =
"GET_NODE_LIST_BY_DEFINITION_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionId", value =
"PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processDefinitionCode", value =
"PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100")
})
@GetMapping(value = "gen-task-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR)
- @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result getNodeListByDefinitionId(
- @ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User
loginUser,
- @ApiParam(name = "projectName", value = "PROJECT_NAME", required =
true) @PathVariable String projectName,
- @RequestParam("processDefinitionId") Integer processDefinitionId)
throws Exception {
-
- Map<String, Object> result =
processDefinitionService.getTaskNodeListByDefinitionId(processDefinitionId);
+ public Result getNodeListByDefinitionCode(
+ @ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User
loginUser,
+ @ApiParam(name = "projectName", value = "PROJECT_NAME", required =
true) @PathVariable String projectName,
+ @RequestParam("processDefinitionCode") Long processDefinitionCode)
throws Exception {
+ logger.info("query task node name list by definitionCode, login
user:{}, project name:{}, code : {}",
+ loginUser.getUserName(), projectName, processDefinitionCode);
Review comment:
It's best to be consistent with dev
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]