limaiwang commented on code in PR #11743:
URL: https://github.com/apache/dolphinscheduler/pull/11743#discussion_r965413424


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProjectMapper.xml:
##########
@@ -169,6 +169,13 @@
         <if test="userId != 0">
             right join t_ds_relation_project_user rpu on p.id = rpu.project_id
             where rpu.user_id = #{userId}
+            union
+            select
+            <include refid="baseSqlV2">
+                <property name="alias" value="p2"/>
+            </include>
+            from t_ds_project p2
+            where p2.user_id = #{userId}

Review Comment:
   > I think we should refactor the api used by the dependent node instead of 
using union all. cc @caishunfeng @zhongjiajie @EricGao888 @ruanwenjun
   Hi @SbloodyS  Is your idea to get all the projects in two api's? One to get 
the projects authorized by the user and one to get the projects created by the 
user itself. when processing the dependent module to display all the projects, 
we need to find out the data in both api's and then process them to display
   
   



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