From 5573b9fd61db2bb4380bf3c5a8a237d6475d6abc Mon Sep 17 00:00:00 2001 From: wenyann Date: Mon, 31 May 2021 13:13:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95-?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89=EF=BC=8C?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E7=AD=9B=E9=80=89=E5=BD=93=E5=89=8D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/ApiDefinitionService.java | 15 +- .../base/domain/ApiDefinition.java | 6 + .../base/domain/ApiDefinitionExample.java | 210 ++++++++++++++++ .../base/mapper/ApiDefinitionMapper.xml | 227 +++++++++++------- .../mapper/ext/ExtApiDefinitionMapper.xml | 6 + .../db/migration/V86__v1.10.1_release.sql | 9 +- .../src/main/resources/generatorConfig.xml | 2 + .../definition/components/list/ApiList.vue | 3 + frontend/src/common/js/tableUtils.js | 4 +- 9 files changed, 378 insertions(+), 104 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 99a4544b0e..51a5a441e3 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -113,19 +113,6 @@ public class ApiDefinitionService { request = this.initRequest(request, true, true); List resList = extApiDefinitionMapper.list(request); calculateResult(resList, request.getProjectId()); - ApiDefinitionRequest finalRequest = request; - /* List resListFilters = new ArrayList<>(); - if (finalRequest.getFilters().size() > 1) { - if (null != finalRequest.getFilters().get("case_status")) { - resListFilters = resList.stream() - .filter((ApiDefinitionResult b) -> finalRequest.getFilters().get("case_status").contains(b.getCaseStatus())) - .collect(Collectors.toList()); - return resListFilters; - } - - }*/ - - return resList; } @@ -884,6 +871,7 @@ public class ApiDefinitionService { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); List resList = extApiDefinitionMapper.listRelevanceReview(request); calculateResult(resList, request.getProjectId()); + resList = extApiDefinitionMapper.list(request); return resList; } @@ -911,6 +899,7 @@ public class ApiDefinitionService { res.setCaseStatus("-"); } + apiDefinitionMapper.updateByPrimaryKey(res); if (StringUtils.equalsIgnoreCase("esb", res.getMethod())) { esbApiParamService.handleApiEsbParams(res); } diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java index 38f6fb8db1..6530c1b583 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiDefinition.java @@ -41,5 +41,11 @@ public class ApiDefinition implements Serializable { private String createUser; + private String caseTotal; + + private String caseStatus; + + private String casePassingRate; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java index f6508faa46..14e8362e73 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiDefinitionExample.java @@ -1333,6 +1333,216 @@ public class ApiDefinitionExample { addCriterion("create_user not between", value1, value2, "createUser"); return (Criteria) this; } + + public Criteria andCaseTotalIsNull() { + addCriterion("case_total is null"); + return (Criteria) this; + } + + public Criteria andCaseTotalIsNotNull() { + addCriterion("case_total is not null"); + return (Criteria) this; + } + + public Criteria andCaseTotalEqualTo(String value) { + addCriterion("case_total =", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalNotEqualTo(String value) { + addCriterion("case_total <>", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalGreaterThan(String value) { + addCriterion("case_total >", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalGreaterThanOrEqualTo(String value) { + addCriterion("case_total >=", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalLessThan(String value) { + addCriterion("case_total <", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalLessThanOrEqualTo(String value) { + addCriterion("case_total <=", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalLike(String value) { + addCriterion("case_total like", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalNotLike(String value) { + addCriterion("case_total not like", value, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalIn(List values) { + addCriterion("case_total in", values, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalNotIn(List values) { + addCriterion("case_total not in", values, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalBetween(String value1, String value2) { + addCriterion("case_total between", value1, value2, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseTotalNotBetween(String value1, String value2) { + addCriterion("case_total not between", value1, value2, "caseTotal"); + return (Criteria) this; + } + + public Criteria andCaseStatusIsNull() { + addCriterion("case_status is null"); + return (Criteria) this; + } + + public Criteria andCaseStatusIsNotNull() { + addCriterion("case_status is not null"); + return (Criteria) this; + } + + public Criteria andCaseStatusEqualTo(String value) { + addCriterion("case_status =", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusNotEqualTo(String value) { + addCriterion("case_status <>", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusGreaterThan(String value) { + addCriterion("case_status >", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusGreaterThanOrEqualTo(String value) { + addCriterion("case_status >=", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusLessThan(String value) { + addCriterion("case_status <", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusLessThanOrEqualTo(String value) { + addCriterion("case_status <=", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusLike(String value) { + addCriterion("case_status like", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusNotLike(String value) { + addCriterion("case_status not like", value, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusIn(List values) { + addCriterion("case_status in", values, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusNotIn(List values) { + addCriterion("case_status not in", values, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusBetween(String value1, String value2) { + addCriterion("case_status between", value1, value2, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCaseStatusNotBetween(String value1, String value2) { + addCriterion("case_status not between", value1, value2, "caseStatus"); + return (Criteria) this; + } + + public Criteria andCasePassingRateIsNull() { + addCriterion("case_passing_rate is null"); + return (Criteria) this; + } + + public Criteria andCasePassingRateIsNotNull() { + addCriterion("case_passing_rate is not null"); + return (Criteria) this; + } + + public Criteria andCasePassingRateEqualTo(String value) { + addCriterion("case_passing_rate =", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateNotEqualTo(String value) { + addCriterion("case_passing_rate <>", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateGreaterThan(String value) { + addCriterion("case_passing_rate >", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateGreaterThanOrEqualTo(String value) { + addCriterion("case_passing_rate >=", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateLessThan(String value) { + addCriterion("case_passing_rate <", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateLessThanOrEqualTo(String value) { + addCriterion("case_passing_rate <=", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateLike(String value) { + addCriterion("case_passing_rate like", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateNotLike(String value) { + addCriterion("case_passing_rate not like", value, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateIn(List values) { + addCriterion("case_passing_rate in", values, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateNotIn(List values) { + addCriterion("case_passing_rate not in", values, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateBetween(String value1, String value2) { + addCriterion("case_passing_rate between", value1, value2, "casePassingRate"); + return (Criteria) this; + } + + public Criteria andCasePassingRateNotBetween(String value1, String value2) { + addCriterion("case_passing_rate not between", value1, value2, "casePassingRate"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml index f074a328c2..5a02b0fc2c 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionMapper.xml @@ -10,16 +10,19 @@ - - - - - - - - - - + + + + + + + + + + + + + @@ -87,7 +90,7 @@ id, project_id, `name`, `method`, module_path, environment_id, schedule, `status`, module_id, user_id, create_time, update_time, protocol, `path`, num, tags, original_state, - create_user + create_user, case_total, case_status, case_passing_rate description, request, response @@ -141,22 +144,22 @@ - insert into api_definition (id, project_id, `name`, - `method`, module_path, environment_id, - schedule, `status`, module_id, - user_id, create_time, update_time, - protocol, `path`, num, - tags, original_state, create_user, - description, request, response - ) - values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, - #{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, - #{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR}, - #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, - #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, - #{tags,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, - #{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR} - ) + insert into api_definition (id, project_id, `name`, + `method`, module_path, environment_id, + schedule, `status`, module_id, + user_id, create_time, update_time, + protocol, `path`, num, + tags, original_state, create_user, + case_total, case_status, case_passing_rate, + description, request, response) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, + #{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR}, + #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, + #{tags,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, + #{caseTotal,jdbcType=VARCHAR}, #{caseStatus,jdbcType=VARCHAR}, #{casePassingRate,jdbcType=VARCHAR}, + #{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}) insert into api_definition @@ -215,6 +218,15 @@ create_user, + + case_total, + + + case_status, + + + case_passing_rate, + description, @@ -280,6 +292,15 @@ #{createUser,jdbcType=VARCHAR}, + + #{caseTotal,jdbcType=VARCHAR}, + + + #{caseStatus,jdbcType=VARCHAR}, + + + #{casePassingRate,jdbcType=VARCHAR}, + #{description,jdbcType=LONGVARCHAR}, @@ -354,6 +375,15 @@ create_user = #{record.createUser,jdbcType=VARCHAR}, + + case_total = #{record.caseTotal,jdbcType=VARCHAR}, + + + case_status = #{record.caseStatus,jdbcType=VARCHAR}, + + + case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=LONGVARCHAR}, @@ -378,19 +408,22 @@ environment_id = #{record.environmentId,jdbcType=VARCHAR}, schedule = #{record.schedule,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, - module_id = #{record.moduleId,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - protocol = #{record.protocol,jdbcType=VARCHAR}, - `path` = #{record.path,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=INTEGER}, - tags = #{record.tags,jdbcType=VARCHAR}, - original_state = #{record.originalState,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=LONGVARCHAR}, - request = #{record.request,jdbcType=LONGVARCHAR}, - response = #{record.response,jdbcType=LONGVARCHAR} + module_id = #{record.moduleId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, + num = #{record.num,jdbcType=INTEGER}, + tags = #{record.tags,jdbcType=VARCHAR}, + original_state = #{record.originalState,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + case_total = #{record.caseTotal,jdbcType=VARCHAR}, + case_status = #{record.caseStatus,jdbcType=VARCHAR}, + case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=LONGVARCHAR}, + request = #{record.request,jdbcType=LONGVARCHAR}, + response = #{record.response,jdbcType=LONGVARCHAR} @@ -404,17 +437,20 @@ module_path = #{record.modulePath,jdbcType=VARCHAR}, environment_id = #{record.environmentId,jdbcType=VARCHAR}, schedule = #{record.schedule,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR}, - module_id = #{record.moduleId,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - protocol = #{record.protocol,jdbcType=VARCHAR}, - `path` = #{record.path,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=INTEGER}, - tags = #{record.tags,jdbcType=VARCHAR}, - original_state = #{record.originalState,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR} + `status` = #{record.status,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, + num = #{record.num,jdbcType=INTEGER}, + tags = #{record.tags,jdbcType=VARCHAR}, + original_state = #{record.originalState,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + case_total = #{record.caseTotal,jdbcType=VARCHAR}, + case_status = #{record.caseStatus,jdbcType=VARCHAR}, + case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR} @@ -473,6 +509,15 @@ create_user = #{createUser,jdbcType=VARCHAR}, + + case_total = #{caseTotal,jdbcType=VARCHAR}, + + + case_status = #{caseStatus,jdbcType=VARCHAR}, + + + case_passing_rate = #{casePassingRate,jdbcType=VARCHAR}, + description = #{description,jdbcType=LONGVARCHAR}, @@ -487,47 +532,53 @@ update api_definition - set project_id = #{projectId,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - `method` = #{method,jdbcType=VARCHAR}, - module_path = #{modulePath,jdbcType=VARCHAR}, - environment_id = #{environmentId,jdbcType=VARCHAR}, - schedule = #{schedule,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - module_id = #{moduleId,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - protocol = #{protocol,jdbcType=VARCHAR}, - `path` = #{path,jdbcType=VARCHAR}, - num = #{num,jdbcType=INTEGER}, - tags = #{tags,jdbcType=VARCHAR}, - original_state = #{originalState,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR}, - description = #{description,jdbcType=LONGVARCHAR}, - request = #{request,jdbcType=LONGVARCHAR}, - response = #{response,jdbcType=LONGVARCHAR} + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + module_path = #{modulePath,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + schedule = #{schedule,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + protocol = #{protocol,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, + num = #{num,jdbcType=INTEGER}, + tags = #{tags,jdbcType=VARCHAR}, + original_state = #{originalState,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + case_total = #{caseTotal,jdbcType=VARCHAR}, + case_status = #{caseStatus,jdbcType=VARCHAR}, + case_passing_rate = #{casePassingRate,jdbcType=VARCHAR}, + description = #{description,jdbcType=LONGVARCHAR}, + request = #{request,jdbcType=LONGVARCHAR}, + response = #{response,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} update api_definition - set project_id = #{projectId,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - `method` = #{method,jdbcType=VARCHAR}, - module_path = #{modulePath,jdbcType=VARCHAR}, - environment_id = #{environmentId,jdbcType=VARCHAR}, - schedule = #{schedule,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - module_id = #{moduleId,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - protocol = #{protocol,jdbcType=VARCHAR}, - `path` = #{path,jdbcType=VARCHAR}, - num = #{num,jdbcType=INTEGER}, - tags = #{tags,jdbcType=VARCHAR}, - original_state = #{originalState,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR} + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + module_path = #{modulePath,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + schedule = #{schedule,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + protocol = #{protocol,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, + num = #{num,jdbcType=INTEGER}, + tags = #{tags,jdbcType=VARCHAR}, + original_state = #{originalState,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + case_total = #{caseTotal,jdbcType=VARCHAR}, + case_status = #{caseStatus,jdbcType=VARCHAR}, + case_passing_rate = #{casePassingRate,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file 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 bdda804945..9d8fdae9a8 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 @@ -515,6 +515,12 @@ #{value} + + and api_definition.case_status in + + #{value} + + diff --git a/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql b/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql index 73e1d195e0..23e6d823b2 100644 --- a/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql +++ b/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql @@ -71,4 +71,11 @@ values ('test_case_list', '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"createUser","label":"创建人"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"}]'); insert into system_header (type, props) values ('test_plan_scenario_case', - '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); \ No newline at end of file + '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); +-- 接口定义添加用例总数,用例状态,用例通过率字段 +alter table api_definition + add case_total varchar(100) null; +alter table api_definition + add case_status varchar(100) null; +alter table api_definition + add case_passing_rate varchar(100) null; \ No newline at end of file diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index 448328dd2a..911df343ff 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -78,7 +78,9 @@
--> + diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index a2790b7c2f..a118a831c0 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -128,6 +128,7 @@ diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index 5b8d90c97b..83d727bd0f 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -138,9 +138,9 @@ export function _sort(column, condition) { hasProp = true; } }); - if (column.prop === 'case_passing_rate' || column.prop === 'case_total') { + /* if (column.prop === 'case_passing_rate' || column.prop === 'case_total') { hasProp = true; - } + }*/ if (!hasProp) { condition.orders.push({name: column.prop, type: column.order}); }