zhuangchong commented on code in PR #14178:
URL:
https://github.com/apache/dolphinscheduler/pull/14178#discussion_r1203224133
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java:
##########
@@ -250,7 +250,7 @@ public Result offlineSchedule(@Parameter(hidden = true)
@RequestAttribute(value
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryScheduleListPaging(@Parameter(hidden = true)
@RequestAttribute(value = SESSION_USER) User loginUser,
@Parameter(name = "projectCode",
description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @RequestParam long
processDefinitionCode,
+ @RequestParam(value =
"processDefinitionCode", required = false, defaultValue = "0") long
processDefinitionCode,
Review Comment:
It is recommended to use `Long`
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:
##########
@@ -568,16 +568,20 @@ public Result querySchedule(User loginUser, long
projectCode, long processDefine
return result;
}
- ProcessDefinition processDefinition =
processDefinitionMapper.queryByCode(processDefineCode);
- if (processDefinition == null || projectCode !=
processDefinition.getProjectCode()) {
- log.error("Process definition does not exist,
processDefinitionCode:{}.", processDefineCode);
- putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST,
String.valueOf(processDefineCode));
- return result;
+ if (processDefineCode != 0) {
Review Comment:
if (processDefineCode != null) { ...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]