From 06b7c6a2d8299a052a9f66a8af0028892b94c0a9 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Sun, 24 Oct 2021 12:05:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=85=B3=E6=B3=A8=E4=BA=BA=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/domain/TestCase.java | 14 +- .../base/domain/TestCaseExample.java | 422 +++++++++--------- .../base/mapper/TestCaseMapper.xml | 162 +++---- .../controller/PerformanceTestController.java | 1 - .../track/controller/TestCaseController.java | 11 +- .../request/testcase/EditTestCaseRequest.java | 1 + .../track/service/TestCaseService.java | 68 ++- .../db/migration/V97__v1.14_release.sql | 18 +- .../src/main/resources/generatorConfig.xml | 4 +- .../track/case/components/TestCaseCreate.vue | 3 +- .../track/case/components/TestCaseEdit.vue | 7 +- 11 files changed, 383 insertions(+), 328 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCase.java index 827a5d00f1..81c1f55226 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCase.java @@ -9,8 +9,6 @@ public class TestCase implements Serializable { private String nodeId; - private String testId; - private String nodePath; private String projectId; @@ -29,6 +27,8 @@ public class TestCase implements Serializable { private Long updateTime; + private String testId; + private Integer sort; private Integer num; @@ -43,14 +43,12 @@ public class TestCase implements Serializable { private String demandName; - private String followPeople; - private String status; - private String stepModel; - private String customNum; + private String stepModel; + private String createUser; private String originalStatus; @@ -61,5 +59,7 @@ public class TestCase implements Serializable { private Long order; + private String demandPlatform; + private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java index 9a8737bfd3..6ebc432077 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java @@ -244,76 +244,6 @@ public class TestCaseExample { return (Criteria) this; } - public Criteria andTestIdIsNull() { - addCriterion("test_id is null"); - return (Criteria) this; - } - - public Criteria andTestIdIsNotNull() { - addCriterion("test_id is not null"); - return (Criteria) this; - } - - public Criteria andTestIdEqualTo(String value) { - addCriterion("test_id =", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotEqualTo(String value) { - addCriterion("test_id <>", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdGreaterThan(String value) { - addCriterion("test_id >", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdGreaterThanOrEqualTo(String value) { - addCriterion("test_id >=", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLessThan(String value) { - addCriterion("test_id <", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLessThanOrEqualTo(String value) { - addCriterion("test_id <=", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLike(String value) { - addCriterion("test_id like", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotLike(String value) { - addCriterion("test_id not like", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdIn(List values) { - addCriterion("test_id in", values, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotIn(List values) { - addCriterion("test_id not in", values, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdBetween(String value1, String value2) { - addCriterion("test_id between", value1, value2, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotBetween(String value1, String value2) { - addCriterion("test_id not between", value1, value2, "testId"); - return (Criteria) this; - } - public Criteria andNodePathIsNull() { addCriterion("node_path is null"); return (Criteria) this; @@ -924,6 +854,76 @@ public class TestCaseExample { return (Criteria) this; } + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + public Criteria andSortIsNull() { addCriterion("sort is null"); return (Criteria) this; @@ -1394,76 +1394,6 @@ public class TestCaseExample { return (Criteria) this; } - public Criteria andFollowPeopleIsNull() { - addCriterion("follow_people is null"); - return (Criteria) this; - } - - public Criteria andFollowPeopleIsNotNull() { - addCriterion("follow_people is not null"); - return (Criteria) this; - } - - public Criteria andFollowPeopleEqualTo(String value) { - addCriterion("follow_people =", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleNotEqualTo(String value) { - addCriterion("follow_people <>", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleGreaterThan(String value) { - addCriterion("follow_people >", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleGreaterThanOrEqualTo(String value) { - addCriterion("follow_people >=", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleLessThan(String value) { - addCriterion("follow_people <", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleLessThanOrEqualTo(String value) { - addCriterion("follow_people <=", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleLike(String value) { - addCriterion("follow_people like", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleNotLike(String value) { - addCriterion("follow_people not like", value, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleIn(List values) { - addCriterion("follow_people in", values, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleNotIn(List values) { - addCriterion("follow_people not in", values, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleBetween(String value1, String value2) { - addCriterion("follow_people between", value1, value2, "followPeople"); - return (Criteria) this; - } - - public Criteria andFollowPeopleNotBetween(String value1, String value2) { - addCriterion("follow_people not between", value1, value2, "followPeople"); - return (Criteria) this; - } - public Criteria andStatusIsNull() { addCriterion("`status` is null"); return (Criteria) this; @@ -1534,76 +1464,6 @@ public class TestCaseExample { return (Criteria) this; } - public Criteria andStepModelIsNull() { - addCriterion("step_model is null"); - return (Criteria) this; - } - - public Criteria andStepModelIsNotNull() { - addCriterion("step_model is not null"); - return (Criteria) this; - } - - public Criteria andStepModelEqualTo(String value) { - addCriterion("step_model =", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelNotEqualTo(String value) { - addCriterion("step_model <>", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelGreaterThan(String value) { - addCriterion("step_model >", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelGreaterThanOrEqualTo(String value) { - addCriterion("step_model >=", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelLessThan(String value) { - addCriterion("step_model <", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelLessThanOrEqualTo(String value) { - addCriterion("step_model <=", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelLike(String value) { - addCriterion("step_model like", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelNotLike(String value) { - addCriterion("step_model not like", value, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelIn(List values) { - addCriterion("step_model in", values, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelNotIn(List values) { - addCriterion("step_model not in", values, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelBetween(String value1, String value2) { - addCriterion("step_model between", value1, value2, "stepModel"); - return (Criteria) this; - } - - public Criteria andStepModelNotBetween(String value1, String value2) { - addCriterion("step_model not between", value1, value2, "stepModel"); - return (Criteria) this; - } - public Criteria andCustomNumIsNull() { addCriterion("custom_num is null"); return (Criteria) this; @@ -1674,6 +1534,76 @@ public class TestCaseExample { return (Criteria) this; } + public Criteria andStepModelIsNull() { + addCriterion("step_model is null"); + return (Criteria) this; + } + + public Criteria andStepModelIsNotNull() { + addCriterion("step_model is not null"); + return (Criteria) this; + } + + public Criteria andStepModelEqualTo(String value) { + addCriterion("step_model =", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotEqualTo(String value) { + addCriterion("step_model <>", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelGreaterThan(String value) { + addCriterion("step_model >", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelGreaterThanOrEqualTo(String value) { + addCriterion("step_model >=", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLessThan(String value) { + addCriterion("step_model <", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLessThanOrEqualTo(String value) { + addCriterion("step_model <=", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLike(String value) { + addCriterion("step_model like", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotLike(String value) { + addCriterion("step_model not like", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelIn(List values) { + addCriterion("step_model in", values, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotIn(List values) { + addCriterion("step_model not in", values, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelBetween(String value1, String value2) { + addCriterion("step_model between", value1, value2, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotBetween(String value1, String value2) { + addCriterion("step_model not between", value1, value2, "stepModel"); + return (Criteria) this; + } + public Criteria andCreateUserIsNull() { addCriterion("create_user is null"); return (Criteria) this; @@ -2003,6 +1933,76 @@ public class TestCaseExample { addCriterion("`order` not between", value1, value2, "order"); return (Criteria) this; } + + public Criteria andDemandPlatformIsNull() { + addCriterion("demand_platform is null"); + return (Criteria) this; + } + + public Criteria andDemandPlatformIsNotNull() { + addCriterion("demand_platform is not null"); + return (Criteria) this; + } + + public Criteria andDemandPlatformEqualTo(String value) { + addCriterion("demand_platform =", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotEqualTo(String value) { + addCriterion("demand_platform <>", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformGreaterThan(String value) { + addCriterion("demand_platform >", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformGreaterThanOrEqualTo(String value) { + addCriterion("demand_platform >=", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLessThan(String value) { + addCriterion("demand_platform <", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLessThanOrEqualTo(String value) { + addCriterion("demand_platform <=", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLike(String value) { + addCriterion("demand_platform like", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotLike(String value) { + addCriterion("demand_platform not like", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformIn(List values) { + addCriterion("demand_platform in", values, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotIn(List values) { + addCriterion("demand_platform not in", values, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformBetween(String value1, String value2) { + addCriterion("demand_platform between", value1, value2, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotBetween(String value1, String value2) { + addCriterion("demand_platform not between", value1, value2, "demandPlatform"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { @@ -2097,4 +2097,4 @@ public class TestCaseExample { this(condition, value, secondValue, null); } } -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml index dfd9e48f0d..269c95e77c 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseMapper.xml @@ -4,7 +4,6 @@ - @@ -14,6 +13,7 @@ + @@ -21,15 +21,15 @@ - - + + @@ -98,10 +98,10 @@ - id, node_id, test_id, node_path, project_id, `name`, `type`, maintainer, priority, - `method`, create_time, update_time, sort, num, other_test_name, review_status, tags, - demand_id, demand_name, follow_people, `status`, step_model, custom_num, create_user, - original_status, delete_time, delete_user_id, `order` + id, node_id, node_path, project_id, `name`, `type`, maintainer, priority, `method`, + create_time, update_time, test_id, sort, num, other_test_name, review_status, tags, + demand_id, demand_name, `status`, custom_num, step_model, create_user, original_status, + delete_time, delete_user_id, `order`, demand_platform prerequisite, remark, steps, step_description, expected_result, custom_fields @@ -137,7 +137,7 @@