fix_用例评审_测试计划_关注人支持多选 --bug=1007309 --user=王孝刚 【测试计划和用例评审】-关注人选项不可多选 https://www.tapd.cn/55049933/s/1057614 (#6968)

Co-authored-by: wxg0103 <727495428@qq.com>
Co-authored-by: 刘瑞斌 <bin@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-10-24 12:36:12 +08:00 committed by GitHub
parent 06b7c6a2d8
commit 4a0a6f5269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 1389 additions and 316 deletions

View File

@ -25,8 +25,6 @@ public class TestCaseReview implements Serializable {
private String createUser;
private String followPeople;
private String description;
private static final long serialVersionUID = 1L;

View File

@ -773,76 +773,6 @@ public class TestCaseReviewExample {
addCriterion("create_user not between", value1, value2, "createUser");
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<String> values) {
addCriterion("follow_people in", values, "followPeople");
return (Criteria) this;
}
public Criteria andFollowPeopleNotIn(List<String> 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 static class Criteria extends GeneratedCriteria {

View File

@ -0,0 +1,14 @@
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseReviewFollow implements Serializable {
private String reviewId;
private String followId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.base.domain;
import java.util.ArrayList;
import java.util.List;
public class TestCaseReviewFollowExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TestCaseReviewFollowExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andReviewIdIsNull() {
addCriterion("review_id is null");
return (Criteria) this;
}
public Criteria andReviewIdIsNotNull() {
addCriterion("review_id is not null");
return (Criteria) this;
}
public Criteria andReviewIdEqualTo(String value) {
addCriterion("review_id =", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotEqualTo(String value) {
addCriterion("review_id <>", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThan(String value) {
addCriterion("review_id >", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThanOrEqualTo(String value) {
addCriterion("review_id >=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThan(String value) {
addCriterion("review_id <", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThanOrEqualTo(String value) {
addCriterion("review_id <=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLike(String value) {
addCriterion("review_id like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotLike(String value) {
addCriterion("review_id not like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdIn(List<String> values) {
addCriterion("review_id in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotIn(List<String> values) {
addCriterion("review_id not in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdBetween(String value1, String value2) {
addCriterion("review_id between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotBetween(String value1, String value2) {
addCriterion("review_id not between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andFollowIdIsNull() {
addCriterion("follow_id is null");
return (Criteria) this;
}
public Criteria andFollowIdIsNotNull() {
addCriterion("follow_id is not null");
return (Criteria) this;
}
public Criteria andFollowIdEqualTo(String value) {
addCriterion("follow_id =", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotEqualTo(String value) {
addCriterion("follow_id <>", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdGreaterThan(String value) {
addCriterion("follow_id >", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdGreaterThanOrEqualTo(String value) {
addCriterion("follow_id >=", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLessThan(String value) {
addCriterion("follow_id <", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLessThanOrEqualTo(String value) {
addCriterion("follow_id <=", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLike(String value) {
addCriterion("follow_id like", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotLike(String value) {
addCriterion("follow_id not like", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdIn(List<String> values) {
addCriterion("follow_id in", values, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotIn(List<String> values) {
addCriterion("follow_id not in", values, "followId");
return (Criteria) this;
}
public Criteria andFollowIdBetween(String value1, String value2) {
addCriterion("follow_id between", value1, value2, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotBetween(String value1, String value2) {
addCriterion("follow_id not between", value1, value2, "followId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -43,7 +43,5 @@ public class TestPlan implements Serializable {
private Boolean automaticStatusUpdate;
private String followPeople;
private static final long serialVersionUID = 1L;
}

View File

@ -1353,76 +1353,6 @@ public class TestPlanExample {
addCriterion("automatic_status_update not between", value1, value2, "automaticStatusUpdate");
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<String> values) {
addCriterion("follow_people in", values, "followPeople");
return (Criteria) this;
}
public Criteria andFollowPeopleNotIn(List<String> 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 static class Criteria extends GeneratedCriteria {

View File

@ -0,0 +1,14 @@
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestPlanFollow implements Serializable {
private String testPlanId;
private String followId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.base.domain;
import java.util.ArrayList;
import java.util.List;
public class TestPlanFollowExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TestPlanFollowExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andTestPlanIdIsNull() {
addCriterion("test_plan_id is null");
return (Criteria) this;
}
public Criteria andTestPlanIdIsNotNull() {
addCriterion("test_plan_id is not null");
return (Criteria) this;
}
public Criteria andTestPlanIdEqualTo(String value) {
addCriterion("test_plan_id =", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotEqualTo(String value) {
addCriterion("test_plan_id <>", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdGreaterThan(String value) {
addCriterion("test_plan_id >", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdGreaterThanOrEqualTo(String value) {
addCriterion("test_plan_id >=", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdLessThan(String value) {
addCriterion("test_plan_id <", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdLessThanOrEqualTo(String value) {
addCriterion("test_plan_id <=", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdLike(String value) {
addCriterion("test_plan_id like", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotLike(String value) {
addCriterion("test_plan_id not like", value, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdIn(List<String> values) {
addCriterion("test_plan_id in", values, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotIn(List<String> values) {
addCriterion("test_plan_id not in", values, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdBetween(String value1, String value2) {
addCriterion("test_plan_id between", value1, value2, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotBetween(String value1, String value2) {
addCriterion("test_plan_id not between", value1, value2, "testPlanId");
return (Criteria) this;
}
public Criteria andFollowIdIsNull() {
addCriterion("follow_id is null");
return (Criteria) this;
}
public Criteria andFollowIdIsNotNull() {
addCriterion("follow_id is not null");
return (Criteria) this;
}
public Criteria andFollowIdEqualTo(String value) {
addCriterion("follow_id =", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotEqualTo(String value) {
addCriterion("follow_id <>", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdGreaterThan(String value) {
addCriterion("follow_id >", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdGreaterThanOrEqualTo(String value) {
addCriterion("follow_id >=", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLessThan(String value) {
addCriterion("follow_id <", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLessThanOrEqualTo(String value) {
addCriterion("follow_id <=", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdLike(String value) {
addCriterion("follow_id like", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotLike(String value) {
addCriterion("follow_id not like", value, "followId");
return (Criteria) this;
}
public Criteria andFollowIdIn(List<String> values) {
addCriterion("follow_id in", values, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotIn(List<String> values) {
addCriterion("follow_id not in", values, "followId");
return (Criteria) this;
}
public Criteria andFollowIdBetween(String value1, String value2) {
addCriterion("follow_id between", value1, value2, "followId");
return (Criteria) this;
}
public Criteria andFollowIdNotBetween(String value1, String value2) {
addCriterion("follow_id not between", value1, value2, "followId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -0,0 +1,24 @@
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseReviewFollow;
import io.metersphere.base.domain.TestCaseReviewFollowExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseReviewFollowMapper {
long countByExample(TestCaseReviewFollowExample example);
int deleteByExample(TestCaseReviewFollowExample example);
int insert(TestCaseReviewFollow record);
int insertSelective(TestCaseReviewFollow record);
List<TestCaseReviewFollow> selectByExample(TestCaseReviewFollowExample example);
int updateByExampleSelective(@Param("record") TestCaseReviewFollow record, @Param("example") TestCaseReviewFollowExample example);
int updateByExample(@Param("record") TestCaseReviewFollow record, @Param("example") TestCaseReviewFollowExample example);
}

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.base.mapper.TestCaseReviewFollowMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewFollow">
<result column="review_id" jdbcType="VARCHAR" property="reviewId"/>
<result column="follow_id" jdbcType="VARCHAR" property="followId"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
review_id
, follow_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewFollowExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from test_case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewFollowExample">
delete from test_case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewFollow">
insert into test_case_review_follow (review_id, follow_id)
values (#{reviewId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewFollow">
insert into test_case_review_follow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
review_id,
</if>
<if test="followId != null">
follow_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="followId != null">
#{followId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewFollowExample"
resultType="java.lang.Long">
select count(*) from test_case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review_follow
<set>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.followId != null">
follow_id = #{record.followId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review_follow
set review_id = #{record.reviewId,jdbcType=VARCHAR},
follow_id = #{record.followId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
</mapper>

View File

@ -12,7 +12,6 @@
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="tags" jdbcType="VARCHAR" property="tags" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="follow_people" jdbcType="VARCHAR" property="followPeople" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReview">
<result column="description" jdbcType="LONGVARCHAR" property="description" />
@ -77,7 +76,7 @@
</sql>
<sql id="Base_Column_List">
id, `name`, creator, `status`, create_time, update_time, end_time, project_id, tags,
create_user, follow_people
create_user
</sql>
<sql id="Blob_Column_List">
description
@ -131,16 +130,14 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReview">
insert into test_case_review (id, `name`, creator,
`status`, create_time, update_time,
end_time, project_id, tags,
create_user, follow_people, description
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{endTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR}, #{followPeople,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
insert into test_case_review (id, `name`, creator,
`status`, create_time, update_time,
end_time, project_id, tags,
create_user, description)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{endTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReview">
insert into test_case_review
@ -175,9 +172,6 @@
<if test="createUser != null">
create_user,
</if>
<if test="followPeople != null">
follow_people,
</if>
<if test="description != null">
description,
</if>
@ -213,9 +207,6 @@
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="followPeople != null">
#{followPeople,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
@ -260,9 +251,6 @@
<if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.followPeople != null">
follow_people = #{record.followPeople,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
@ -283,7 +271,6 @@
project_id = #{record.projectId,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR},
follow_people = #{record.followPeople,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -292,16 +279,15 @@
<update id="updateByExample" parameterType="map">
update test_case_review
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR},
follow_people = #{record.followPeople,jdbcType=VARCHAR}
`name` = #{record.name,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -336,9 +322,6 @@
<if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR},
</if>
<if test="followPeople != null">
follow_people = #{followPeople,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
@ -356,22 +339,20 @@
project_id = #{projectId,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR},
follow_people = #{followPeople,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReview">
update test_case_review
set `name` = #{name,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR},
follow_people = #{followPeople,jdbcType=VARCHAR}
set `name` = #{name,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestPlanFollow;
import io.metersphere.base.domain.TestPlanFollowExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestPlanFollowMapper {
long countByExample(TestPlanFollowExample example);
int deleteByExample(TestPlanFollowExample example);
int insert(TestPlanFollow record);
int insertSelective(TestPlanFollow record);
List<TestPlanFollow> selectByExample(TestPlanFollowExample example);
int updateByExampleSelective(@Param("record") TestPlanFollow record, @Param("example") TestPlanFollowExample example);
int updateByExample(@Param("record") TestPlanFollow record, @Param("example") TestPlanFollowExample example);
}

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.base.mapper.TestPlanFollowMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestPlanFollow">
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId"/>
<result column="follow_id" jdbcType="VARCHAR" property="followId"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
test_plan_id
, follow_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestPlanFollowExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from test_plan_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestPlanFollowExample">
delete from test_plan_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestPlanFollow">
insert into test_plan_follow (test_plan_id, follow_id)
values (#{testPlanId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanFollow">
insert into test_plan_follow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="testPlanId != null">
test_plan_id,
</if>
<if test="followId != null">
follow_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
<if test="followId != null">
#{followId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestPlanFollowExample"
resultType="java.lang.Long">
select count(*) from test_plan_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_plan_follow
<set>
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
<if test="record.followId != null">
follow_id = #{record.followId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_plan_follow
set test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
follow_id = #{record.followId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
</mapper>

View File

@ -21,7 +21,6 @@
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="execution_times" jdbcType="INTEGER" property="executionTimes" />
<result column="automatic_status_update" jdbcType="BIT" property="automaticStatusUpdate" />
<result column="follow_people" jdbcType="VARCHAR" property="followPeople" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlanWithBLOBs">
<result column="tags" jdbcType="LONGVARCHAR" property="tags" />
@ -87,10 +86,10 @@
</where>
</sql>
<sql id="Base_Column_List">
id, workspace_id, report_id, `name`, description, `status`, stage, test_case_match_rule,
id
, workspace_id, report_id, `name`, description, `status`, stage, test_case_match_rule,
executor_match_rule, create_time, update_time, actual_end_time, planned_start_time,
planned_end_time, actual_start_time, creator, project_id, execution_times, automatic_status_update,
follow_people
planned_end_time, actual_start_time, creator, project_id, execution_times, automatic_status_update
</sql>
<sql id="Blob_Column_List">
tags, report_summary, report_config
@ -144,22 +143,22 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestPlanWithBLOBs">
insert into test_plan (id, workspace_id, report_id,
`name`, description, `status`,
stage, test_case_match_rule, executor_match_rule,
create_time, update_time, actual_end_time,
planned_start_time, planned_end_time, actual_start_time,
creator, project_id, execution_times,
automatic_status_update, follow_people, tags,
report_summary, report_config)
values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{stage,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR}, #{executorMatchRule,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{actualEndTime,jdbcType=BIGINT},
#{plannedStartTime,jdbcType=BIGINT}, #{plannedEndTime,jdbcType=BIGINT}, #{actualStartTime,jdbcType=BIGINT},
#{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{executionTimes,jdbcType=INTEGER},
#{automaticStatusUpdate,jdbcType=BIT}, #{followPeople,jdbcType=VARCHAR}, #{tags,jdbcType=LONGVARCHAR},
#{reportSummary,jdbcType=LONGVARCHAR}, #{reportConfig,jdbcType=LONGVARCHAR})
insert into test_plan (id, workspace_id, report_id,
`name`, description, `status`,
stage, test_case_match_rule, executor_match_rule,
create_time, update_time, actual_end_time,
planned_start_time, planned_end_time, actual_start_time,
creator, project_id, execution_times,
automatic_status_update, tags, report_summary,
report_config)
values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{stage,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR}, #{executorMatchRule,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{actualEndTime,jdbcType=BIGINT},
#{plannedStartTime,jdbcType=BIGINT}, #{plannedEndTime,jdbcType=BIGINT}, #{actualStartTime,jdbcType=BIGINT},
#{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{executionTimes,jdbcType=INTEGER},
#{automaticStatusUpdate,jdbcType=BIT}, #{tags,jdbcType=LONGVARCHAR}, #{reportSummary,jdbcType=LONGVARCHAR},
#{reportConfig,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanWithBLOBs">
insert into test_plan
@ -221,9 +220,6 @@
<if test="automaticStatusUpdate != null">
automatic_status_update,
</if>
<if test="followPeople != null">
follow_people,
</if>
<if test="tags != null">
tags,
</if>
@ -292,9 +288,6 @@
<if test="automaticStatusUpdate != null">
#{automaticStatusUpdate,jdbcType=BIT},
</if>
<if test="followPeople != null">
#{followPeople,jdbcType=VARCHAR},
</if>
<if test="tags != null">
#{tags,jdbcType=LONGVARCHAR},
</if>
@ -372,9 +365,6 @@
<if test="record.automaticStatusUpdate != null">
automatic_status_update = #{record.automaticStatusUpdate,jdbcType=BIT},
</if>
<if test="record.followPeople != null">
follow_people = #{record.followPeople,jdbcType=VARCHAR},
</if>
<if test="record.tags != null">
tags = #{record.tags,jdbcType=LONGVARCHAR},
</if>
@ -410,7 +400,6 @@
project_id = #{record.projectId,jdbcType=VARCHAR},
execution_times = #{record.executionTimes,jdbcType=INTEGER},
automatic_status_update = #{record.automaticStatusUpdate,jdbcType=BIT},
follow_people = #{record.followPeople,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=LONGVARCHAR},
report_summary = #{record.reportSummary,jdbcType=LONGVARCHAR},
report_config = #{record.reportConfig,jdbcType=LONGVARCHAR}
@ -421,25 +410,24 @@
<update id="updateByExample" parameterType="map">
update test_plan
set id = #{record.id,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
report_id = #{record.reportId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
stage = #{record.stage,jdbcType=VARCHAR},
test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR},
executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
actual_end_time = #{record.actualEndTime,jdbcType=BIGINT},
planned_start_time = #{record.plannedStartTime,jdbcType=BIGINT},
planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT},
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR},
execution_times = #{record.executionTimes,jdbcType=INTEGER},
automatic_status_update = #{record.automaticStatusUpdate,jdbcType=BIT},
follow_people = #{record.followPeople,jdbcType=VARCHAR}
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
report_id = #{record.reportId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
stage = #{record.stage,jdbcType=VARCHAR},
test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR},
executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
actual_end_time = #{record.actualEndTime,jdbcType=BIGINT},
planned_start_time = #{record.plannedStartTime,jdbcType=BIGINT},
planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT},
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR},
execution_times = #{record.executionTimes,jdbcType=INTEGER},
automatic_status_update = #{record.automaticStatusUpdate,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -501,9 +489,6 @@
<if test="automaticStatusUpdate != null">
automatic_status_update = #{automaticStatusUpdate,jdbcType=BIT},
</if>
<if test="followPeople != null">
follow_people = #{followPeople,jdbcType=VARCHAR},
</if>
<if test="tags != null">
tags = #{tags,jdbcType=LONGVARCHAR},
</if>
@ -536,7 +521,6 @@
project_id = #{projectId,jdbcType=VARCHAR},
execution_times = #{executionTimes,jdbcType=INTEGER},
automatic_status_update = #{automaticStatusUpdate,jdbcType=BIT},
follow_people = #{followPeople,jdbcType=VARCHAR},
tags = #{tags,jdbcType=LONGVARCHAR},
report_summary = #{reportSummary,jdbcType=LONGVARCHAR},
report_config = #{reportConfig,jdbcType=LONGVARCHAR}
@ -544,25 +528,24 @@
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlan">
update test_plan
set workspace_id = #{workspaceId,jdbcType=VARCHAR},
report_id = #{reportId,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
stage = #{stage,jdbcType=VARCHAR},
test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR},
executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
actual_end_time = #{actualEndTime,jdbcType=BIGINT},
planned_start_time = #{plannedStartTime,jdbcType=BIGINT},
planned_end_time = #{plannedEndTime,jdbcType=BIGINT},
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
creator = #{creator,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR},
execution_times = #{executionTimes,jdbcType=INTEGER},
automatic_status_update = #{automaticStatusUpdate,jdbcType=BIT},
follow_people = #{followPeople,jdbcType=VARCHAR}
set workspace_id = #{workspaceId,jdbcType=VARCHAR},
report_id = #{reportId,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
stage = #{stage,jdbcType=VARCHAR},
test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR},
executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
actual_end_time = #{actualEndTime,jdbcType=BIGINT},
planned_start_time = #{plannedStartTime,jdbcType=BIGINT},
planned_end_time = #{plannedEndTime,jdbcType=BIGINT},
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
creator = #{creator,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR},
execution_times = #{executionTimes,jdbcType=INTEGER},
automatic_status_update = #{automaticStatusUpdate,jdbcType=BIT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -4,13 +4,13 @@
<select id="list" resultType="io.metersphere.track.dto.TestCaseReviewDTO"
parameterType="io.metersphere.track.request.testreview.QueryCaseReviewRequest">
select distinct test_case_review.id, test_case_review.name, test_case_review.creator, test_case_review.status,
select distinct test_case_review.id, test_case_review.name, test_case_review.creator, test_case_review.status,
test_case_review.tags,
test_case_review.create_time, test_case_review.update_time, test_case_review.end_time,
test_case_review.description, user.name as creatorName, project.name as projectName, test_case_review.project_id,
test_case_review.follow_people
test_case_review.description, user.name as creatorName, project.name as projectName, test_case_review.project_id
from test_case_review
join project on project.id = test_case_review.project_id
join project on project.id = test_case_review.project_id
left join user on test_case_review.creator = user.id
<include refid="queryWhereCondition"/>
<if test="request.orders != null and request.orders.size() > 0">

View File

@ -0,0 +1,33 @@
package io.metersphere.service;
import io.metersphere.base.domain.TestPlanFollow;
import io.metersphere.base.domain.TestPlanFollowExample;
import io.metersphere.base.mapper.TestPlanFollowMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
@Service
@Transactional(rollbackFor = Exception.class)
public class TestPlanFollowService {
@Resource
private TestPlanFollowMapper testPlanFollowMapper;
public void deleteTestPlanFollowByPlanId(String planId) {
if (StringUtils.isBlank(planId)) {
return;
}
TestPlanFollowExample example = new TestPlanFollowExample();
example.createCriteria().andTestPlanIdEqualTo(planId);
testPlanFollowMapper.deleteByExample(example);
}
public TestPlanFollow insert(TestPlanFollow testPlanFollow) {
testPlanFollowMapper.insert(testPlanFollow);
return testPlanFollow;
}
}

View File

@ -63,6 +63,11 @@ public class TestCaseReviewController {
return testCaseReviewService.getUserByReviewId(request);
}
@PostMapping("/follow")
public List<User> getFollowByReviewId(@RequestBody TestCaseReview request) {
return testCaseReviewService.getFollowByReviewId(request);
}
@GetMapping("/recent/{count}")
public List<TestCaseReviewDTO> recentTestPlans(@PathVariable int count) {
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();

View File

@ -256,4 +256,9 @@ public class TestPlanController {
public List<User> getPlanPrincipal(@PathVariable String planId) {
return testPlanService.getPlanPrincipal(planId);
}
@GetMapping("/follow/{planId}")
public List<User> getPlanFollow(@PathVariable String planId) {
return testPlanService.getPlanFollow(planId);
}
}

View File

@ -13,6 +13,7 @@ public class TestPlanDTO extends TestPlanWithBLOBs {
private String userName;
private List<String> projectIds;
private List<String> principals;
private List<String> follows;
/**
* 定时任务ID
*/

View File

@ -11,4 +11,5 @@ import java.util.List;
public class AddTestPlanRequest extends TestPlanWithBLOBs {
private List<String> projectIds;
private List<String> principals;
private List<String> follows;
}

View File

@ -11,4 +11,5 @@ import java.util.List;
public class SaveTestCaseReviewRequest extends TestCaseReview {
private List<String> projectIds;
private List<String> userIds;
private List<String> followIds;
}

View File

@ -53,6 +53,8 @@ public class TestCaseReviewService {
@Resource
private TestCaseReviewUsersMapper testCaseReviewUsersMapper;
@Resource
private TestCaseReviewFollowMapper testCaseReviewFollowMapper;
@Resource
private TestCaseReviewMapper testCaseReviewMapper;
@Resource
private ExtTestCaseReviewMapper extTestCaseReviewMapper;
@ -91,6 +93,15 @@ public class TestCaseReviewService {
testCaseReviewUsersMapper.insert(testCaseReviewUsers);
});
List<String> follows = reviewRequest.getFollowIds();//关注人
follows.forEach(followId -> {
TestCaseReviewFollow testCaseReviewFollow = new TestCaseReviewFollow();
testCaseReviewFollow.setReviewId(reviewId);
testCaseReviewFollow.setFollowId(followId);
testCaseReviewFollowMapper.insert(testCaseReviewFollow);
});
reviewRequest.setId(reviewId);
reviewRequest.setCreateUser(SessionUtils.getUserId());
reviewRequest.setCreateTime(System.currentTimeMillis());
@ -190,12 +201,34 @@ public class TestCaseReviewService {
return new ArrayList<>();
}
public List<User> getFollowByReviewId(TestCaseReview request) {
String reviewId = request.getId();
TestCaseReviewFollowExample testCaseReviewFollowExample = new TestCaseReviewFollowExample();
testCaseReviewFollowExample.createCriteria().andReviewIdEqualTo(reviewId);
List<TestCaseReviewFollow> testCaseReviewFollows = testCaseReviewFollowMapper.selectByExample(testCaseReviewFollowExample);
List<String> userIds = testCaseReviewFollows
.stream()
.map(TestCaseReviewFollow::getFollowId)
.collect(Collectors.toList());
UserExample userExample = new UserExample();
UserExample.Criteria criteria = userExample.createCriteria();
if (!CollectionUtils.isEmpty(userIds)) {
criteria.andIdIn(userIds);
return userMapper.selectByExample(userExample);
}
return new ArrayList<>();
}
public List<TestCaseReviewDTO> recent(String currentWorkspaceId) {
return extTestCaseReviewMapper.listByWorkspaceId(currentWorkspaceId, SessionUtils.getUserId(), SessionUtils.getCurrentProjectId());
}
public TestCaseReview editCaseReview(SaveTestCaseReviewRequest testCaseReview) {
editCaseReviewer(testCaseReview);
editCaseRevieweFollow(testCaseReview);
testCaseReview.setUpdateTime(System.currentTimeMillis());
checkCaseReviewExist(testCaseReview);
testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);
@ -226,6 +259,30 @@ public class TestCaseReviewService {
testCaseReviewUsersMapper.deleteByExample(example);
}
private void editCaseRevieweFollow(SaveTestCaseReviewRequest testCaseReview) {
// 要更新的follows
List<String> follows = testCaseReview.getFollowIds();
String id = testCaseReview.getId();
TestCaseReviewFollowExample testCaseReviewfollowExample = new TestCaseReviewFollowExample();
testCaseReviewfollowExample.createCriteria().andReviewIdEqualTo(id);
List<TestCaseReviewFollow> testCaseReviewFollows = testCaseReviewFollowMapper.selectByExample(testCaseReviewfollowExample);
List<String> dbReviewIds = testCaseReviewFollows.stream().map(TestCaseReviewFollow::getFollowId).collect(Collectors.toList());
follows.forEach(followId -> {
if (!dbReviewIds.contains(followId)) {
TestCaseReviewFollow caseReviewFollow = new TestCaseReviewFollow();
caseReviewFollow.setFollowId(followId);
caseReviewFollow.setReviewId(id);
testCaseReviewFollowMapper.insertSelective(caseReviewFollow);
}
});
TestCaseReviewFollowExample example = new TestCaseReviewFollowExample();
example.createCriteria().andReviewIdEqualTo(id).andFollowIdNotIn(follows);
testCaseReviewFollowMapper.deleteByExample(example);
}
private void checkCaseReviewExist(TestCaseReview testCaseReview) {
if (testCaseReview.getName() != null) {
TestCaseReviewExample example = new TestCaseReviewExample();
@ -247,6 +304,7 @@ public class TestCaseReviewService {
public void deleteCaseReview(String reviewId) {
deleteCaseReviewProject(reviewId);
deleteCaseReviewUsers(reviewId);
deleteCaseReviewFollow(reviewId);
deleteCaseReviewTestCase(reviewId);
testCaseReviewMapper.deleteByPrimaryKey(reviewId);
}
@ -263,6 +321,12 @@ public class TestCaseReviewService {
testCaseReviewUsersMapper.deleteByExample(testCaseReviewUsersExample);
}
private void deleteCaseReviewFollow(String reviewId) {
TestCaseReviewFollowExample testCaseReviewFollowExample = new TestCaseReviewFollowExample();
testCaseReviewFollowExample.createCriteria().andReviewIdEqualTo(reviewId);
testCaseReviewFollowMapper.deleteByExample(testCaseReviewFollowExample);
}
private void deleteCaseReviewTestCase(String reviewId) {
TestCaseReviewTestCaseExample testCaseReviewTestCaseExample = new TestCaseReviewTestCaseExample();
testCaseReviewTestCaseExample.createCriteria().andReviewIdEqualTo(reviewId);
@ -589,6 +653,19 @@ public class TestCaseReviewService {
DetailColumn column = new DetailColumn("评审人", "reviewUser", String.join(",", userNames), null);
columns.add(column);
TestCaseReviewFollowExample testCaseReviewFollowExample = new TestCaseReviewFollowExample();
testCaseReviewFollowExample.createCriteria().andReviewIdEqualTo(reviewId);
List<TestCaseReviewFollow> testCaseReviewFollows = testCaseReviewFollowMapper.selectByExample(testCaseReviewFollowExample);
List<String> follows = testCaseReviewFollows.stream().map(TestCaseReviewFollow::getFollowId).collect(Collectors.toList());
//UserExample example = new UserExample();
example.createCriteria().andIdIn(follows);
List<User> follow = userMapper.selectByExample(example);
List<String> followNames = follow.stream().map(User::getName).collect(Collectors.toList());
DetailColumn columnFollow = new DetailColumn("关注人", "reviewFollow", String.join(",", followNames), null);
columns.add(columnFollow);
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(id), review.getProjectId(), review.getName(), review.getCreateUser(), columns);
return JSON.toJSONString(details);
}

View File

@ -47,10 +47,7 @@ import io.metersphere.performance.service.MetricQueryService;
import io.metersphere.performance.service.PerformanceReportService;
import io.metersphere.performance.service.PerformanceTestService;
import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.service.IssueTemplateService;
import io.metersphere.service.ScheduleService;
import io.metersphere.service.SystemParameterService;
import io.metersphere.service.TestPlanPrincipalService;
import io.metersphere.service.*;
import io.metersphere.track.Factory.ReportComponentFactory;
import io.metersphere.track.domain.ReportComponent;
import io.metersphere.track.dto.*;
@ -188,6 +185,10 @@ public class TestPlanService {
private TestPlanPrincipalService testPlanPrincipalService;
@Resource
private TestPlanPrincipalMapper testPlanPrincipalMapper;
@Resource
private TestPlanFollowService testPlanFollowService;
@Resource
private TestPlanFollowMapper testPlanFollowMapper;
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
@ -211,6 +212,15 @@ public class TestPlanService {
}
}
List<String> follows = testPlan.getFollows();
if (!CollectionUtils.isEmpty(follows)) {
for (String follow : follows) {
TestPlanFollow testPlanFollow = new TestPlanFollow();
testPlanFollow.setTestPlanId(planId);
testPlanFollow.setFollowId(follow);
testPlanFollowService.insert(testPlanFollow);
}
}
if (StringUtils.isBlank(testPlan.getProjectId())) {
testPlan.setProjectId(SessionUtils.getCurrentProjectId());
}
@ -244,6 +254,18 @@ public class TestPlanService {
}
}
}
List<String> follows = request.getFollows();
if (!CollectionUtils.isEmpty(follows)) {
if (StringUtils.isNotBlank(request.getId())) {
testPlanFollowService.deleteTestPlanFollowByPlanId(request.getId());
for (String follow : follows) {
TestPlanFollow testPlanFollow = new TestPlanFollow();
testPlanFollow.setTestPlanId(request.getId());
testPlanFollow.setFollowId(follow);
testPlanFollowService.insert(testPlanFollow);
}
}
}
return this.editTestPlan(request);
}
@ -360,6 +382,7 @@ public class TestPlanService {
public int deleteTestPlan(String planId) {
testPlanPrincipalService.deleteTestPlanPrincipalByPlanId(planId);
testPlanFollowService.deleteTestPlanFollowByPlanId(planId);
deleteTestCaseByPlanId(planId);
testPlanApiCaseService.deleteByPlanId(planId);
testPlanScenarioCaseService.deleteByPlanId(planId);
@ -2050,4 +2073,21 @@ public class TestPlanService {
userExample.createCriteria().andIdIn(userIds);
return userMapper.selectByExample(userExample);
}
public List<User> getPlanFollow(String planId) {
List<User> result = new ArrayList<>();
if (StringUtils.isBlank(planId)) {
return result;
}
TestPlanFollowExample example = new TestPlanFollowExample();
example.createCriteria().andTestPlanIdEqualTo(planId);
List<TestPlanFollow> testPlanFollow = testPlanFollowMapper.selectByExample(example);
List<String> userIds = testPlanFollow.stream().map(TestPlanFollow::getFollowId).distinct().collect(Collectors.toList());
if (CollectionUtils.isEmpty(userIds)) {
return result;
}
UserExample userExample = new UserExample();
userExample.createCriteria().andIdIn(userIds);
return userMapper.selectByExample(userExample);
}
}

View File

@ -330,13 +330,51 @@ delete from user_group_permission where module_id = 'SYSTEM_ORGANIZATION';
insert into system_parameter (param_key, param_value, type, sort) values ('project.jar.limit.size', 1, 'text', 1);
ALTER TABLE quota
DROP COLUMN organization_id;
DROP
COLUMN organization_id;
ALTER TABLE service_integration
DROP COLUMN organization_id;
DROP
COLUMN organization_id;
ALTER TABLE workspace
DROP COLUMN organization_id;
DROP
COLUMN organization_id;
DROP TABLE IF EXISTS `test_plan_follow`;
CREATE TABLE `test_plan_follow`
(
`test_plan_id` varchar(50) DEFAULT NULL,
`follow_id` varchar(50) DEFAULT NULL COMMENT '关注人',
UNIQUE KEY `test_plan_principal_pk` (`test_plan_id`,`follow_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO test_plan_follow
SELECT id, follow_people
FROM test_plan
WHERE follow_people IS NOT NULL;
ALTER TABLE test_plan
DROP
COLUMN follow_people;
DROP TABLE IF EXISTS `test_case_review_follow`;
CREATE TABLE `test_case_review_follow`
(
`review_id` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
`follow_id` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关注人',
UNIQUE KEY `test_case_review_users_pk` (`review_id`,`follow_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT=' review and user association table';
INSERT INTO test_case_review_follow
SELECT id, follow_people
FROM test_case_review
WHERE follow_people IS NOT NULL;
ALTER TABLE test_case_review
DROP
COLUMN follow_people;
ALTER TABLE api_test_case ADD COLUMN case_status VARCHAR(100) comment '用例状态等同场景的status';
UPDATE api_test_case set case_status ="Underway" where case_status is null;
@ -412,4 +450,5 @@ INSERT INTO test_case_follow
SELECT id, follow_people
FROM test_case
WHERE follow_people IS NOT NULL AND follow_people != '';
ALTER TABLE test_case DROP COLUMN follow_people;
ALTER TABLE test_case DROP COLUMN follow_people;

View File

@ -67,7 +67,7 @@
<!--<table tableName="test_plan_test_case"/>-->
<!--<table tableName="swagger_url_project"/>
<table tableName="user_header"/>-->
<!--<table tableName="test_plan_api_scenario"/>-->
<!--<table tableName="test_plan"/>-->
<!--<table tableName="test_plan"/>-->
<!--<table tableName="api_scenario_report"/>-->
<!--<table tableName="test_case_review"/>-->

View File

@ -576,7 +576,7 @@ export default {
type: action,
api: api,
});
if(action === "ADD") {
if (action === "ADD") {
this.activeTab = "api";
}
this.apiDefaultTab = newTabName;

View File

@ -90,14 +90,14 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('test_track.plan.follow_people')" :label-width="formLabelWidth"
prop="followPeople">
<el-select v-model="form.followPeople"
prop="follows">
<el-select v-model="form.follows"
clearable
:placeholder="$t('test_track.plan.follow_people')" filterable size="small">
:placeholder="$t('test_track.plan.follow_people')" filterable multiple size="small">
<el-option
v-for="item in maintainerOptions"
v-for="(item) in principalOptions"
:key="item.id"
:label="item.id + ' (' + item.name + ')'"
:label="item.name + '(' + item.id + ')'"
:value="item.id">
</el-option>
</el-select>
@ -174,7 +174,8 @@ export default {
description: '',
plannedStartTime: '',
plannedEndTime: '',
automaticStatusUpdate: false
automaticStatusUpdate: false,
follows: []
},
rules: {
name: [
@ -188,23 +189,13 @@ export default {
formLabelWidth: "100px",
operationType: '',
principalOptions: [],
maintainerOptions: [],
};
},
created() {
//
this.form.stage = 'smoke';
this.getSelectOptions();
},
methods: {
getMaintainerOptions() {
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()}, response => {
this.maintainerOptions = response.data;
});
},
getSelectOptions() {
this.getMaintainerOptions();
},
reload() {
this.isStepTableAlive = false;
this.$nextTick(() => (this.isStepTableAlive = true));
@ -224,7 +215,6 @@ export default {
}
listenGoBack(this.close);
this.dialogFormVisible = true;
this.getSelectOptions();
this.reload();
},
testPlanInfo() {
@ -309,6 +299,7 @@ export default {
this.form.name = '';
this.form.projectIds = [];
this.form.principals = [];
this.form.follows = [];
this.form.automaticStatusUpdate = false;
this.form.stage = 'smoke';
this.form.description = '';

View File

@ -75,8 +75,8 @@
</template>
</el-table-column>
<el-table-column
v-if="item.id=='followPeople'"
prop="followPeople"
v-if="item.id=='follow'"
prop="follow"
:label="$t('test_track.plan.follow_people')"
show-overflow-tooltip
:key="index"
@ -383,6 +383,24 @@ export default {
// id
this.$set(item, "principals", principalIds);
})
//
this.$get("/test/plan/follow/" + item.id, res => {
let data = res.data;
let follow = "";
let followIds = data.map(d => d.id);
if (data) {
data.forEach(d => {
if (follow !== "") {
follow = follow + "、" + d.name;
} else {
follow = follow + d.name;
}
})
}
this.$set(item, "follow", follow);
// id
this.$set(item, "follows", followIds);
})
});
});
getLabel(this, TEST_PLAN_LIST);

View File

@ -48,14 +48,14 @@
</el-col>
<el-col :span="12" :offset="1">
<el-form-item :label="$t('test_track.review.review_follow_people')" :label-width="formLabelWidth"
prop="followPeople">
<el-select v-model="form.followPeople"
clearable
prop="followIds">
<el-select v-model="form.followIds"
clearable multiple
:placeholder="$t('test_track.review.review_follow_people')" filterable size="small">
<el-option
v-for="item in maintainerOptions"
v-for="item in reviewerOptions"
:key="item.id"
:label="item.id + ' (' + item.name + ')'"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
@ -134,7 +134,7 @@ export default {
stage: '',
description: '',
endTime: '',
followPeople: '',
followIds: [],
},
dbProjectIds: [],
rules: {
@ -151,7 +151,6 @@ export default {
formLabelWidth: "100px",
operationType: '',
reviewerOptions: [],
maintainerOptions: [],
};
},
computed: {
@ -159,18 +158,7 @@ export default {
return getCurrentProjectID();
}
},
mounted() {
this.getSelectOptions();
},
methods: {
getSelectOptions(){
this.getMaintainerOptions();
},
getMaintainerOptions() {
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()}, response => {
this.maintainerOptions = response.data;
});
},
reload() {
this.isStepTableAlive = false;
this.$nextTick(() => (this.isStepTableAlive = true));
@ -189,7 +177,7 @@ export default {
} else {
this.form.tags = [];
}
this.getSelectOptions();
listenGoBack(this.close);
this.dialogFormVisible = true;
this.reload();
@ -284,6 +272,7 @@ export default {
this.form.status = null;
this.form.projectIds = [];
this.form.userIds = [];
this.form.followIds = [];
return true;
});
}

View File

@ -66,8 +66,8 @@
</template>
</el-table-column>
<el-table-column
v-if="item.id=='followPeople'"
prop="followPeople"
v-if="item.id=='follow'"
prop="follow"
:label="$t('test_track.review.review_follow_people')"
show-overflow-tooltip
:key="index"
@ -231,6 +231,13 @@ export default {
this.$set(this.tableData[i], "reviewer", reviewer);
this.$set(this.tableData[i], "userIds", userIds);
});
this.$post('/test/case/review/follow', {id: this.tableData[i].id}, res => {
let arr = res.data;
let follow = arr.map(data => data.name).join("、");
let followIds = arr.map(data => data.id);
this.$set(this.tableData[i], "follow", follow);
this.$set(this.tableData[i], "followIds", followIds);
});
}
});
getLabel(this, TEST_CASE_REVIEW_LIST);