CalvinKirs commented on a change in pull request #4928:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4928#discussion_r586027682



##########
File path: 
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.xml
##########
@@ -137,17 +138,28 @@
         AND pd.id = #{processDefineId}
     </select>
 
-
     <select id="listResources" resultType="java.util.HashMap">
-        SELECT id,resource_ids
-        FROM t_ds_process_definition
-        WHERE release_state = 1 and resource_ids is not null and resource_ids 
!= ''
+        SELECT distinct pd.code,td.resource_ids
+        FROM t_ds_process_task_relation ptr
+        join t_ds_process_definition pd
+            on ptr.process_definition_code=pd.code and 
ptr.process_definition_version = pd.version
+                and ptr.project_code=pd.project_code and  pd.release_state = 1

Review comment:
       It's best to avoid magic numbers




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