ruanwenjun commented on a change in pull request #5651:
URL: https://github.com/apache/dolphinscheduler/pull/5651#discussion_r664182675



##########
File path: 
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml
##########
@@ -76,6 +78,18 @@
         order by d.update_time desc
     </select>
 
+    <select id="queryResourceByResourceId" 
resultType="org.apache.dolphinscheduler.dao.entity.Resource">
+        select
+        <include refid="baseSqlV2">
+            <property name="alias" value="d"/>
+        </include>
+        , u.user_name as user_name
+        from t_ds_resources d
+        join t_ds_user u on d.user_id = u.id
+        where d.id = #{id}
+        order by d.update_time desc

Review comment:
       Do we need `order by` here ?

##########
File path: 
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml
##########
@@ -76,6 +78,18 @@
         order by d.update_time desc
     </select>
 
+    <select id="queryResourceByResourceId" 
resultType="org.apache.dolphinscheduler.dao.entity.Resource">
+        select
+        <include refid="baseSqlV2">
+            <property name="alias" value="d"/>
+        </include>
+        , u.user_name as user_name
+        from t_ds_resources d
+        join t_ds_user u on d.user_id = u.id
+        where d.id = #{id}
+        order by d.update_time desc

Review comment:
       Do we need `order by` here ?
   And the method name seems easy to make confusion with `queryById`.




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