buidl:functional domain and add functional test

This commit is contained in:
WangXu10 2023-06-01 11:55:52 +08:00 committed by jianxing
parent fa0d4e079b
commit af2e346c1d
76 changed files with 3931 additions and 573 deletions

View File

@ -1,5 +1,23 @@
-- set innodb lock wait timeout
SET SESSION innodb_lock_wait_timeout = 7200;
CREATE TABLE IF NOT EXISTS case_review(
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
`name` VARCHAR(200) NOT NULL COMMENT '名称' ,
`status` VARCHAR(64) NOT NULL DEFAULT 'Prepare' COMMENT '评审状态:未开始/进行中/已完成/已结束/已归档' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
`end_time` BIGINT NOT NULL COMMENT '评审结束时间' ,
`description` TEXT COMMENT '描述' ,
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
`tags` VARCHAR(1000) COMMENT '标签' ,
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
`review_pass_rule` VARCHAR(64) NOT NULL DEFAULT 'Single' COMMENT '评审规则:单人通过/全部通过' ,
PRIMARY KEY (id)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '用例评审';
-- set innodb lock wait timeout to default
SET SESSION innodb_lock_wait_timeout = DEFAULT;

View File

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@ -13,11 +15,6 @@ public class CaseReview implements Serializable {
@Size(min = 1, max = 50, message = "{case_review.id.length_range}", groups = {Created.class, Updated.class})
private String id;
@Schema(title = "评审规则:单人通过/全部通过", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review.review_pass_rule.not_blank}", groups = {Created.class})
@Size(min = 1, max = 64, message = "{case_review.review_pass_rule.length_range}", groups = {Created.class, Updated.class})
private String reviewPassRule;
@Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 200, message = "{case_review.name.length_range}", groups = {Created.class, Updated.class})
@ -35,7 +32,6 @@ public class CaseReview implements Serializable {
private Long updateTime;
@Schema(title = "评审结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{case_review.end_time.not_blank}", groups = {Created.class})
private Long endTime;
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -49,6 +45,11 @@ public class CaseReview implements Serializable {
@Schema(title = "创建人")
private String createUser;
@Schema(title = "评审规则:单人通过/全部通过", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review.review_pass_rule.not_blank}", groups = {Created.class})
@Size(min = 1, max = 64, message = "{case_review.review_pass_rule.length_range}", groups = {Created.class, Updated.class})
private String reviewPassRule;
@Schema(title = "描述")
private String description;

View File

@ -174,76 +174,6 @@ public class CaseReviewExample {
return (Criteria) this;
}
public Criteria andReviewPassRuleIsNull() {
addCriterion("review_pass_rule is null");
return (Criteria) this;
}
public Criteria andReviewPassRuleIsNotNull() {
addCriterion("review_pass_rule is not null");
return (Criteria) this;
}
public Criteria andReviewPassRuleEqualTo(String value) {
addCriterion("review_pass_rule =", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotEqualTo(String value) {
addCriterion("review_pass_rule <>", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleGreaterThan(String value) {
addCriterion("review_pass_rule >", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleGreaterThanOrEqualTo(String value) {
addCriterion("review_pass_rule >=", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLessThan(String value) {
addCriterion("review_pass_rule <", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLessThanOrEqualTo(String value) {
addCriterion("review_pass_rule <=", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLike(String value) {
addCriterion("review_pass_rule like", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotLike(String value) {
addCriterion("review_pass_rule not like", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleIn(List<String> values) {
addCriterion("review_pass_rule in", values, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotIn(List<String> values) {
addCriterion("review_pass_rule not in", values, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleBetween(String value1, String value2) {
addCriterion("review_pass_rule between", value1, value2, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotBetween(String value1, String value2) {
addCriterion("review_pass_rule not between", value1, value2, "reviewPassRule");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
@ -773,6 +703,76 @@ public class CaseReviewExample {
addCriterion("create_user not between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andReviewPassRuleIsNull() {
addCriterion("review_pass_rule is null");
return (Criteria) this;
}
public Criteria andReviewPassRuleIsNotNull() {
addCriterion("review_pass_rule is not null");
return (Criteria) this;
}
public Criteria andReviewPassRuleEqualTo(String value) {
addCriterion("review_pass_rule =", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotEqualTo(String value) {
addCriterion("review_pass_rule <>", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleGreaterThan(String value) {
addCriterion("review_pass_rule >", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleGreaterThanOrEqualTo(String value) {
addCriterion("review_pass_rule >=", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLessThan(String value) {
addCriterion("review_pass_rule <", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLessThanOrEqualTo(String value) {
addCriterion("review_pass_rule <=", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleLike(String value) {
addCriterion("review_pass_rule like", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotLike(String value) {
addCriterion("review_pass_rule not like", value, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleIn(List<String> values) {
addCriterion("review_pass_rule in", values, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotIn(List<String> values) {
addCriterion("review_pass_rule not in", values, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleBetween(String value1, String value2) {
addCriterion("review_pass_rule between", value1, value2, "reviewPassRule");
return (Criteria) this;
}
public Criteria andReviewPassRuleNotBetween(String value1, String value2) {
addCriterion("review_pass_rule not between", value1, value2, "reviewPassRule");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class CaseReviewFollow implements Serializable {
@Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_follow.review_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_follow.review_id.length_range}", groups = {Created.class, Updated.class})
private String reviewId;
@Schema(title = "关注人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_follow.follow_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_follow.follow_id.length_range}", groups = {Created.class, Updated.class})
private String followId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class CaseReviewFollowExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CaseReviewFollowExample() {
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

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@ -38,11 +40,11 @@ public class CaseReviewFunctionalCase implements Serializable {
private String createUser;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class})
@NotBlank(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class})
private Long pos;
@Schema(title = "关联的用例是否放入回收站", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class})
@NotBlank(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class})
private Boolean deleted;
private static final long serialVersionUID = 1L;

View File

@ -0,0 +1,29 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class CaseReviewFunctionalCaseUser implements Serializable {
@Schema(title = "功能用例和评审中间表的ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_functional_case_user.case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_functional_case_user.case_id.length_range}", groups = {Created.class, Updated.class})
private String caseId;
@Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_functional_case_user.review_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_functional_case_user.review_id.length_range}", groups = {Created.class, Updated.class})
private String reviewId;
@Schema(title = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_functional_case_user.user_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_functional_case_user.user_id.length_range}", groups = {Created.class, Updated.class})
private String userId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,410 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class CaseReviewFunctionalCaseUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CaseReviewFunctionalCaseUserExample() {
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 andCaseIdIsNull() {
addCriterion("case_id is null");
return (Criteria) this;
}
public Criteria andCaseIdIsNotNull() {
addCriterion("case_id is not null");
return (Criteria) this;
}
public Criteria andCaseIdEqualTo(String value) {
addCriterion("case_id =", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotEqualTo(String value) {
addCriterion("case_id <>", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdGreaterThan(String value) {
addCriterion("case_id >", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdGreaterThanOrEqualTo(String value) {
addCriterion("case_id >=", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLessThan(String value) {
addCriterion("case_id <", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLessThanOrEqualTo(String value) {
addCriterion("case_id <=", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLike(String value) {
addCriterion("case_id like", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotLike(String value) {
addCriterion("case_id not like", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdIn(List<String> values) {
addCriterion("case_id in", values, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotIn(List<String> values) {
addCriterion("case_id not in", values, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdBetween(String value1, String value2) {
addCriterion("case_id between", value1, value2, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotBetween(String value1, String value2) {
addCriterion("case_id not between", value1, value2, "caseId");
return (Criteria) this;
}
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 andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(String value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(String value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(String value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(String value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(String value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLike(String value) {
addCriterion("user_id like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotLike(String value) {
addCriterion("user_id not like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("user_id not between", value1, value2, "userId");
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.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class CaseReviewUser implements Serializable {
@Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_user.review_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_user.review_id.length_range}", groups = {Created.class, Updated.class})
private String reviewId;
@Schema(title = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{case_review_user.user_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{case_review_user.user_id.length_range}", groups = {Created.class, Updated.class})
private String userId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class CaseReviewUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CaseReviewUserExample() {
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 andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(String value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(String value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(String value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(String value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(String value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLike(String value) {
addCriterion("user_id like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotLike(String value) {
addCriterion("user_id not like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("user_id not between", value1, value2, "userId");
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,30 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class CustomFieldTestCase implements Serializable {
@Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{custom_field_test_case.resource_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{custom_field_test_case.resource_id.length_range}", groups = {Created.class, Updated.class})
private String resourceId;
@Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{custom_field_test_case.field_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{custom_field_test_case.field_id.length_range}", groups = {Created.class, Updated.class})
private String fieldId;
@Schema(title = "字段值")
private String value;
@Schema(title = "")
private String textValue;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,410 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class CustomFieldTestCaseExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CustomFieldTestCaseExample() {
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 andResourceIdIsNull() {
addCriterion("resource_id is null");
return (Criteria) this;
}
public Criteria andResourceIdIsNotNull() {
addCriterion("resource_id is not null");
return (Criteria) this;
}
public Criteria andResourceIdEqualTo(String value) {
addCriterion("resource_id =", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotEqualTo(String value) {
addCriterion("resource_id <>", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThan(String value) {
addCriterion("resource_id >", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThanOrEqualTo(String value) {
addCriterion("resource_id >=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThan(String value) {
addCriterion("resource_id <", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThanOrEqualTo(String value) {
addCriterion("resource_id <=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLike(String value) {
addCriterion("resource_id like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotLike(String value) {
addCriterion("resource_id not like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdIn(List<String> values) {
addCriterion("resource_id in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotIn(List<String> values) {
addCriterion("resource_id not in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdBetween(String value1, String value2) {
addCriterion("resource_id between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotBetween(String value1, String value2) {
addCriterion("resource_id not between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andFieldIdIsNull() {
addCriterion("field_id is null");
return (Criteria) this;
}
public Criteria andFieldIdIsNotNull() {
addCriterion("field_id is not null");
return (Criteria) this;
}
public Criteria andFieldIdEqualTo(String value) {
addCriterion("field_id =", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdNotEqualTo(String value) {
addCriterion("field_id <>", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdGreaterThan(String value) {
addCriterion("field_id >", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdGreaterThanOrEqualTo(String value) {
addCriterion("field_id >=", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdLessThan(String value) {
addCriterion("field_id <", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdLessThanOrEqualTo(String value) {
addCriterion("field_id <=", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdLike(String value) {
addCriterion("field_id like", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdNotLike(String value) {
addCriterion("field_id not like", value, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdIn(List<String> values) {
addCriterion("field_id in", values, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdNotIn(List<String> values) {
addCriterion("field_id not in", values, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdBetween(String value1, String value2) {
addCriterion("field_id between", value1, value2, "fieldId");
return (Criteria) this;
}
public Criteria andFieldIdNotBetween(String value1, String value2) {
addCriterion("field_id not between", value1, value2, "fieldId");
return (Criteria) this;
}
public Criteria andValueIsNull() {
addCriterion("`value` is null");
return (Criteria) this;
}
public Criteria andValueIsNotNull() {
addCriterion("`value` is not null");
return (Criteria) this;
}
public Criteria andValueEqualTo(String value) {
addCriterion("`value` =", value, "value");
return (Criteria) this;
}
public Criteria andValueNotEqualTo(String value) {
addCriterion("`value` <>", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThan(String value) {
addCriterion("`value` >", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThanOrEqualTo(String value) {
addCriterion("`value` >=", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThan(String value) {
addCriterion("`value` <", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThanOrEqualTo(String value) {
addCriterion("`value` <=", value, "value");
return (Criteria) this;
}
public Criteria andValueLike(String value) {
addCriterion("`value` like", value, "value");
return (Criteria) this;
}
public Criteria andValueNotLike(String value) {
addCriterion("`value` not like", value, "value");
return (Criteria) this;
}
public Criteria andValueIn(List<String> values) {
addCriterion("`value` in", values, "value");
return (Criteria) this;
}
public Criteria andValueNotIn(List<String> values) {
addCriterion("`value` not in", values, "value");
return (Criteria) this;
}
public Criteria andValueBetween(String value1, String value2) {
addCriterion("`value` between", value1, value2, "value");
return (Criteria) this;
}
public Criteria andValueNotBetween(String value1, String value2) {
addCriterion("`value` not between", value1, value2, "value");
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

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@ -14,7 +16,7 @@ public class FunctionalCase implements Serializable {
private String id;
@Schema(title = "业务ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case.num.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case.num.not_blank}", groups = {Created.class})
private Integer num;
@Schema(title = "自定义业务ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -51,7 +53,7 @@ public class FunctionalCase implements Serializable {
private String stepModel;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case.pos.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case.pos.not_blank}", groups = {Created.class})
private Long pos;
@Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED)
@ -70,15 +72,15 @@ public class FunctionalCase implements Serializable {
private String lastExecuteResult;
@Schema(title = "是否在回收站0-否1-是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case.deleted.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case.deleted.not_blank}", groups = {Created.class})
private Boolean deleted;
@Schema(title = "是否是公共用例0-否1-是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case.public_case.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case.public_case.not_blank}", groups = {Created.class})
private Boolean publicCase;
@Schema(title = "是否为最新版本0-否1-是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case.latest.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case.latest.not_blank}", groups = {Created.class})
private Boolean latest;
@Schema(title = "创建人")

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class FunctionalCaseAttachment implements Serializable {
@Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_attachment.functional_case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{functional_case_attachment.functional_case_id.length_range}", groups = {Created.class, Updated.class})
private String functionalCaseId;
@Schema(title = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_attachment.file_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{functional_case_attachment.file_id.length_range}", groups = {Created.class, Updated.class})
private String fileId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class FunctionalCaseAttachmentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public FunctionalCaseAttachmentExample() {
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 andFunctionalCaseIdIsNull() {
addCriterion("functional_case_id is null");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdIsNotNull() {
addCriterion("functional_case_id is not null");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdEqualTo(String value) {
addCriterion("functional_case_id =", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotEqualTo(String value) {
addCriterion("functional_case_id <>", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdGreaterThan(String value) {
addCriterion("functional_case_id >", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdGreaterThanOrEqualTo(String value) {
addCriterion("functional_case_id >=", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLessThan(String value) {
addCriterion("functional_case_id <", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLessThanOrEqualTo(String value) {
addCriterion("functional_case_id <=", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLike(String value) {
addCriterion("functional_case_id like", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotLike(String value) {
addCriterion("functional_case_id not like", value, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdIn(List<String> values) {
addCriterion("functional_case_id in", values, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotIn(List<String> values) {
addCriterion("functional_case_id not in", values, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdBetween(String value1, String value2) {
addCriterion("functional_case_id between", value1, value2, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotBetween(String value1, String value2) {
addCriterion("functional_case_id not between", value1, value2, "functionalCaseId");
return (Criteria) this;
}
public Criteria andFileIdIsNull() {
addCriterion("file_id is null");
return (Criteria) this;
}
public Criteria andFileIdIsNotNull() {
addCriterion("file_id is not null");
return (Criteria) this;
}
public Criteria andFileIdEqualTo(String value) {
addCriterion("file_id =", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotEqualTo(String value) {
addCriterion("file_id <>", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThan(String value) {
addCriterion("file_id >", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThanOrEqualTo(String value) {
addCriterion("file_id >=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThan(String value) {
addCriterion("file_id <", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThanOrEqualTo(String value) {
addCriterion("file_id <=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLike(String value) {
addCriterion("file_id like", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotLike(String value) {
addCriterion("file_id not like", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdIn(List<String> values) {
addCriterion("file_id in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotIn(List<String> values) {
addCriterion("file_id not in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdBetween(String value1, String value2) {
addCriterion("file_id between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotBetween(String value1, String value2) {
addCriterion("file_id not between", value1, value2, "fileId");
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

@ -1,25 +1,27 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class FunctionalCaseBlob implements Serializable {
@Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_blob.functional_case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{functional_case_blob.functional_case_id.length_range}", groups = {Created.class, Updated.class})
private String functionalCaseId;
@NotBlank(message = "{functional_case_blob.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{functional_case_blob.id.length_range}", groups = {Created.class, Updated.class})
private String id;
@Schema(title = "用例步骤JSON)step_model 为 0 时启用")
@Schema(title = "用例步骤JSON)step_model 为 Step 时启用")
private String steps;
@Schema(title = "步骤描述step_model 为 1 时启用")
@Schema(title = "步骤描述step_model 为 Text 时启用")
private String stepDescription;
@Schema(title = "预期结果step_model 为 1 时启用")
@Schema(title = "预期结果step_model 为 Text 时启用")
private String expectedResult;
@Schema(title = "前置条件")

View File

@ -104,73 +104,73 @@ public class FunctionalCaseBlobExample {
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andFunctionalCaseIdIsNull() {
addCriterion("functional_case_id is null");
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdIsNotNull() {
addCriterion("functional_case_id is not null");
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdEqualTo(String value) {
addCriterion("functional_case_id =", value, "functionalCaseId");
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotEqualTo(String value) {
addCriterion("functional_case_id <>", value, "functionalCaseId");
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdGreaterThan(String value) {
addCriterion("functional_case_id >", value, "functionalCaseId");
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdGreaterThanOrEqualTo(String value) {
addCriterion("functional_case_id >=", value, "functionalCaseId");
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLessThan(String value) {
addCriterion("functional_case_id <", value, "functionalCaseId");
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLessThanOrEqualTo(String value) {
addCriterion("functional_case_id <=", value, "functionalCaseId");
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdLike(String value) {
addCriterion("functional_case_id like", value, "functionalCaseId");
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotLike(String value) {
addCriterion("functional_case_id not like", value, "functionalCaseId");
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdIn(List<String> values) {
addCriterion("functional_case_id in", values, "functionalCaseId");
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotIn(List<String> values) {
addCriterion("functional_case_id not in", values, "functionalCaseId");
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdBetween(String value1, String value2) {
addCriterion("functional_case_id between", value1, value2, "functionalCaseId");
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andFunctionalCaseIdNotBetween(String value1, String value2) {
addCriterion("functional_case_id not between", value1, value2, "functionalCaseId");
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
}

View File

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@Data
public class FunctionalCaseFollow implements Serializable {
@Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_follow.case_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{functional_case_follow.case_id.length_range}", groups = {Created.class, Updated.class})
private String caseId;
@Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{functional_case_follow.follow_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{functional_case_follow.follow_id.length_range}", groups = {Created.class, Updated.class})
private String followId;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,340 @@
package io.metersphere.functional.domain;
import java.util.ArrayList;
import java.util.List;
public class FunctionalCaseFollowExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public FunctionalCaseFollowExample() {
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 andCaseIdIsNull() {
addCriterion("case_id is null");
return (Criteria) this;
}
public Criteria andCaseIdIsNotNull() {
addCriterion("case_id is not null");
return (Criteria) this;
}
public Criteria andCaseIdEqualTo(String value) {
addCriterion("case_id =", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotEqualTo(String value) {
addCriterion("case_id <>", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdGreaterThan(String value) {
addCriterion("case_id >", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdGreaterThanOrEqualTo(String value) {
addCriterion("case_id >=", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLessThan(String value) {
addCriterion("case_id <", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLessThanOrEqualTo(String value) {
addCriterion("case_id <=", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdLike(String value) {
addCriterion("case_id like", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotLike(String value) {
addCriterion("case_id not like", value, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdIn(List<String> values) {
addCriterion("case_id in", values, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotIn(List<String> values) {
addCriterion("case_id not in", values, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdBetween(String value1, String value2) {
addCriterion("case_id between", value1, value2, "caseId");
return (Criteria) this;
}
public Criteria andCaseIdNotBetween(String value1, String value2) {
addCriterion("case_id not between", value1, value2, "caseId");
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

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;
@ -27,7 +29,7 @@ public class FunctionalCaseModule implements Serializable {
private String parentId;
@Schema(title = "节点的层级", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case_module.level.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case_module.level.not_blank}", groups = {Created.class})
private Integer level;
@Schema(title = "创建时间")
@ -37,7 +39,7 @@ public class FunctionalCaseModule implements Serializable {
private Long updateTime;
@Schema(title = "同一节点下的顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{functional_case_module.pos.not_blank}", groups = {Created.class})
@NotBlank(message = "{functional_case_module.pos.not_blank}", groups = {Created.class})
private Long pos;
@Schema(title = "创建人")

View File

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;

View File

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;

View File

@ -1,8 +1,10 @@
package io.metersphere.functional.domain;
import io.metersphere.validation.groups.*;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import lombok.Data;

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.mapper;
import io.metersphere.functional.domain.CaseReviewFollow;
import io.metersphere.functional.domain.CaseReviewFollowExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CaseReviewFollowMapper {
long countByExample(CaseReviewFollowExample example);
int deleteByExample(CaseReviewFollowExample example);
int deleteByPrimaryKey(@Param("reviewId") String reviewId, @Param("followId") String followId);
int insert(CaseReviewFollow record);
int insertSelective(CaseReviewFollow record);
List<CaseReviewFollow> selectByExample(CaseReviewFollowExample example);
int updateByExampleSelective(@Param("record") CaseReviewFollow record, @Param("example") CaseReviewFollowExample example);
int updateByExample(@Param("record") CaseReviewFollow record, @Param("example") CaseReviewFollowExample 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.functional.mapper.CaseReviewFollowMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.CaseReviewFollow">
<id column="review_id" jdbcType="VARCHAR" property="reviewId" />
<id 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.functional.domain.CaseReviewFollowExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from case_review_follow
where review_id = #{reviewId,jdbcType=VARCHAR}
and follow_id = #{followId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.CaseReviewFollowExample">
delete from case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.CaseReviewFollow">
insert into case_review_follow (review_id, follow_id)
values (#{reviewId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.CaseReviewFollow">
insert into 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.functional.domain.CaseReviewFollowExample" resultType="java.lang.Long">
select count(*) from case_review_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update 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 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

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

View File

@ -0,0 +1,153 @@
<?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.functional.mapper.CaseReviewFunctionalCaseUserMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.CaseReviewFunctionalCaseUser">
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
<result column="review_id" jdbcType="VARCHAR" property="reviewId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
</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">
case_id, review_id, user_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.functional.domain.CaseReviewFunctionalCaseUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from case_review_functional_case_user
<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.functional.domain.CaseReviewFunctionalCaseUserExample">
delete from case_review_functional_case_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.CaseReviewFunctionalCaseUser">
insert into case_review_functional_case_user (case_id, review_id, user_id
)
values (#{caseId,jdbcType=VARCHAR}, #{reviewId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.CaseReviewFunctionalCaseUser">
insert into case_review_functional_case_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseId != null">
case_id,
</if>
<if test="reviewId != null">
review_id,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseId != null">
#{caseId,jdbcType=VARCHAR},
</if>
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.functional.domain.CaseReviewFunctionalCaseUserExample" resultType="java.lang.Long">
select count(*) from case_review_functional_case_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update case_review_functional_case_user
<set>
<if test="record.caseId != null">
case_id = #{record.caseId,jdbcType=VARCHAR},
</if>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update case_review_functional_case_user
set case_id = #{record.caseId,jdbcType=VARCHAR},
review_id = #{record.reviewId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

View File

@ -10,7 +10,7 @@ public interface CaseReviewMapper {
int deleteByExample(CaseReviewExample example);
int deleteByPrimaryKey(@Param("id") String id, @Param("reviewPassRule") String reviewPassRule);
int deleteByPrimaryKey(String id);
int insert(CaseReview record);
@ -20,7 +20,7 @@ public interface CaseReviewMapper {
List<CaseReview> selectByExample(CaseReviewExample example);
CaseReview selectByPrimaryKey(@Param("id") String id, @Param("reviewPassRule") String reviewPassRule);
CaseReview selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") CaseReview record, @Param("example") CaseReviewExample example);

View File

@ -3,7 +3,6 @@
<mapper namespace="io.metersphere.functional.mapper.CaseReviewMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.CaseReview">
<id column="id" jdbcType="VARCHAR" property="id" />
<id column="review_pass_rule" jdbcType="VARCHAR" property="reviewPassRule" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
@ -12,6 +11,7 @@
<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="review_pass_rule" jdbcType="VARCHAR" property="reviewPassRule" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.functional.domain.CaseReview">
<result column="description" jdbcType="LONGVARCHAR" property="description" />
@ -75,8 +75,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, review_pass_rule, `name`, `status`, create_time, update_time, end_time, project_id,
tags, create_user
id, `name`, `status`, create_time, update_time, end_time, project_id, tags, create_user,
review_pass_rule
</sql>
<sql id="Blob_Column_List">
description
@ -111,19 +111,17 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="map" resultMap="ResultMapWithBLOBs">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from case_review
where id = #{id,jdbcType=VARCHAR}
and review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from case_review
where id = #{id,jdbcType=VARCHAR}
and review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.CaseReviewExample">
delete from case_review
@ -132,14 +130,14 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.CaseReview">
insert into case_review (id, review_pass_rule, `name`,
`status`, create_time, update_time,
end_time, project_id, tags,
create_user, description)
values (#{id,jdbcType=VARCHAR}, #{reviewPassRule,jdbcType=VARCHAR}, #{name,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 into case_review (id, `name`, `status`,
create_time, update_time, end_time,
project_id, tags, create_user,
review_pass_rule, description)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
#{reviewPassRule,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.CaseReview">
insert into case_review
@ -147,9 +145,6 @@
<if test="id != null">
id,
</if>
<if test="reviewPassRule != null">
review_pass_rule,
</if>
<if test="name != null">
`name`,
</if>
@ -174,6 +169,9 @@
<if test="createUser != null">
create_user,
</if>
<if test="reviewPassRule != null">
review_pass_rule,
</if>
<if test="description != null">
description,
</if>
@ -182,9 +180,6 @@
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="reviewPassRule != null">
#{reviewPassRule,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
@ -209,6 +204,9 @@
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="reviewPassRule != null">
#{reviewPassRule,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
@ -226,9 +224,6 @@
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.reviewPassRule != null">
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
@ -253,6 +248,9 @@
<if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.reviewPassRule != null">
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
@ -264,7 +262,6 @@
<update id="updateByExampleWithBLOBs" parameterType="map">
update case_review
set id = #{record.id,jdbcType=VARCHAR},
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
@ -273,6 +270,7 @@
project_id = #{record.projectId,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR},
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -281,7 +279,6 @@
<update id="updateByExample" parameterType="map">
update case_review
set id = #{record.id,jdbcType=VARCHAR},
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
@ -289,7 +286,8 @@
end_time = #{record.endTime,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR}
create_user = #{record.createUser,jdbcType=VARCHAR},
review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -321,12 +319,14 @@
<if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR},
</if>
<if test="reviewPassRule != null">
review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
and review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.functional.domain.CaseReview">
update case_review
@ -338,9 +338,9 @@
project_id = #{projectId,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR},
review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
and review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.functional.domain.CaseReview">
update case_review
@ -351,8 +351,8 @@
end_time = #{endTime,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR}
create_user = #{createUser,jdbcType=VARCHAR},
review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
and review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.mapper;
import io.metersphere.functional.domain.CaseReviewUser;
import io.metersphere.functional.domain.CaseReviewUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CaseReviewUserMapper {
long countByExample(CaseReviewUserExample example);
int deleteByExample(CaseReviewUserExample example);
int deleteByPrimaryKey(@Param("reviewId") String reviewId, @Param("userId") String userId);
int insert(CaseReviewUser record);
int insertSelective(CaseReviewUser record);
List<CaseReviewUser> selectByExample(CaseReviewUserExample example);
int updateByExampleSelective(@Param("record") CaseReviewUser record, @Param("example") CaseReviewUserExample example);
int updateByExample(@Param("record") CaseReviewUser record, @Param("example") CaseReviewUserExample 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.functional.mapper.CaseReviewUserMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.CaseReviewUser">
<id column="review_id" jdbcType="VARCHAR" property="reviewId" />
<id column="user_id" jdbcType="VARCHAR" property="userId" />
</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, user_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.functional.domain.CaseReviewUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from case_review_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from case_review_user
where review_id = #{reviewId,jdbcType=VARCHAR}
and user_id = #{userId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.CaseReviewUserExample">
delete from case_review_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.CaseReviewUser">
insert into case_review_user (review_id, user_id)
values (#{reviewId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.CaseReviewUser">
insert into case_review_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
review_id,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.functional.domain.CaseReviewUserExample" resultType="java.lang.Long">
select count(*) from case_review_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update case_review_user
<set>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update case_review_user
set review_id = #{record.reviewId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

View File

@ -0,0 +1,36 @@
package io.metersphere.functional.mapper;
import io.metersphere.functional.domain.CustomFieldTestCase;
import io.metersphere.functional.domain.CustomFieldTestCaseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CustomFieldTestCaseMapper {
long countByExample(CustomFieldTestCaseExample example);
int deleteByExample(CustomFieldTestCaseExample example);
int deleteByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId);
int insert(CustomFieldTestCase record);
int insertSelective(CustomFieldTestCase record);
List<CustomFieldTestCase> selectByExampleWithBLOBs(CustomFieldTestCaseExample example);
List<CustomFieldTestCase> selectByExample(CustomFieldTestCaseExample example);
CustomFieldTestCase selectByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId);
int updateByExampleSelective(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example);
int updateByExampleWithBLOBs(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example);
int updateByExample(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example);
int updateByPrimaryKeySelective(CustomFieldTestCase record);
int updateByPrimaryKeyWithBLOBs(CustomFieldTestCase record);
int updateByPrimaryKey(CustomFieldTestCase record);
}

View File

@ -0,0 +1,234 @@
<?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.functional.mapper.CustomFieldTestCaseMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.CustomFieldTestCase">
<id column="resource_id" jdbcType="VARCHAR" property="resourceId" />
<id column="field_id" jdbcType="VARCHAR" property="fieldId" />
<result column="value" jdbcType="VARCHAR" property="value" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.functional.domain.CustomFieldTestCase">
<result column="text_value" jdbcType="LONGVARCHAR" property="textValue" />
</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">
resource_id, field_id, `value`
</sql>
<sql id="Blob_Column_List">
text_value
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.functional.domain.CustomFieldTestCaseExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from custom_field_test_case
<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.functional.domain.CustomFieldTestCaseExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from custom_field_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="map" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from custom_field_test_case
where resource_id = #{resourceId,jdbcType=VARCHAR}
and field_id = #{fieldId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from custom_field_test_case
where resource_id = #{resourceId,jdbcType=VARCHAR}
and field_id = #{fieldId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.CustomFieldTestCaseExample">
delete from custom_field_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.CustomFieldTestCase">
insert into custom_field_test_case (resource_id, field_id, `value`,
text_value)
values (#{resourceId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
#{textValue,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.CustomFieldTestCase">
insert into custom_field_test_case
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resourceId != null">
resource_id,
</if>
<if test="fieldId != null">
field_id,
</if>
<if test="value != null">
`value`,
</if>
<if test="textValue != null">
text_value,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceId != null">
#{resourceId,jdbcType=VARCHAR},
</if>
<if test="fieldId != null">
#{fieldId,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="textValue != null">
#{textValue,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.functional.domain.CustomFieldTestCaseExample" resultType="java.lang.Long">
select count(*) from custom_field_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update custom_field_test_case
<set>
<if test="record.resourceId != null">
resource_id = #{record.resourceId,jdbcType=VARCHAR},
</if>
<if test="record.fieldId != null">
field_id = #{record.fieldId,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
`value` = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.textValue != null">
text_value = #{record.textValue,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_test_case
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
field_id = #{record.fieldId,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR},
text_value = #{record.textValue,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update custom_field_test_case
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
field_id = #{record.fieldId,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.functional.domain.CustomFieldTestCase">
update custom_field_test_case
<set>
<if test="value != null">
`value` = #{value,jdbcType=VARCHAR},
</if>
<if test="textValue != null">
text_value = #{textValue,jdbcType=LONGVARCHAR},
</if>
</set>
where resource_id = #{resourceId,jdbcType=VARCHAR}
and field_id = #{fieldId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.functional.domain.CustomFieldTestCase">
update custom_field_test_case
set `value` = #{value,jdbcType=VARCHAR},
text_value = #{textValue,jdbcType=LONGVARCHAR}
where resource_id = #{resourceId,jdbcType=VARCHAR}
and field_id = #{fieldId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.functional.domain.CustomFieldTestCase">
update custom_field_test_case
set `value` = #{value,jdbcType=VARCHAR}
where resource_id = #{resourceId,jdbcType=VARCHAR}
and field_id = #{fieldId,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.mapper;
import io.metersphere.functional.domain.FunctionalCaseAttachment;
import io.metersphere.functional.domain.FunctionalCaseAttachmentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface FunctionalCaseAttachmentMapper {
long countByExample(FunctionalCaseAttachmentExample example);
int deleteByExample(FunctionalCaseAttachmentExample example);
int deleteByPrimaryKey(@Param("functionalCaseId") String functionalCaseId, @Param("fileId") String fileId);
int insert(FunctionalCaseAttachment record);
int insertSelective(FunctionalCaseAttachment record);
List<FunctionalCaseAttachment> selectByExample(FunctionalCaseAttachmentExample example);
int updateByExampleSelective(@Param("record") FunctionalCaseAttachment record, @Param("example") FunctionalCaseAttachmentExample example);
int updateByExample(@Param("record") FunctionalCaseAttachment record, @Param("example") FunctionalCaseAttachmentExample 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.functional.mapper.FunctionalCaseAttachmentMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.FunctionalCaseAttachment">
<id column="functional_case_id" jdbcType="VARCHAR" property="functionalCaseId" />
<id column="file_id" jdbcType="VARCHAR" property="fileId" />
</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">
functional_case_id, file_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseAttachmentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from functional_case_attachment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from functional_case_attachment
where functional_case_id = #{functionalCaseId,jdbcType=VARCHAR}
and file_id = #{fileId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseAttachmentExample">
delete from functional_case_attachment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.FunctionalCaseAttachment">
insert into functional_case_attachment (functional_case_id, file_id)
values (#{functionalCaseId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.FunctionalCaseAttachment">
insert into functional_case_attachment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="functionalCaseId != null">
functional_case_id,
</if>
<if test="fileId != null">
file_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="functionalCaseId != null">
#{functionalCaseId,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
#{fileId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseAttachmentExample" resultType="java.lang.Long">
select count(*) from functional_case_attachment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update functional_case_attachment
<set>
<if test="record.functionalCaseId != null">
functional_case_id = #{record.functionalCaseId,jdbcType=VARCHAR},
</if>
<if test="record.fileId != null">
file_id = #{record.fileId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update functional_case_attachment
set functional_case_id = #{record.functionalCaseId,jdbcType=VARCHAR},
file_id = #{record.fileId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

View File

@ -10,7 +10,7 @@ public interface FunctionalCaseBlobMapper {
int deleteByExample(FunctionalCaseBlobExample example);
int deleteByPrimaryKey(String functionalCaseId);
int deleteByPrimaryKey(String id);
int insert(FunctionalCaseBlob record);
@ -20,7 +20,7 @@ public interface FunctionalCaseBlobMapper {
List<FunctionalCaseBlob> selectByExample(FunctionalCaseBlobExample example);
FunctionalCaseBlob selectByPrimaryKey(String functionalCaseId);
FunctionalCaseBlob selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") FunctionalCaseBlob record, @Param("example") FunctionalCaseBlobExample example);

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.functional.mapper.FunctionalCaseBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.FunctionalCaseBlob">
<id column="functional_case_id" jdbcType="VARCHAR" property="functionalCaseId" />
<id column="id" jdbcType="VARCHAR" property="id" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.functional.domain.FunctionalCaseBlob">
<result column="steps" jdbcType="LONGVARCHAR" property="steps" />
@ -70,7 +70,7 @@
</where>
</sql>
<sql id="Base_Column_List">
functional_case_id
id
</sql>
<sql id="Blob_Column_List">
steps, step_description, expected_result, prerequisite, description
@ -111,11 +111,11 @@
,
<include refid="Blob_Column_List" />
from functional_case_blob
where functional_case_id = #{functionalCaseId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from functional_case_blob
where functional_case_id = #{functionalCaseId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseBlobExample">
delete from functional_case_blob
@ -124,18 +124,18 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
insert into functional_case_blob (functional_case_id, steps, step_description,
insert into functional_case_blob (id, steps, step_description,
expected_result, prerequisite, description
)
values (#{functionalCaseId,jdbcType=VARCHAR}, #{steps,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR},
values (#{id,jdbcType=VARCHAR}, #{steps,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR},
#{expectedResult,jdbcType=LONGVARCHAR}, #{prerequisite,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
insert into functional_case_blob
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="functionalCaseId != null">
functional_case_id,
<if test="id != null">
id,
</if>
<if test="steps != null">
steps,
@ -154,8 +154,8 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="functionalCaseId != null">
#{functionalCaseId,jdbcType=VARCHAR},
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="steps != null">
#{steps,jdbcType=LONGVARCHAR},
@ -183,8 +183,8 @@
<update id="updateByExampleSelective" parameterType="map">
update functional_case_blob
<set>
<if test="record.functionalCaseId != null">
functional_case_id = #{record.functionalCaseId,jdbcType=VARCHAR},
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.steps != null">
steps = #{record.steps,jdbcType=LONGVARCHAR},
@ -208,7 +208,7 @@
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update functional_case_blob
set functional_case_id = #{record.functionalCaseId,jdbcType=VARCHAR},
set id = #{record.id,jdbcType=VARCHAR},
steps = #{record.steps,jdbcType=LONGVARCHAR},
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
@ -220,7 +220,7 @@
</update>
<update id="updateByExample" parameterType="map">
update functional_case_blob
set functional_case_id = #{record.functionalCaseId,jdbcType=VARCHAR}
set id = #{record.id,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -244,7 +244,7 @@
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where functional_case_id = #{functionalCaseId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
update functional_case_blob
@ -253,6 +253,6 @@
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where functional_case_id = #{functionalCaseId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
package io.metersphere.functional.mapper;
import io.metersphere.functional.domain.FunctionalCaseFollow;
import io.metersphere.functional.domain.FunctionalCaseFollowExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface FunctionalCaseFollowMapper {
long countByExample(FunctionalCaseFollowExample example);
int deleteByExample(FunctionalCaseFollowExample example);
int deleteByPrimaryKey(@Param("caseId") String caseId, @Param("followId") String followId);
int insert(FunctionalCaseFollow record);
int insertSelective(FunctionalCaseFollow record);
List<FunctionalCaseFollow> selectByExample(FunctionalCaseFollowExample example);
int updateByExampleSelective(@Param("record") FunctionalCaseFollow record, @Param("example") FunctionalCaseFollowExample example);
int updateByExample(@Param("record") FunctionalCaseFollow record, @Param("example") FunctionalCaseFollowExample 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.functional.mapper.FunctionalCaseFollowMapper">
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.FunctionalCaseFollow">
<id column="case_id" jdbcType="VARCHAR" property="caseId" />
<id 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">
case_id, follow_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseFollowExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from functional_case_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from functional_case_follow
where case_id = #{caseId,jdbcType=VARCHAR}
and follow_id = #{followId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseFollowExample">
delete from functional_case_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.functional.domain.FunctionalCaseFollow">
insert into functional_case_follow (case_id, follow_id)
values (#{caseId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.FunctionalCaseFollow">
insert into functional_case_follow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseId != null">
case_id,
</if>
<if test="followId != null">
follow_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseId != null">
#{caseId,jdbcType=VARCHAR},
</if>
<if test="followId != null">
#{followId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseFollowExample" resultType="java.lang.Long">
select count(*) from functional_case_follow
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update functional_case_follow
<set>
<if test="record.caseId != null">
case_id = #{record.caseId,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 functional_case_follow
set case_id = #{record.caseId,jdbcType=VARCHAR},
follow_id = #{record.followId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

View File

@ -1,8 +1,11 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.domain.CaseReview;
import io.metersphere.functional.dto.CaseReviewDto;
import io.metersphere.validation.groups.Created;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.metersphere.functional.service.CaseReviewService;
@ -13,4 +16,20 @@ public class CaseReviewController {
@Resource
private CaseReviewService caseReviewService;
@PostMapping("/add")
public void addCaseReview(@Validated({Created.class}) @RequestBody CaseReview caseReview) {
caseReviewService.addCaseReview(caseReview);
}
@PostMapping("/delete")
public void delCaseReview(@Validated({Created.class}) @RequestBody CaseReview caseReview) {
caseReviewService.delCaseReview(caseReview);
}
@GetMapping("/get/{id}")
public CaseReviewDto get(@PathVariable String id) {
return caseReviewService.get(id);
}
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.CaseReviewFollowService;
@RestController
@RequestMapping("/case/review/follow")
public class CaseReviewFollowController {
@Resource
private CaseReviewFollowService caseReviewFollowService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.CaseReviewFunctionalCaseService;
@RestController
@RequestMapping("/case/review/functional/case")
public class CaseReviewFunctionalCaseController {
@Resource
private CaseReviewFunctionalCaseService caseReviewFunctionalCaseService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.CaseReviewFunctionalCaseUserService;
@RestController
@RequestMapping("/case/review/functional/case/user")
public class CaseReviewFunctionalCaseUserController {
@Resource
private CaseReviewFunctionalCaseUserService caseReviewFunctionalCaseUserService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.CaseReviewUserService;
@RestController
@RequestMapping("/case/review/user")
public class CaseReviewUserController {
@Resource
private CaseReviewUserService caseReviewUserService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.CustomFieldTestCaseService;
@RestController
@RequestMapping("/custom/field/test/case")
public class CustomFieldTestCaseController {
@Resource
private CustomFieldTestCaseService customFieldTestCaseService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseAttachmentService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case/attachment")
public class FunctionalCaseAttachmentController {
@Resource
private FunctionalCaseAttachmentService functionalCaseAttachmentService;
}

View File

@ -1,14 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseBlobService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case/blob")
public class FunctionalCaseBlobController {
@Resource
private FunctionalCaseBlobService functionalCaseBlobService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseCommentService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case/comment")
public class FunctionalCaseCommentController {
@Resource
private FunctionalCaseCommentService functionalCaseCommentService;
}

View File

@ -1,15 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case")
public class FunctionalCaseController {
@Resource
private FunctionalCaseService functionalCaseService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseFollowService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case/follow")
public class FunctionalCaseFollowController {
@Resource
private FunctionalCaseFollowService functionalCaseFollowService;
}

View File

@ -1,17 +0,0 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.service.FunctionalCaseModuleService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/functional/case/Module")
public class FunctionalCaseModuleController {
@Resource
private FunctionalCaseModuleService functionalCaseModuleService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.FunctionalCaseRelationshipEdgeService;
@RestController
@RequestMapping("/functional/case/relationship/edge")
public class FunctionalCaseRelationshipEdgeController {
@Resource
private FunctionalCaseRelationshipEdgeService functionalCaseRelationshipEdgeService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.FunctionalCaseTestService;
@RestController
@RequestMapping("/functional/case/test")
public class FunctionalCaseTestController {
@Resource
private FunctionalCaseTestService functionalCaseTestService;
}

View File

@ -1,16 +0,0 @@
package io.metersphere.functional.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.metersphere.functional.service.MinderExtraNodeService;
@RestController
@RequestMapping("/minder/extra/node")
public class MinderExtraNodeController {
@Resource
private MinderExtraNodeService minderExtraNodeService;
}

View File

@ -0,0 +1,6 @@
package io.metersphere.functional.dto;
import io.metersphere.functional.domain.CaseReview;
public class CaseReviewDto extends CaseReview {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseReviewFollowMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseReviewFunctionalCaseMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseReviewFunctionalCaseUserMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseReviewMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CaseReviewUserMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CustomFieldTestCaseMapper {
}

View File

@ -1,15 +0,0 @@
/**
* @filename:FunctionalCaseAttachmentDao 2023年5月17日
* @project ms V3.x
* Copyright(c) 2020 wx Co. Ltd.
* All right reserved.
*/
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseAttachmentMapper {
}

View File

@ -1,15 +0,0 @@
/**
* @filename:FunctionalCaseBlobDao 2023年5月17日
* @project ms V3.x
* Copyright(c) 2020 wx Co. Ltd.
* All right reserved.
*/
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseBlobMapper {
}

View File

@ -1,7 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseCommentMapper {
}

View File

@ -1,15 +0,0 @@
/**
* @filename:FunctionalCaseFollowDao 2023年5月17日
* @project ms V3.x
* Copyright(c) 2020 wx Co. Ltd.
* All right reserved.
*/
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseFollowMapper {
}

View File

@ -1,7 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseMapper {
}

View File

@ -1,15 +0,0 @@
/**
* @filename:FunctionalCaseModuleDao 2023年5月17日
* @project ms V3.x
* Copyright(c) 2020 wx Co. Ltd.
* All right reserved.
*/
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseModuleMapper {
}

View File

@ -1,15 +0,0 @@
/**
* @filename:FunctionalCaseRelationshipEdgeDao 2023年5月17日
* @project ms V3.x
* Copyright(c) 2020 wx Co. Ltd.
* All right reserved.
*/
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseRelationshipEdgeMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FunctionalCaseTestMapper {
}

View File

@ -1,9 +0,0 @@
package io.metersphere.functional.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MinderExtraNodeMapper {
}

View File

@ -1,6 +1,11 @@
package io.metersphere.functional.service;
import io.metersphere.functional.domain.CaseReview;
import io.metersphere.functional.dto.CaseReviewDto;
import io.metersphere.functional.mapper.CaseReviewMapper;
import io.metersphere.sdk.util.BeanUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
/**
@ -11,4 +16,24 @@ import org.springframework.stereotype.Service;
@Service
public class CaseReviewService {
@Resource
private CaseReviewMapper caseReviewMapper;
public void addCaseReview(CaseReview caseReview) {
caseReviewMapper.insertSelective(caseReview);
}
public void delCaseReview(CaseReview caseReview) {
caseReviewMapper.deleteByPrimaryKey(caseReview.getId());
}
public CaseReviewDto get(String id) {
CaseReviewDto caseReviewDto = new CaseReviewDto();
CaseReview caseReview = caseReviewMapper.selectByPrimaryKey(id);
if (caseReview == null) {
return null;
}
BeanUtils.copyBean(caseReviewDto, caseReview);
return caseReviewDto;
}
}

View File

@ -0,0 +1,24 @@
package io.metersphere.functional;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication(exclude = {
QuartzAutoConfiguration.class,
LdapAutoConfiguration.class,
Neo4jAutoConfiguration.class
})
@ServletComponentScan
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.functional"})
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

View File

@ -0,0 +1,80 @@
package io.metersphere.functional.controller;
import io.metersphere.functional.domain.CaseReview;
import io.metersphere.sdk.util.JSON;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest
@AutoConfigureMockMvc
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class CaseReviewControllerTests {
@Resource
private MockMvc mockMvc;
@Test
@Order(1)
public void testAddCaseReview() throws Exception {
CaseReview caseReview = new CaseReview();
caseReview.setId("case-review-id");
caseReview.setName("1");
caseReview.setStatus("Finished");
caseReview.setCreateTime(System.currentTimeMillis());
caseReview.setUpdateTime(System.currentTimeMillis());
caseReview.setEndTime(System.currentTimeMillis());
caseReview.setProjectId("1");
caseReview.setCreateUser("admin");
caseReview.setReviewPassRule("SINGLE");
mockMvc.perform(MockMvcRequestBuilders.post("/case/review/add")
.content(JSON.toJSONString(caseReview))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON)).andDo(print());
}
@Test
@Order(2)
public void testAddCaseReviewFalse() throws Exception {
CaseReview caseReview = new CaseReview();
caseReview.setName("test");
mockMvc.perform(MockMvcRequestBuilders.post("/case/review/add")
.content(JSON.toJSONString(caseReview))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_JSON));
}
@Test
@Order(3)
public void testDelCaseReview() throws Exception {
CaseReview caseReview = new CaseReview();
caseReview.setId("case-review-id");
mockMvc.perform(MockMvcRequestBuilders.post("/case/review/delete")
.content(JSON.toJSONString(caseReview))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_JSON));
}
@Test
@Order(4)
public void testGetCaseReview() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get("/case/review/get/case-review-id"))
.andExpect(status().isOk());
}
}

View File

@ -0,0 +1,83 @@
spring.application.name=metersphere
management.server.port=7071
server.port=8081
# ?? gzip ??
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css,text/javascript,image/jpeg
server.compression.min-response-size=2048
#
quartz.enabled=false
quartz.scheduler-name=msScheduler
quartz.thread-count=10
quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true
#
logging.file.path=/opt/metersphere/logs/metersphere
# Hikari
spring.datasource.url=jdbc:mysql://${embedded.mysql.host}:${embedded.mysql.port}/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
spring.datasource.username=${embedded.mysql.user}
spring.datasource.password=${embedded.mysql.password}
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.maximum-pool-size=100
spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.idle-timeout=300000
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
#
# spring.kafka
spring.kafka.bootstrap-servers=${embedded.kafka.brokerList}
spring.kafka.consumer.group-id=metersphere_group_id
spring.kafka.consumer.debug.group-id=metersphere_group_id_${random.uuid}
spring.kafka.listener.missing-topics-fatal=false
spring.kafka.producer.properties.max.request.size=32428800
spring.kafka.producer.batch-size=16384
spring.kafka.consumer.properties.max.partition.fetch.bytes=52428800
# mybatis
mybatis.configuration.cache-enabled=true
mybatis.configuration.lazy-loading-enabled=false
mybatis.configuration.aggressive-lazy-loading=true
mybatis.configuration.multiple-result-sets-enabled=true
mybatis.configuration.use-column-label=true
mybatis.configuration.auto-mapping-behavior=full
mybatis.configuration.default-statement-timeout=25000
mybatis.configuration.map-underscore-to-camel-case=true
# view
spring.mvc.throw-exception-if-no-handler-found=true
# flyway enable
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true
spring.flyway.locations=filesystem:../../app/src/main/resources/migration
spring.flyway.table=metersphere_version
spring.flyway.baseline-version=0
spring.flyway.encoding=UTF-8
spring.flyway.validate-on-migrate=false
# jmeter
jmeter.home=/opt/jmeter
# file upload
spring.servlet.multipart.max-file-size=500MB
spring.servlet.multipart.max-request-size=500MB
# i18n
spring.messages.basename=i18n/commons,i18n/api,i18n/issue,i18n/load,i18n/project,i18n/system,i18n/plan,i18n/functional,i18n/ui,i18n/workstation
# actuator
management.endpoints.web.exposure.include=*
management.endpoints.enabled-by-default=false
# redis
spring.session.timeout=43200s
spring.data.redis.host=${embedded.redis.host}
spring.data.redis.password=${embedded.redis.password}
spring.data.redis.port=${embedded.redis.port}
spring.session.redis.repository-type=indexed
#
spring.freemarker.check-template-location=false
spring.groovy.template.check-template-location=false
#
minio.endpoint=http://${embedded.minio.host}:${embedded.minio.port}
minio.access-key=${embedded.minio.accessKey}
minio.secret-key=${embedded.minio.secretKey}
logging.level.org.springframework.jdbc.core=trace
logging.level.io.metersphere.sdk.mapper=debug
logging.level.io.metersphere.functional.mapper=debug

View File

@ -0,0 +1,13 @@
# embedded config
embedded.containers.enabled=true
embedded.containers.forceShutdown=true
# mysql
embedded.mysql.enabled=true
embedded.mysql.encoding=utf8mb4
embedded.mysql.collation=utf8mb4_general_ci
# redis
embedded.redis.enabled=true
# kafka
embedded.kafka.enabled=false
# minio
embedded.minio.enabled=false