caishunfeng commented on code in PR #11617:
URL: https://github.com/apache/dolphinscheduler/pull/11617#discussion_r953378462


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java:
##########
@@ -194,11 +194,13 @@ Map<String, Object> updateProcessDefinition(User 
loginUser,
      * @param loginUser login user
      * @param projectCode project code
      * @param name name
+     * @param code code
      * @return true if process definition name not exists, otherwise false
      */
     Map<String, Object> verifyProcessDefinitionName(User loginUser,
                                                     long projectCode,
-                                                    String name);
+                                                    String name,
+                                                    long code);

Review Comment:
   ```suggestion
                                                       Long 
processDefinitionCode);
   ```



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java:
##########
@@ -202,16 +202,18 @@ public Result moveProcessDefinition(@ApiIgnore 
@RequestAttribute(value = Constan
      */
     @ApiOperation(value = "verify-name", notes = 
"VERIFY_PROCESS_DEFINITION_NAME_NOTES")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = 
"PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class)
+            @ApiImplicitParam(name = "name", value = 
"PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+            @ApiImplicitParam(name = "code", value = 
"PROCESS_DEFINITION_CODE", required = false, dataTypeClass = Long.class),
     })
     @GetMapping(value = "/verify-name")
     @ResponseStatus(HttpStatus.OK)
     @ApiException(VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR)
     @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
     public Result verifyProcessDefinitionName(@ApiIgnore 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                               @ApiParam(name = "projectCode", 
value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
-                                              @RequestParam(value = "name", 
required = true) String name) {
-        Map<String, Object> result = 
processDefinitionService.verifyProcessDefinitionName(loginUser, projectCode, 
name);
+                                              @RequestParam(value = "name", 
required = true) String name,
+                                              @RequestParam(value = "code", 
required = false, defaultValue = "0") long code) {

Review Comment:
   ```suggestion
                                                 @RequestParam(value = "code", 
required = false) Long code) {
   ```



-- 
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]

Reply via email to