diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanReport.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanReport.java index 400afde08b..53312b0f2d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanReport.java @@ -33,5 +33,7 @@ public class TestPlanReport implements Serializable { private String principal; + private String components; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanReportExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanReportExample.java index 43d54d3133..3133598e3c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanReportExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanReportExample.java @@ -1013,6 +1013,76 @@ public class TestPlanReportExample { addCriterion("principal not between", value1, value2, "principal"); return (Criteria) this; } + + public Criteria andComponentsIsNull() { + addCriterion("components is null"); + return (Criteria) this; + } + + public Criteria andComponentsIsNotNull() { + addCriterion("components is not null"); + return (Criteria) this; + } + + public Criteria andComponentsEqualTo(String value) { + addCriterion("components =", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsNotEqualTo(String value) { + addCriterion("components <>", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsGreaterThan(String value) { + addCriterion("components >", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsGreaterThanOrEqualTo(String value) { + addCriterion("components >=", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsLessThan(String value) { + addCriterion("components <", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsLessThanOrEqualTo(String value) { + addCriterion("components <=", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsLike(String value) { + addCriterion("components like", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsNotLike(String value) { + addCriterion("components not like", value, "components"); + return (Criteria) this; + } + + public Criteria andComponentsIn(List values) { + addCriterion("components in", values, "components"); + return (Criteria) this; + } + + public Criteria andComponentsNotIn(List values) { + addCriterion("components not in", values, "components"); + return (Criteria) this; + } + + public Criteria andComponentsBetween(String value1, String value2) { + addCriterion("components between", value1, value2, "components"); + return (Criteria) this; + } + + public Criteria andComponentsNotBetween(String value1, String value2) { + addCriterion("components not between", value1, value2, "components"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanReportMapper.xml index 91e407c67a..07d1565c22 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestPlanReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanReportMapper.xml @@ -12,10 +12,11 @@ - - - + + + + @@ -78,7 +79,7 @@ id, test_plan_id, create_time, update_time, `name`, `status`, trigger_mode, creator, start_time, end_time, is_api_case_executing, is_scenario_executing, is_performance_executing, - principal + principal, components @@ -253,17 +262,20 @@ end_time = #{record.endTime,jdbcType=BIGINT}, - is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=BIT}, + is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=TINYINT}, - is_scenario_executing = #{record.isScenarioExecuting,jdbcType=BIT}, + is_scenario_executing = #{record.isScenarioExecuting,jdbcType=TINYINT}, - is_performance_executing = #{record.isPerformanceExecuting,jdbcType=BIT}, + is_performance_executing = #{record.isPerformanceExecuting,jdbcType=TINYINT}, principal = #{record.principal,jdbcType=VARCHAR}, + + components = #{record.components,jdbcType=VARCHAR}, + @@ -281,10 +293,11 @@ creator = #{record.creator,jdbcType=VARCHAR}, start_time = #{record.startTime,jdbcType=BIGINT}, end_time = #{record.endTime,jdbcType=BIGINT}, - is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=BIT}, - is_scenario_executing = #{record.isScenarioExecuting,jdbcType=BIT}, - is_performance_executing = #{record.isPerformanceExecuting,jdbcType=BIT}, - principal = #{record.principal,jdbcType=VARCHAR} + is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=TINYINT}, + is_scenario_executing = #{record.isScenarioExecuting,jdbcType=TINYINT}, + is_performance_executing = #{record.isPerformanceExecuting,jdbcType=TINYINT}, + principal = #{record.principal,jdbcType=VARCHAR}, + components = #{record.components,jdbcType=VARCHAR} @@ -320,17 +333,20 @@ end_time = #{endTime,jdbcType=BIGINT}, - is_api_case_executing = #{isApiCaseExecuting,jdbcType=BIT}, + is_api_case_executing = #{isApiCaseExecuting,jdbcType=TINYINT}, - is_scenario_executing = #{isScenarioExecuting,jdbcType=BIT}, + is_scenario_executing = #{isScenarioExecuting,jdbcType=TINYINT}, - is_performance_executing = #{isPerformanceExecuting,jdbcType=BIT}, + is_performance_executing = #{isPerformanceExecuting,jdbcType=TINYINT}, principal = #{principal,jdbcType=VARCHAR}, + + components = #{components,jdbcType=VARCHAR}, + where id = #{id,jdbcType=VARCHAR} @@ -345,10 +361,11 @@ creator = #{creator,jdbcType=VARCHAR}, start_time = #{startTime,jdbcType=BIGINT}, end_time = #{endTime,jdbcType=BIGINT}, - is_api_case_executing = #{isApiCaseExecuting,jdbcType=BIT}, - is_scenario_executing = #{isScenarioExecuting,jdbcType=BIT}, - is_performance_executing = #{isPerformanceExecuting,jdbcType=BIT}, - principal = #{principal,jdbcType=VARCHAR} + is_api_case_executing = #{isApiCaseExecuting,jdbcType=TINYINT}, + is_scenario_executing = #{isScenarioExecuting,jdbcType=TINYINT}, + is_performance_executing = #{isPerformanceExecuting,jdbcType=TINYINT}, + principal = #{principal,jdbcType=VARCHAR}, + components = #{components,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java index f907323391..bb19a3eac1 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java @@ -233,6 +233,8 @@ public class TestPlanReportService { testPlanReport.setEndTime(System.currentTimeMillis()); testPlanReport.setUpdateTime(System.currentTimeMillis()); + //手动触发的需要保存手工执行的信息 + JSONObject content = JSONObject.parseObject("{\"components\":[1,2,3,4,5]}"); JSONArray componentIds = content.getJSONArray("components"); List components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan); diff --git a/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql b/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql new file mode 100644 index 0000000000..e0e32b8010 --- /dev/null +++ b/backend/src/main/resources/db/migration/V70__modify_test_plan_report.sql @@ -0,0 +1 @@ +ALTER TABLE test_plan_report ADD components VARCHAR (20); \ No newline at end of file diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue index 6c1b606dbf..27afbba563 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue @@ -257,9 +257,10 @@