From 38eaefc5daacbd702f8893a1e6ce89ea547d5bfa Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 17 Jan 2022 19:03:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=97=B6=E5=88=A0=E9=99=A4=E7=9B=B8=E5=85=B3=E8=B5=84?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/domain/ApiScenarioReport.java | 8 ++- .../base/domain/ApiScenarioReportExample.java | 70 +++++++++++++++++++ .../base/mapper/ApiScenarioReportMapper.xml | 32 +++++++-- backend/src/main/java/io/metersphere/xpack | 2 +- .../src/main/resources/generatorConfig.xml | 2 +- frontend/src/business/components/xpack | 2 +- frontend/src/i18n/en-US.js | 2 +- frontend/src/i18n/zh-CN.js | 2 +- frontend/src/i18n/zh-TW.js | 2 +- 9 files changed, 106 insertions(+), 16 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java index 3b6ee7e545..e161cd61f9 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReport.java @@ -32,11 +32,13 @@ public class ApiScenarioReport implements Serializable { private String actuator; - private String description; + private Long endTime; private Integer reportVersion; - private Long endTime; + private String versionId; + + private String description; private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportExample.java b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportExample.java index 5d8c3a403d..8941095bef 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiScenarioReportExample.java @@ -1113,6 +1113,76 @@ public class ApiScenarioReportExample { addCriterion("report_version not between", value1, value2, "reportVersion"); return (Criteria) this; } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(String value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(String value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(String value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(String value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(String value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(String value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLike(String value) { + addCriterion("version_id like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotLike(String value) { + addCriterion("version_id not like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(String value1, String value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(String value1, String value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiScenarioReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiScenarioReportMapper.xml index 21986d621f..280b30d2f8 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiScenarioReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiScenarioReportMapper.xml @@ -17,6 +17,7 @@ + @@ -81,7 +82,8 @@ id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode, - execute_type, scenario_name, scenario_id, create_user, actuator, end_time, report_version + execute_type, scenario_name, scenario_id, create_user, actuator, end_time, report_version, + version_id description @@ -135,18 +137,18 @@ - insert into api_scenario_report (id, project_id, `name`, + INSERT INTO api_scenario_report (id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode, execute_type, scenario_name, scenario_id, create_user, actuator, end_time, report_version, - description) - values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + version_id, description) + VALUES (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{executeType,jdbcType=VARCHAR}, #{scenarioName,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{actuator,jdbcType=VARCHAR}, #{endTime,jdbcType=BIGINT}, #{reportVersion,jdbcType=INTEGER}, - #{description,jdbcType=LONGVARCHAR}) + #{versionId,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}) insert into api_scenario_report @@ -196,6 +198,9 @@ report_version, + + version_id, + description, @@ -246,6 +251,9 @@ #{reportVersion,jdbcType=INTEGER}, + + #{versionId,jdbcType=VARCHAR}, + #{description,jdbcType=LONGVARCHAR}, @@ -305,6 +313,9 @@ report_version = #{record.reportVersion,jdbcType=INTEGER}, + + version_id = #{record.versionId,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=LONGVARCHAR}, @@ -330,6 +341,7 @@ actuator = #{record.actuator,jdbcType=VARCHAR}, end_time = #{record.endTime,jdbcType=BIGINT}, report_version = #{record.reportVersion,jdbcType=INTEGER}, + version_id = #{record.versionId,jdbcType=VARCHAR}, description = #{record.description,jdbcType=LONGVARCHAR} @@ -351,7 +363,8 @@ create_user = #{record.createUser,jdbcType=VARCHAR}, actuator = #{record.actuator,jdbcType=VARCHAR}, end_time = #{record.endTime,jdbcType=BIGINT}, - report_version = #{record.reportVersion,jdbcType=INTEGER} + report_version = #{record.reportVersion,jdbcType=INTEGER}, + version_id = #{record.versionId,jdbcType=VARCHAR} @@ -401,6 +414,9 @@ report_version = #{reportVersion,jdbcType=INTEGER}, + + version_id = #{versionId,jdbcType=VARCHAR}, + description = #{description,jdbcType=LONGVARCHAR}, @@ -423,6 +439,7 @@ actuator = #{actuator,jdbcType=VARCHAR}, end_time = #{endTime,jdbcType=BIGINT}, report_version = #{reportVersion,jdbcType=INTEGER}, + version_id = #{versionId,jdbcType=VARCHAR}, description = #{description,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} @@ -441,7 +458,8 @@ create_user = #{createUser,jdbcType=VARCHAR}, actuator = #{actuator,jdbcType=VARCHAR}, end_time = #{endTime,jdbcType=BIGINT}, - report_version = #{reportVersion,jdbcType=INTEGER} + report_version = #{reportVersion,jdbcType=INTEGER}, + version_id = #{versionId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index b35dfb7f45..e04313eb94 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit b35dfb7f4571ed9e9496ff67339b9118232b4bbd +Subproject commit e04313eb9468be0ee83c8713478bbf2ba3aaa25f diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index 5237cbeb8b..17fb27ac4d 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -71,7 +71,7 @@ - +