SbloodyS commented on code in PR #12034:
URL: https://github.com/apache/dolphinscheduler/pull/12034#discussion_r973822326


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProjectMapper.xml:
##########
@@ -180,4 +180,10 @@
             union select id as project_id  from t_ds_project where 
user_id=#{userId})
         </if>
     </select>
+
+    <select id="queryAllProjectForDependent" 
resultType="org.apache.dolphinscheduler.dao.entity.Project">
+        select
+        <include refid="baseSql"/>
+        from t_ds_project

Review Comment:
   It is recommended to query only the required fields, such as name and code.



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectV2Controller.java:
##########
@@ -288,4 +288,23 @@ public ProjectListResponse queryAllProjectList(@ApiIgnore 
@RequestAttribute(valu
         Result result = projectService.queryAllProjectList(loginUser);
         return new ProjectListResponse(result);
     }
+
+    /**
+     * query all project list for dependent
+     *
+     * @param loginUser login user
+     * @return all project list
+     */
+    @ApiOperation(value = "queryAllProjectListForDependent", notes = 
"QUERY_ALL_PROJECT_LIST_FOR_DEPENDENT_NOTES")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", 
dataTypeClass = Object.class, example = "\"{id:100}\"", required = true)
+    })
+    @GetMapping(value = "/list-dependent")
+    @ResponseStatus(HttpStatus.OK)
+    @ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
+    @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+    public Result queryAllProjectListForDependent(@ApiIgnore 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser) {

Review Comment:
   ```suggestion
       public ProjectListResponse queryAllProjectListForDependent(@ApiIgnore 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
   ```



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