refactor(环境组): 去除无用字段

--story=1004261 --user=lyh 环境组不显示TCP域名优化
https://www.tapd.cn/55049933/s/1077592
This commit is contained in:
shiziyuan9527 2021-12-03 15:43:18 +08:00 committed by shiziyuan9527
parent 57d4144676
commit 3edca1afe6
5 changed files with 8 additions and 94 deletions

View File

@ -13,7 +13,5 @@ public class EnvironmentGroupProject implements Serializable {
private String projectId;
private String description;
private static final long serialVersionUID = 1L;
}

View File

@ -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<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> 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 {

View File

@ -6,7 +6,6 @@
<result column="environment_group_id" jdbcType="VARCHAR" property="environmentGroupId" />
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -67,7 +66,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, environment_group_id, environment_id, project_id, description
id, environment_group_id, environment_id, project_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.EnvironmentGroupProjectExample" resultMap="BaseResultMap">
select
@ -101,9 +100,9 @@
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.EnvironmentGroupProject">
insert into environment_group_project (id, environment_group_id, environment_id,
project_id, description)
project_id)
values (#{id,jdbcType=VARCHAR}, #{environmentGroupId,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
#{projectId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
#{projectId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.EnvironmentGroupProject">
insert into environment_group_project
@ -120,9 +119,6 @@
<if test="projectId != null">
project_id,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -137,9 +133,6 @@
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.EnvironmentGroupProjectExample" resultType="java.lang.Long">
@ -163,9 +156,6 @@
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -194,9 +183,6 @@
<if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
@ -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}
</update>
</mapper>

View File

@ -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);

View File

@ -1,2 +1,4 @@
-- 修复数据
update test_plan set repeat_case = 0 where repeat_case is null;
update test_plan set repeat_case = 0 where repeat_case is null;
alter table environment_group_project drop column description;