haydenzhourepo commented on a change in pull request #5422:
URL: https://github.com/apache/dolphinscheduler/pull/5422#discussion_r628125328



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
##########
@@ -96,147 +95,137 @@
     /**
      * create process definition
      *
-     * @param loginUser   login user
      * @param projectName project name
-     * @param name        process definition name
-     * @param json        process definition json
+     * @param name process definition name
+     * @param json process definition json
      * @param description description
-     * @param locations   locations for nodes
-     * @param connects    connects for nodes
+     * @param locations locations for nodes
+     * @param connects connects for nodes
      * @return create result code
      */
     @ApiOperation(value = "save", notes = "CREATE_PROCESS_DEFINITION_NOTES")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", 
required = true, type = "String"),
-        @ApiImplicitParam(name = "processDefinitionJson", value = 
"PROCESS_DEFINITION_JSON", required = true, type = "String"),
-        @ApiImplicitParam(name = "locations", value = 
"PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"),
-        @ApiImplicitParam(name = "connects", value = 
"PROCESS_DEFINITION_CONNECTS", required = true, type = "String"),
-        @ApiImplicitParam(name = "description", value = 
"PROCESS_DEFINITION_DESC", required = false, type = "String"),
+            @ApiImplicitParam(name = "name", value = 
"PROCESS_DEFINITION_NAME", required = true, type = "String"),
+            @ApiImplicitParam(name = "processDefinitionJson", value = 
"PROCESS_DEFINITION_JSON", required = true, type = "String"),
+            @ApiImplicitParam(name = "locations", value = 
"PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"),
+            @ApiImplicitParam(name = "connects", value = 
"PROCESS_DEFINITION_CONNECTS", required = true, type = "String"),
+            @ApiImplicitParam(name = "description", value = 
"PROCESS_DEFINITION_DESC", required = false, type = "String"),
     })
     @PostMapping(value = "/save")
     @ResponseStatus(HttpStatus.CREATED)
     @ApiException(CREATE_PROCESS_DEFINITION)
-    @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
-    public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
-                                          @ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
+    @AccessLogAnnotation()
+    public Result createProcessDefinition(@ApiParam(name = "projectName", 
value = "PROJECT_NAME", required = true) @PathVariable String projectName,
                                           @RequestParam(value = "name", 
required = true) String name,
                                           @RequestParam(value = 
"processDefinitionJson", required = true) String json,
                                           @RequestParam(value = "locations", 
required = true) String locations,
                                           @RequestParam(value = "connects", 
required = true) String connects,
                                           @RequestParam(value = "description", 
required = false) String description) throws JsonProcessingException {
 
-        Map<String, Object> result = 
processDefinitionService.createProcessDefinition(loginUser, projectName, name, 
json,
-            description, locations, connects);
+        Map<String, Object> result = 
processDefinitionService.createProcessDefinition(AuthUtils.getAuthUser(), 
projectName, name, json,
+                description, locations, connects);
         return returnDataList(result);
     }
 
     /**
      * copy  process definition
      *
-     * @param loginUser            login user
-     * @param projectName          project name
+     * @param projectName project name
      * @param processDefinitionIds process definition ids
-     * @param targetProjectId      target project id
+     * @param targetProjectId target project id
      * @return copy result code
      */
     @ApiOperation(value = "copyProcessDefinition", notes = 
"COPY_PROCESS_DEFINITION_NOTES")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "processDefinitionIds", value = 
"PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = 
"3,4"),
-        @ApiImplicitParam(name = "targetProjectId", value = 
"TARGET_PROJECT_ID", required = true, dataType = "Int", example = "10")
+            @ApiImplicitParam(name = "processDefinitionIds", value = 
"PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = 
"3,4"),

Review comment:
       almost all controller file use 8 indent before @ApiImplicitParam 
annotation except this Controller, I just unify the format. 




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


Reply via email to