RedemptionC commented on a change in pull request #3184:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/3184#discussion_r453194020
##########
File path:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
##########
@@ -37,6 +37,16 @@
order by id asc
</select>
+ <select id="queryTopNProcessInstance"
resultType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
+ select *
+ from t_ds_process_instance
+ where state = 7
+ and start_time between
+ #{startTime} and #{endTime}
+ order by end_time-start_time desc
+ limit #{size}
+ </select>
Review comment:
I still have a question about the first previous question: since Java
doesn't have default params,when I want to set SUCCESS as the default status,I
might overload the method like this:
` List<ProcessInstance> queryTopNProcessInstance(@Param("size") int size,
@Param("startTime") Date
startTime,
@Param("endTime") Date
endTime);`
` List<ProcessInstance> queryTopNProcessInstance(@Param("size") int size,
@Param("startTime") Date
startTime,
@Param("endTime") Date
endTime,
@Param("status")ExecutionStatus status);`
but since there is no method body here,how do I set SUCCESS as the default
status?
I am not so familiar with Java,I hope you can give me some advice
----------------------------------------------------------------
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]