fix:测试评审流程问题合集
This commit is contained in:
parent
9ca7e59366
commit
2c50edbe59
|
@ -15,6 +15,8 @@ public class TestCaseComment implements Serializable {
|
|||
|
||||
private Long updateTime;
|
||||
|
||||
private String status;
|
||||
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -433,6 +433,76 @@ public class TestCaseCommentExample {
|
|||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<result column="author" jdbcType="VARCHAR" property="author" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseComment">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
|
@ -70,7 +71,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, case_id, author, create_time, update_time
|
||||
id, case_id, author, create_time, update_time, `status`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
|
@ -124,12 +125,12 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseComment">
|
||||
insert into test_case_comment (id, case_id, author,
|
||||
create_time, update_time, description
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
insert into test_case_comment (id, case_id, author,
|
||||
create_time, update_time, `status`,
|
||||
description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseComment">
|
||||
insert into test_case_comment
|
||||
|
@ -149,6 +150,9 @@
|
|||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
|
@ -169,6 +173,9 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -198,6 +205,9 @@
|
|||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -209,11 +219,12 @@
|
|||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_case_comment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
author = #{record.author,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
author = #{record.author,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -221,10 +232,11 @@
|
|||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_comment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
author = #{record.author,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
author = #{record.author,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -244,6 +256,9 @@
|
|||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -252,19 +267,21 @@
|
|||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseComment">
|
||||
update test_case_comment
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseComment">
|
||||
update test_case_comment
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -1,5 +1,5 @@
|
|||
package io.metersphere.commons.constants;
|
||||
|
||||
public enum TestCaseReviewStatus {
|
||||
Prepare, Underway, Completed
|
||||
Prepare, Underway, Completed, Finished
|
||||
}
|
||||
|
|
|
@ -55,12 +55,13 @@ public class TestCaseCommentService {
|
|||
testCaseComment.setCreateTime(System.currentTimeMillis());
|
||||
testCaseComment.setUpdateTime(System.currentTimeMillis());
|
||||
testCaseComment.setDescription(request.getDescription());
|
||||
testCaseComment.setStatus(request.getStatus());
|
||||
testCaseCommentMapper.insert(testCaseComment);
|
||||
TestCaseWithBLOBs testCaseWithBLOBs;
|
||||
testCaseWithBLOBs = testCaseMapper.selectByPrimaryKey(request.getCaseId());
|
||||
|
||||
// 发送通知
|
||||
User user = userMapper.selectByPrimaryKey(testCaseWithBLOBs.getMaintainer());
|
||||
User user = userMapper.selectByPrimaryKey(testCaseComment.getAuthor());
|
||||
BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo();
|
||||
List<String> userIds = new ArrayList<>();
|
||||
userIds.add(testCaseWithBLOBs.getMaintainer());//用例维护人
|
||||
|
|
|
@ -462,6 +462,10 @@ public class TestCaseReviewService {
|
|||
testCaseReview.setStatus(TestCaseReviewStatus.Underway.name());
|
||||
testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);
|
||||
return;
|
||||
} else if (StringUtils.equals(status, TestReviewCaseStatus.UnPass.name())) {
|
||||
testCaseReview.setStatus(TestCaseReviewStatus.Finished.name());
|
||||
testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);
|
||||
return;
|
||||
}
|
||||
}
|
||||
testCaseReview.setStatus(TestCaseReviewStatus.Completed.name());
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
-- 是否自定更新功能用例状态
|
||||
ALTER TABLE test_plan ADD automatic_status_update TINYINT(1) DEFAULT 0 NULL COMMENT '是否自定更新功能用例状态';
|
||||
ALTER TABLE test_plan
|
||||
ADD automatic_status_update TINYINT(1) DEFAULT 0 NULL COMMENT '是否自定更新功能用例状态';
|
||||
-- 添加当前评论所属用例状态
|
||||
alter table test_case_comment
|
||||
add status varchar(80) null;
|
|
@ -66,6 +66,7 @@ export default {
|
|||
comment.caseId = this.caseId;
|
||||
comment.description = this.textarea;
|
||||
comment.reviewId = this.reviewId;
|
||||
comment.status = this.reviewStatus;
|
||||
if (!this.textarea) {
|
||||
this.$warning(this.$t('test_track.comment.description_is_null'));
|
||||
return;
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
{{ comment.createTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span>
|
||||
<el-button v-if="reviewStatus === 'UnPass'" type="danger" size="mini" round>
|
||||
<el-button v-if="comment.status === 'UnPass'" type="danger" size="mini" round>
|
||||
{{ $t('test_track.review.un_pass') }}
|
||||
</el-button>
|
||||
<el-button v-if="reviewStatus === 'Pass'" type="success" size="mini">
|
||||
<el-button v-if="comment.status === 'Pass'" type="success" size="mini">
|
||||
{{ $t('test_track.review.pass') }}
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue