From 1bd3ebf4a91c2a527400127a565782240284ce7c Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 3 Dec 2021 15:43:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=8E=AF=E5=A2=83=E7=BB=84):=20?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=A0=E7=94=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1004261 --user=lyh 环境组不显示TCP域名优化 https://www.tapd.cn/55049933/s/1077592 --- .../base/domain/EnvironmentGroupProject.java | 2 - .../EnvironmentGroupProjectExample.java | 70 ------------------- .../mapper/EnvironmentGroupProjectMapper.xml | 25 ++----- .../service/EnvironmentGroupService.java | 1 - .../db/migration/V101__v1.15.3_release.sql | 4 +- 5 files changed, 8 insertions(+), 94 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProject.java b/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProject.java index 3d57174f0b..a68aa8b549 100644 --- a/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProject.java +++ b/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProject.java @@ -13,7 +13,5 @@ public class EnvironmentGroupProject implements Serializable { private String projectId; - 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/EnvironmentGroupProjectExample.java b/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProjectExample.java index 2f4a500fc4..5a6b2dced5 100644 --- a/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProjectExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/EnvironmentGroupProjectExample.java @@ -383,76 +383,6 @@ public class EnvironmentGroupProjectExample { addCriterion("project_id not between", value1, value2, "projectId"); return (Criteria) this; } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/EnvironmentGroupProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/EnvironmentGroupProjectMapper.xml index b9d13bfe0b..3499540dd4 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/EnvironmentGroupProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/EnvironmentGroupProjectMapper.xml @@ -6,7 +6,6 @@ - @@ -67,7 +66,7 @@ - id, environment_group_id, environment_id, project_id, description + id, environment_group_id, environment_id, project_id @@ -163,9 +156,6 @@ project_id = #{record.projectId,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, - @@ -176,8 +166,7 @@ set id = #{record.id,jdbcType=VARCHAR}, environment_group_id = #{record.environmentGroupId,jdbcType=VARCHAR}, environment_id = #{record.environmentId,jdbcType=VARCHAR}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR} + project_id = #{record.projectId,jdbcType=VARCHAR} @@ -194,9 +183,6 @@ project_id = #{projectId,jdbcType=VARCHAR}, - - description = #{description,jdbcType=VARCHAR}, - where id = #{id,jdbcType=VARCHAR} @@ -204,8 +190,7 @@ update environment_group_project set environment_group_id = #{environmentGroupId,jdbcType=VARCHAR}, environment_id = #{environmentId,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR} + project_id = #{projectId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java b/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java index 39b6b6f532..78018ebd7c 100644 --- a/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java +++ b/backend/src/main/java/io/metersphere/service/EnvironmentGroupService.java @@ -84,7 +84,6 @@ public class EnvironmentGroupService { EnvironmentGroupProject e = new EnvironmentGroupProject(); // todo 检查 项目|环境 是否存在 e.setId(UUID.randomUUID().toString()); - e.setDescription(egp.getDescription()); e.setEnvironmentGroupId(request.getId()); e.setProjectId(projectId); e.setEnvironmentId(environmentId); diff --git a/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql b/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql index 8a26c95d5c..ac64067578 100644 --- a/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql +++ b/backend/src/main/resources/db/migration/V101__v1.15.3_release.sql @@ -1,2 +1,4 @@ -- 修复数据 -update test_plan set repeat_case = 0 where repeat_case is null; \ No newline at end of file +update test_plan set repeat_case = 0 where repeat_case is null; + +alter table environment_group_project drop column description; \ No newline at end of file