diff --git a/backend/src/main/java/io/metersphere/api/dto/QueryAPITestRequest.java b/backend/src/main/java/io/metersphere/api/dto/QueryAPITestRequest.java index 88bbd2b3f8..9c7daa2fdb 100644 --- a/backend/src/main/java/io/metersphere/api/dto/QueryAPITestRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/QueryAPITestRequest.java @@ -1,8 +1,12 @@ package io.metersphere.api.dto; +import io.metersphere.controller.request.OrderRequest; import lombok.Getter; import lombok.Setter; +import java.util.List; +import java.util.Map; + @Getter @Setter public class QueryAPITestRequest { @@ -12,5 +16,7 @@ public class QueryAPITestRequest { private String name; private String workspaceId; private boolean recent = false; - + private List orders; + private Map> filters; + } diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java index 561c80052a..1a38cb0cc2 100644 --- a/backend/src/main/java/io/metersphere/api/service/APITestService.java +++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java @@ -134,7 +134,6 @@ public class APITestService { apiTestMapper.updateByPrimaryKeySelective(test); return test; } - private ApiTestWithBLOBs createTest(SaveAPITestRequest request) { ApiTestExample example = new ApiTestExample(); example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml index 895d082944..aa8b013b5b 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml @@ -26,8 +26,23 @@ AND api_test.id = #{request.id} + + + + and api_test.${key} in + + #{value} + + + + - order by api_test.update_time desc + + order by + + api_test.${order.name} ${order.type} + +