fix(项目设置): 修复自定义模版名称太长保存报错的缺陷
--bug=1016767 --user=王孝刚 【项目设置】新建/编辑自定义模板,名称太长显示错位,描述太长会报错 https://www.tapd.cn/55049933/s/1243259
This commit is contained in:
parent
f6338f97da
commit
506fa5e66f
|
@ -17,11 +17,11 @@ public class CustomFieldTemplate implements Serializable {
|
|||
|
||||
private Integer order;
|
||||
|
||||
private String defaultValue;
|
||||
|
||||
private String customData;
|
||||
|
||||
private String key;
|
||||
|
||||
private String defaultValue;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -504,76 +504,6 @@ public class CustomFieldTemplateExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueIsNull() {
|
||||
addCriterion("default_value is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueIsNotNull() {
|
||||
addCriterion("default_value is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueEqualTo(String value) {
|
||||
addCriterion("default_value =", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueNotEqualTo(String value) {
|
||||
addCriterion("default_value <>", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueGreaterThan(String value) {
|
||||
addCriterion("default_value >", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("default_value >=", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueLessThan(String value) {
|
||||
addCriterion("default_value <", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueLessThanOrEqualTo(String value) {
|
||||
addCriterion("default_value <=", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueLike(String value) {
|
||||
addCriterion("default_value like", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueNotLike(String value) {
|
||||
addCriterion("default_value not like", value, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueIn(List<String> values) {
|
||||
addCriterion("default_value in", values, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueNotIn(List<String> values) {
|
||||
addCriterion("default_value not in", values, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueBetween(String value1, String value2) {
|
||||
addCriterion("default_value between", value1, value2, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDefaultValueNotBetween(String value1, String value2) {
|
||||
addCriterion("default_value not between", value1, value2, "defaultValue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCustomDataIsNull() {
|
||||
addCriterion("custom_data is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -20,8 +20,6 @@ public class TestCaseTemplate implements Serializable {
|
|||
|
||||
private Boolean global;
|
||||
|
||||
private String prerequisite;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
|
|
@ -574,76 +574,6 @@ public class TestCaseTemplateExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteIsNull() {
|
||||
addCriterion("prerequisite is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteIsNotNull() {
|
||||
addCriterion("prerequisite is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteEqualTo(String value) {
|
||||
addCriterion("prerequisite =", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteNotEqualTo(String value) {
|
||||
addCriterion("prerequisite <>", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteGreaterThan(String value) {
|
||||
addCriterion("prerequisite >", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("prerequisite >=", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteLessThan(String value) {
|
||||
addCriterion("prerequisite <", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteLessThanOrEqualTo(String value) {
|
||||
addCriterion("prerequisite <=", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteLike(String value) {
|
||||
addCriterion("prerequisite like", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteNotLike(String value) {
|
||||
addCriterion("prerequisite not like", value, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteIn(List<String> values) {
|
||||
addCriterion("prerequisite in", values, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteNotIn(List<String> values) {
|
||||
addCriterion("prerequisite not in", values, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteBetween(String value1, String value2) {
|
||||
addCriterion("prerequisite between", value1, value2, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteNotBetween(String value1, String value2) {
|
||||
addCriterion("prerequisite not between", value1, value2, "prerequisite");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TestCaseTemplateWithBLOBs extends TestCaseTemplate implements Serializable {
|
||||
private String prerequisite;
|
||||
|
||||
private String stepDescription;
|
||||
|
||||
private String expectedResult;
|
||||
|
|
|
@ -16,15 +16,21 @@ public interface CustomFieldTemplateMapper {
|
|||
|
||||
int insertSelective(CustomFieldTemplate record);
|
||||
|
||||
List<CustomFieldTemplate> selectByExampleWithBLOBs(CustomFieldTemplateExample example);
|
||||
|
||||
List<CustomFieldTemplate> selectByExample(CustomFieldTemplateExample example);
|
||||
|
||||
CustomFieldTemplate selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example);
|
||||
|
||||
int updateByExample(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(CustomFieldTemplate record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(CustomFieldTemplate record);
|
||||
|
||||
int updateByPrimaryKey(CustomFieldTemplate record);
|
||||
}
|
|
@ -8,10 +8,12 @@
|
|||
<result column="scene" jdbcType="VARCHAR" property="scene"/>
|
||||
<result column="required" jdbcType="BIT" property="required"/>
|
||||
<result column="order" jdbcType="INTEGER" property="order"/>
|
||||
<result column="default_value" jdbcType="VARCHAR" property="defaultValue" />
|
||||
<result column="custom_data" jdbcType="VARCHAR" property="customData"/>
|
||||
<result column="key" jdbcType="VARCHAR" property="key"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.CustomFieldTemplate">
|
||||
<result column="default_value" jdbcType="LONGVARCHAR" property="defaultValue"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
|
@ -30,7 +32,8 @@
|
|||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
|
@ -71,10 +74,31 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, field_id, template_id, scene, required, `order`, default_value, custom_data,
|
||||
`key`
|
||||
id
|
||||
, field_id, template_id, scene, required, `order`, custom_data, `key`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample" resultMap="BaseResultMap">
|
||||
<sql id="Blob_Column_List">
|
||||
default_value
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from custom_field_template
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
|
@ -88,14 +112,17 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from custom_field_template
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from custom_field_template
|
||||
delete
|
||||
from custom_field_template
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample">
|
||||
|
@ -107,12 +134,10 @@
|
|||
<insert id="insert" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||
insert into custom_field_template (id, field_id, template_id,
|
||||
scene, required, `order`,
|
||||
default_value, custom_data, `key`
|
||||
)
|
||||
custom_data, `key`, default_value)
|
||||
values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR},
|
||||
#{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{order,jdbcType=INTEGER},
|
||||
#{defaultValue,jdbcType=VARCHAR}, #{customData,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}
|
||||
)
|
||||
#{customData,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, #{defaultValue,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||
insert into custom_field_template
|
||||
|
@ -135,15 +160,15 @@
|
|||
<if test="order != null">
|
||||
`order`,
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
default_value,
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
custom_data,
|
||||
</if>
|
||||
<if test="key != null">
|
||||
`key`,
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
default_value,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -164,15 +189,15 @@
|
|||
<if test="order != null">
|
||||
#{order,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
#{defaultValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
#{customData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="key != null">
|
||||
#{key,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
#{defaultValue,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.CustomFieldTemplateExample" resultType="java.lang.Long">
|
||||
|
@ -202,19 +227,34 @@
|
|||
<if test="record.order != null">
|
||||
`order` = #{record.order,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.defaultValue != null">
|
||||
default_value = #{record.defaultValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.customData != null">
|
||||
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.key != null">
|
||||
`key` = #{record.key,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.defaultValue != null">
|
||||
default_value = #{record.defaultValue,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update custom_field_template
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
||||
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||
scene = #{record.scene,jdbcType=VARCHAR},
|
||||
required = #{record.required,jdbcType=BIT},
|
||||
`order` = #{record.order,jdbcType=INTEGER},
|
||||
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||
`key` = #{record.key,jdbcType=VARCHAR},
|
||||
default_value = #{record.defaultValue,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update custom_field_template
|
||||
|
@ -224,7 +264,6 @@
|
|||
scene = #{record.scene,jdbcType=VARCHAR},
|
||||
required = #{record.required,jdbcType=BIT},
|
||||
`order` = #{record.order,jdbcType=INTEGER},
|
||||
default_value = #{record.defaultValue,jdbcType=VARCHAR},
|
||||
custom_data = #{record.customData,jdbcType=VARCHAR},
|
||||
`key` = #{record.key,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -249,18 +288,30 @@
|
|||
<if test="order != null">
|
||||
`order` = #{order,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
default_value = #{defaultValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="customData != null">
|
||||
custom_data = #{customData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="key != null">
|
||||
`key` = #{key,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValue != null">
|
||||
default_value = #{defaultValue,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||
update custom_field_template
|
||||
set field_id = #{fieldId,jdbcType=VARCHAR},
|
||||
template_id = #{templateId,jdbcType=VARCHAR},
|
||||
scene = #{scene,jdbcType=VARCHAR},
|
||||
required = #{required,jdbcType=BIT},
|
||||
`order` = #{order,jdbcType=INTEGER},
|
||||
custom_data = #{customData,jdbcType=VARCHAR},
|
||||
`key` = #{key,jdbcType=VARCHAR},
|
||||
default_value = #{defaultValue,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.CustomFieldTemplate">
|
||||
update custom_field_template
|
||||
set field_id = #{fieldId,jdbcType=VARCHAR},
|
||||
|
@ -268,7 +319,6 @@
|
|||
scene = #{scene,jdbcType=VARCHAR},
|
||||
required = #{required,jdbcType=BIT},
|
||||
`order` = #{order,jdbcType=INTEGER},
|
||||
default_value = #{defaultValue,jdbcType=VARCHAR},
|
||||
custom_data = #{customData,jdbcType=VARCHAR},
|
||||
`key` = #{key,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<result column="case_name" jdbcType="VARCHAR" property="caseName" />
|
||||
<result column="system" jdbcType="BIT" property="system" />
|
||||
<result column="global" jdbcType="BIT" property="global" />
|
||||
<result column="prerequisite" jdbcType="VARCHAR" property="prerequisite" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="step_model" jdbcType="VARCHAR" property="stepModel" />
|
||||
|
@ -17,6 +16,7 @@
|
|||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
<result column="prerequisite" jdbcType="LONGVARCHAR" property="prerequisite"/>
|
||||
<result column="step_description" jdbcType="LONGVARCHAR" property="stepDescription" />
|
||||
<result column="expected_result" jdbcType="LONGVARCHAR" property="expectedResult" />
|
||||
<result column="actual_result" jdbcType="LONGVARCHAR" property="actualResult" />
|
||||
|
@ -81,11 +81,13 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, `type`, description, case_name, `system`, `global`, prerequisite, create_time,
|
||||
update_time, step_model, create_user, project_id
|
||||
id
|
||||
, `name`, `type`, description, case_name, `system`, `global`, create_time, update_time,
|
||||
step_model, create_user, project_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
step_description, expected_result, actual_result, steps
|
||||
prerequisite
|
||||
, step_description, expected_result, actual_result, steps
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseTemplateExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
|
@ -136,18 +138,18 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
INSERT INTO test_case_template (id, `name`, `type`,
|
||||
insert into test_case_template (id, `name`, `type`,
|
||||
description, case_name, `system`,
|
||||
`global`, prerequisite, create_time,
|
||||
update_time, step_model, create_user,
|
||||
project_id, step_description, expected_result,
|
||||
actual_result, steps)
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
`global`, create_time, update_time,
|
||||
step_model, create_user, project_id,
|
||||
prerequisite, step_description,
|
||||
expected_result, actual_result, steps)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT},
|
||||
#{global,jdbcType=BIT}, #{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
#{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
||||
#{global,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{prerequisite,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR},
|
||||
#{expectedResult,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
insert into test_case_template
|
||||
|
@ -173,9 +175,6 @@
|
|||
<if test="global != null">
|
||||
`global`,
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -191,6 +190,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite,
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
step_description,
|
||||
</if>
|
||||
|
@ -226,9 +228,6 @@
|
|||
<if test="global != null">
|
||||
#{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
#{prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -244,6 +243,9 @@
|
|||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
#{prerequisite,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
#{stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -288,9 +290,6 @@
|
|||
<if test="record.global != null">
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.prerequisite != null">
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -306,6 +305,9 @@
|
|||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.prerequisite != null">
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.stepDescription != null">
|
||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -332,12 +334,12 @@
|
|||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR},
|
||||
|
@ -355,7 +357,6 @@
|
|||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||
|
@ -386,9 +387,6 @@
|
|||
<if test="global != null">
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -404,6 +402,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -427,12 +428,12 @@
|
|||
case_name = #{caseName,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{actualResult,jdbcType=LONGVARCHAR},
|
||||
|
@ -447,7 +448,6 @@
|
|||
case_name = #{caseName,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||
|
|
|
@ -9,16 +9,19 @@
|
|||
|
||||
<el-form :model="form" :rules="rules" label-position="right" size="small" ref="form">
|
||||
<el-form-item :label="$t('custom_field.field_name')" prop="name" :label-width="labelWidth">
|
||||
<el-input v-if="isSystem" :disabled="isSystem" :value="$t(systemNameMap[form.name])" autocomplete="off"></el-input>
|
||||
<el-input v-else v-model="form.name" autocomplete="off"></el-input>
|
||||
<el-input v-if="isSystem" :disabled="isSystem" :value="$t(systemNameMap[form.name])"
|
||||
autocomplete="off"></el-input>
|
||||
<el-input v-else v-model="form.name" autocomplete="off" maxlength="64" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('custom_field.field_remark')" prop="remark" :label-width="labelWidth">
|
||||
<el-input :autosize="{ minRows: 2, maxRows: 4}" type="textarea" v-model="form.remark"></el-input>
|
||||
<el-input v-model="form.remark" :autosize="{ minRows: 2, maxRows: 4}" maxlength="255" show-word-limit
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('custom_field.scene')" prop="type" :label-width="labelWidth">
|
||||
<el-select :disabled="isSystem || isTemplateEdit" filterable v-model="form.scene" :placeholder="$t('custom_field.scene')">
|
||||
<el-select v-model="form.scene" :disabled="isSystem || isTemplateEdit" :placeholder="$t('custom_field.scene')"
|
||||
filterable>
|
||||
<el-option
|
||||
v-for="item in (form.scene === 'PLAN' ? planSceneOptions : sceneOptions)"
|
||||
:key="item.value"
|
||||
|
@ -44,9 +47,9 @@
|
|||
:label="$t('custom_field.field_option')"
|
||||
prop="options" :label-width="labelWidth">
|
||||
<ms-single-handle-drag
|
||||
:is-kv="form.scene === 'ISSUE'"
|
||||
:data="form.options"
|
||||
:disable="form.name === '用例等级'"
|
||||
:data="form.options"/>
|
||||
:is-kv="form.scene === 'ISSUE'"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<ms-table
|
||||
ref="table"
|
||||
v-loading="result.loading"
|
||||
:data="tableData"
|
||||
:enable-selection="false"
|
||||
:operators="operators"
|
||||
:data="tableData"
|
||||
:screen-height="null"
|
||||
@refresh="refreshTable"
|
||||
ref="table">
|
||||
@refresh="refreshTable">
|
||||
|
||||
<ms-table-column
|
||||
:label="$t('commons.name')"
|
||||
|
@ -27,7 +27,8 @@
|
|||
prop="type">
|
||||
<template v-slot="scope">
|
||||
<el-scrollbar>
|
||||
<custom-filed-component class="default-value-item" :data="scope.row" prop="defaultValue"/>
|
||||
<custom-filed-component :data="scope.row" :is-template-edit="true" class="default-value-item"
|
||||
prop="defaultValue"/>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
@ -36,8 +37,8 @@
|
|||
|
||||
<ms-table-column
|
||||
:label="$t('api_test.definition.document.table_coloum.is_required')"
|
||||
width="80"
|
||||
prop="type">
|
||||
prop="type"
|
||||
width="80">
|
||||
<template v-slot="scope">
|
||||
<el-checkbox v-model="scope.row.required"/>
|
||||
</template>
|
||||
|
@ -45,8 +46,8 @@
|
|||
|
||||
<ms-table-column
|
||||
:label="$t('custom_field.system_field')"
|
||||
width="80"
|
||||
prop="system">
|
||||
prop="system"
|
||||
width="80">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.system">
|
||||
{{ $t('commons.yes') }}
|
||||
|
|
|
@ -155,12 +155,15 @@ export default {
|
|||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-date-editor.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.custom-with >>> .el-input__inner {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
>>> .el-input--suffix .el-input__inner {
|
||||
height: 32px;
|
||||
}
|
||||
|
|
|
@ -19,13 +19,15 @@
|
|||
|
||||
<el-form :model="form" :rules="rules" label-position="right" label-width="80px" size="small" ref="form">
|
||||
<el-form-item :label="$t('commons.name')" prop="name" :label-width="labelWidth">
|
||||
<el-input :disabled="isSystem" v-model="form.name" autocomplete="off"></el-input>
|
||||
<el-input v-model="form.name" :disabled="isSystem" autocomplete="off" maxlength="64"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<slot name="base"></slot>
|
||||
|
||||
<el-form-item :label="$t('commons.description')" prop="description" :label-width="labelWidth">
|
||||
<el-input :autosize="{ minRows: 2, maxRows: 4}" type="textarea" v-model="form.description"></el-input>
|
||||
<el-input v-model="form.description" :autosize="{ minRows: 2, maxRows: 4}" maxlength="255" show-word-limit
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<ms-form-divider :title="$t('custom_field.template_setting')"/>
|
||||
|
@ -34,7 +36,10 @@
|
|||
|
||||
<el-form-item :label="$t('table.selected_fields')" class="filed-list" :label-width="labelWidth">
|
||||
<el-button type="primary" @click="relateField">{{ $t('custom_field.add_field') }}</el-button>
|
||||
<el-button type="primary" @click="addField" plain>{{ $t('custom_field.custom_field_setting') }}</el-button>
|
||||
<el-button plain type="primary" @click="addField">{{
|
||||
$t('custom_field.custom_field_setting')
|
||||
}}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label-width="labelWidth">
|
||||
|
@ -57,7 +62,8 @@
|
|||
:scene="scene"
|
||||
ref="customFieldRelateList"/>
|
||||
|
||||
<custom-field-edit :label-width="labelWidth" :scene="scene" @save="handleCustomFieldAdd" ref="customFieldEdit"/>
|
||||
<custom-field-edit ref="customFieldEdit" :label-width="labelWidth" :scene="scene"
|
||||
@save="handleCustomFieldAdd"/>
|
||||
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
|
|
|
@ -11,8 +11,11 @@
|
|||
ref="fieldTemplateEdit">
|
||||
|
||||
<template v-slot:base>
|
||||
<el-form-item :label="$t('api_test.home_page.failed_case_list.table_coloum.case_type')" prop="type" :label-width="labelWidth">
|
||||
<el-select :disabled="isSystem" filterable v-model="form.type" :placeholder="$t('api_test.home_page.failed_case_list.table_coloum.case_type')">
|
||||
<el-form-item :label="$t('api_test.home_page.failed_case_list.table_coloum.case_type')" :label-width="labelWidth"
|
||||
prop="type">
|
||||
<el-select v-model="form.type" :disabled="isSystem"
|
||||
:placeholder="$t('api_test.home_page.failed_case_list.table_coloum.case_type')"
|
||||
filterable>
|
||||
<el-option
|
||||
v-for="item in caseTypeOption"
|
||||
:key="item.value"
|
||||
|
@ -25,16 +28,22 @@
|
|||
|
||||
<template v-slot:default>
|
||||
<el-form-item :label="$t('test_track.case.name')" prop="caseName" :label-width="labelWidth">
|
||||
<el-input v-model="form.caseName" autocomplete="off"></el-input>
|
||||
<el-input v-model="form.caseName" autocomplete="off" maxlength="64" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<form-rich-text-item :label-width="labelWidth" :title="$t('test_track.case.prerequisite')" :data="form" prop="prerequisite"/>
|
||||
<form-rich-text-item :data="form" :label-width="labelWidth" :title="$t('test_track.case.prerequisite')"
|
||||
prop="prerequisite"/>
|
||||
|
||||
<step-change-item :form="form"/>
|
||||
<test-case-step-item :label-width="labelWidth" v-if="form.stepModel === 'STEP'" :form="form"/>
|
||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.case.step_desc')" :data="form" prop="stepDescription"/>
|
||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.case.expected_results')" :data="form" prop="expectedResult"/>
|
||||
<form-rich-text-item :label-width="labelWidth" v-if="form.stepModel === 'TEXT'" :title="$t('test_track.plan_view.actual_result')" :data="form" prop="actualResult"/>
|
||||
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||
:label-width="labelWidth" :title="$t('test_track.case.step_desc')" prop="stepDescription"/>
|
||||
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||
:label-width="labelWidth" :title="$t('test_track.case.expected_results')"
|
||||
prop="expectedResult"/>
|
||||
<form-rich-text-item v-if="form.stepModel === 'TEXT'" :data="form"
|
||||
:label-width="labelWidth" :title="$t('test_track.plan_view.actual_result')"
|
||||
prop="actualResult"/>
|
||||
</template>
|
||||
|
||||
</field-template-edit>
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<template>
|
||||
<el-row type="flex" class="head-bar">
|
||||
<el-col :span="12">
|
||||
<el-col :span="18">
|
||||
<span class="title">{{ template[prop] }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12" class="head-right">
|
||||
<el-col :span="6" class="head-right">
|
||||
<el-button plain size="mini" @click="handleCancel">{{ $t('test_track.return') }}</el-button>
|
||||
<el-button v-prevent-re-click type="primary" size="mini" @click="handleSave">{{ $t('test_track.save') }}</el-button>
|
||||
<el-button v-prevent-re-click size="mini" type="primary" @click="handleSave">{{
|
||||
$t('test_track.save')
|
||||
}}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
|
Loading…
Reference in New Issue