From a00334acf394915c98ff3538c40543cc36fbbe9a Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 11 Jan 2021 11:38:24 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=97=B6=E8=B6=8A=E6=9D=83?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #1089 --- .../main/java/io/metersphere/controller/UserController.java | 3 +++ backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java index 0548ee872f..7b7da40432 100644 --- a/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/backend/src/main/java/io/metersphere/controller/UserController.java @@ -168,6 +168,9 @@ public class UserController { @GetMapping("/info/{userId}") public UserDTO getUserInfo(@PathVariable(value = "userId") String userId) { + if (!StringUtils.equals(userId, SessionUtils.getUserId())) { + MSException.throwException(Translator.get("not_authorized")); + } return userService.getUserInfo(userId); } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 9f4a9bbf46..068127ce59 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 9f4a9bbf46fc1333dbcccea21f83e27e3ec10b1f +Subproject commit 068127ce59ea8b016434ed52a9de4a7a4b13bdb4 diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 010ad7a5f0..7d43154a7c 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433 +Subproject commit 7d43154a7c19732407a8e9ace8a7d1ea13c91f36 From 489b2b8f109a7a1f0a8e85e739d9a6cc649d5949 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 11 Jan 2021 13:46:56 +0800 Subject: [PATCH 2/8] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E9=AB=98=E7=BA=A7=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/definition/ApiTestCaseRequest.java | 1 + .../mapper/ext/ExtApiDefinitionMapper.xml | 19 + .../base/mapper/ext/ExtApiTestCaseMapper.xml | 59 ++ .../components/case/ApiCaseHeader.vue | 44 +- .../components/case/ApiCaseItem.vue | 2 +- .../components/case/ApiCaseList.vue | 389 ++++---- .../definition/components/list/ApiList.vue | 867 +++++++++--------- .../api/definition/model/JsonData.js | 9 + .../components/search/MsTableAdvSearchBar.vue | 6 +- .../components/search/search-components.js | 105 ++- frontend/src/i18n/en-US.js | 6 + frontend/src/i18n/zh-CN.js | 6 + frontend/src/i18n/zh-TW.js | 6 + 13 files changed, 881 insertions(+), 638 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java index d9028e23f2..c1ae7c9c5b 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java @@ -24,6 +24,7 @@ public class ApiTestCaseRequest { private List moduleIds; private List orders; private Map> filters; + private Map combine; private boolean isSelectThisWeedData; private long createTime = 0; } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml index c667ce9865..a73738cafe 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -147,6 +147,25 @@ + + and api_definition.path + + + + + + and api_definition.method + + + + + + and api_definition.tags + + + + + diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index 5423d5be55..49b6655d76 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -144,7 +144,51 @@ + + + and atc.name + + + + + + and atc.update_time + + + + + + and atc.create_time + + + + + + and atc.priority + + + + + + and atc.user_id + + + + + + and atc.tags + + + + + + and ader.status + + + + + select api_scenario.id, api_scenario.project_id, api_scenario.tags, api_scenario.user_id, api_scenario.num, api_scenario.api_scenario_module_id,api_scenario.module_path, api_scenario.name, api_scenario.level, @@ -19,6 +106,13 @@ left join project on api_scenario.project_id = project.id left join user on api_scenario.user_id = user.id + + + + + + + and api_scenario.name like CONCAT('%', #{request.name},'%') diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index 49b6655d76..7471e449ca 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -259,14 +259,14 @@ diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 9b49b62998..66bd39b490 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -3,7 +3,7 @@ + :page-size="pageSize" + :total="total" + @selectPageAll="isSelectDataAll(false)" + @selectAll="isSelectDataAll(true)"/> diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue index a01146c305..71ba30950a 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue @@ -3,6 +3,7 @@ + {{$t('commons.adv_search.title')}} @@ -89,480 +90,484 @@ + + +