|
|
@@ -34,14 +34,16 @@ public interface PipelineHistoryMapper {
|
|
|
*/
|
|
|
@Select("<script>" +
|
|
|
"SELECT * " +
|
|
|
- " FROM pipeline_history " +
|
|
|
- " WHERE start_time = " +
|
|
|
- "( SELECT MAX(start_time) " +
|
|
|
- " FROM pipeline_history" +
|
|
|
- " WHERE pipeline_id in" +
|
|
|
+ " FROM pipeline_history, " +
|
|
|
+ "( SELECT pipeline_id, MAX(start_time) start_time" +
|
|
|
+ " FROM pipeline_history " +
|
|
|
+ " WHERE pipeline_id in " +
|
|
|
" <foreach collection='pipelineIds' open='(' item='pipelineId' separator=',' close=')'> #{pipelineId}</foreach>" +
|
|
|
- " )" +
|
|
|
+ " GROUP BY pipeline_id " +
|
|
|
+ ") histories " +
|
|
|
+ " WHERE histories.pipeline_id = pipeline_history.pipeline_id " +
|
|
|
+ " AND histories.start_time = pipeline_history.start_time " +
|
|
|
"</script>")
|
|
|
- List<PipelineHistoryPO> selectPipelinesRecentlyHistory(@Param("pipelineIds") List<Integer> pipelineIds);
|
|
|
+ List<PipelineHistoryPO> selectPipelinesLatestHistories(@Param("pipelineIds") List<Integer> pipelineIds);
|
|
|
|
|
|
}
|