diff --git a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java index 97f09dc255..9f62a599be 100644 --- a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java +++ b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.java @@ -21,6 +21,8 @@ public interface ExtApiDefinitionExecResultMapper { ApiDefinitionExecResultWithBLOBs selectMaxResultByResourceId(String resourceId); + String selectMaxResultIdByResourceId(String resourceId); + ApiDefinitionExecResultWithBLOBs selectMaxResultByResourceIdAndType(String resourceId, String type); long countByProjectIDAndCreateInThisWeek(@Param("projectId") String projectId, @Param("version") String version, @Param("firstDayTimestamp") long firstDayTimestamp, @Param("lastDayTimestamp") long lastDayTimestamp); diff --git a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml index 2098f279d3..6f43f9848e 100644 --- a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml +++ b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -12,7 +12,16 @@ select * from api_definition_exec_result where resource_id = #{resourceId,jdbcType=VARCHAR} - ORDER BY create_time DESC LIMIT 1 + ORDER BY create_time DESC + LIMIT 1 + +