From 6e3d551a01a1e60da866ad64770e6af6071f25b3 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Tue, 2 Jun 2020 15:33:52 +0800 Subject: [PATCH] '' --- .../api/dto/QueryAPITestRequest.java | 8 +++++++- .../metersphere/api/service/APITestService.java | 1 - .../base/mapper/ext/ExtApiTestMapper.xml | 17 ++++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) 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} + +