feat(缺陷管理): add bug ddl & domain
This commit is contained in:
parent
dd4c4d1fd2
commit
f9084d5624
|
@ -1,12 +1,16 @@
|
|||
package io.metersphere.bug.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.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Bug implements Serializable {
|
||||
|
@ -23,33 +27,44 @@ public class Bug implements Serializable {
|
|||
@Size(min = 1, max = 300, message = "{bug.title.length_range}", groups = {Created.class, Updated.class})
|
||||
private String title;
|
||||
|
||||
@Schema(description = "指派人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.assign_user.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.assign_user.length_range}", groups = {Created.class, Updated.class})
|
||||
private String assignUser;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.platform.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.platform.length_range}", groups = {Created.class, Updated.class})
|
||||
private String platform;
|
||||
|
||||
@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
@Schema(description = "模板ID")
|
||||
private String templateId;
|
||||
|
||||
@Schema(description = "缺陷来源,记录创建该缺陷的测试计划的ID")
|
||||
private String sourceId;
|
||||
@Schema(description = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.platform.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.platform.length_range}", groups = {Created.class, Updated.class})
|
||||
private String platform;
|
||||
|
||||
@Schema(description = "第三方平台状态")
|
||||
private String platformStatus;
|
||||
@Schema(description = "平台状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.status.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.status.length_range}", groups = {Created.class, Updated.class})
|
||||
private String status;
|
||||
|
||||
@Schema(description = "第三方平台缺陷ID")
|
||||
private String platformId;
|
||||
private String platformBugId;
|
||||
|
||||
@Schema(description = "是否回收站", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{bug.trash.not_blank}", groups = {Created.class})
|
||||
private Boolean trash;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -57,14 +72,16 @@ public class Bug implements Serializable {
|
|||
id("id", "id", "VARCHAR", false),
|
||||
num("num", "num", "INTEGER", false),
|
||||
title("title", "title", "VARCHAR", false),
|
||||
assignUser("assign_user", "assignUser", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
platform("platform", "platform", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
sourceId("source_id", "sourceId", "VARCHAR", false),
|
||||
platformStatus("platform_status", "platformStatus", "VARCHAR", false),
|
||||
platformId("platform_id", "platformId", "VARCHAR", false);
|
||||
templateId("template_id", "templateId", "VARCHAR", false),
|
||||
platform("platform", "platform", "VARCHAR", false),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
platformBugId("platform_bug_id", "platformBugId", "VARCHAR", false),
|
||||
trash("trash", "trash", "BIT", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
|
|
|
@ -1,22 +1,130 @@
|
|||
package io.metersphere.bug.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 java.io.Serializable;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugAttachment implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_attachment.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 255, message = "{bug_attachment.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_attachment.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_attachment.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_attachment.file_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_attachment.file_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String fileId;
|
||||
|
||||
@Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_attachment.file_name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{bug_attachment.file_name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String fileName;
|
||||
|
||||
@Schema(description = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{bug_attachment.size.not_blank}", groups = {Created.class})
|
||||
private Long size;
|
||||
|
||||
@Schema(description = "是否关联", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{bug_attachment.association.not_blank}", groups = {Created.class})
|
||||
private Boolean association;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
fileId("file_id", "fileId", "VARCHAR", false),
|
||||
fileName("file_name", "fileName", "VARCHAR", false),
|
||||
size("size", "size", "BIGINT", true),
|
||||
association("association", "association", "BIT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -104,6 +104,76 @@ public class BugAttachmentExample {
|
|||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdIsNull() {
|
||||
addCriterion("bug_id is null");
|
||||
return (Criteria) this;
|
||||
|
@ -243,6 +313,326 @@ public class BugAttachmentExample {
|
|||
addCriterion("file_id not between", value1, value2, "fileId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIsNull() {
|
||||
addCriterion("file_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIsNotNull() {
|
||||
addCriterion("file_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameEqualTo(String value) {
|
||||
addCriterion("file_name =", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotEqualTo(String value) {
|
||||
addCriterion("file_name <>", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameGreaterThan(String value) {
|
||||
addCriterion("file_name >", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("file_name >=", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLessThan(String value) {
|
||||
addCriterion("file_name <", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("file_name <=", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLike(String value) {
|
||||
addCriterion("file_name like", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotLike(String value) {
|
||||
addCriterion("file_name not like", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIn(List<String> values) {
|
||||
addCriterion("file_name in", values, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotIn(List<String> values) {
|
||||
addCriterion("file_name not in", values, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameBetween(String value1, String value2) {
|
||||
addCriterion("file_name between", value1, value2, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotBetween(String value1, String value2) {
|
||||
addCriterion("file_name not between", value1, value2, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeIsNull() {
|
||||
addCriterion("`size` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeIsNotNull() {
|
||||
addCriterion("`size` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeEqualTo(Long value) {
|
||||
addCriterion("`size` =", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeNotEqualTo(Long value) {
|
||||
addCriterion("`size` <>", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeGreaterThan(Long value) {
|
||||
addCriterion("`size` >", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("`size` >=", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeLessThan(Long value) {
|
||||
addCriterion("`size` <", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("`size` <=", value, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeIn(List<Long> values) {
|
||||
addCriterion("`size` in", values, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeNotIn(List<Long> values) {
|
||||
addCriterion("`size` not in", values, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeBetween(Long value1, Long value2) {
|
||||
addCriterion("`size` between", value1, value2, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSizeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("`size` not between", value1, value2, "size");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationIsNull() {
|
||||
addCriterion("association is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationIsNotNull() {
|
||||
addCriterion("association is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationEqualTo(Boolean value) {
|
||||
addCriterion("association =", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationNotEqualTo(Boolean value) {
|
||||
addCriterion("association <>", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationGreaterThan(Boolean value) {
|
||||
addCriterion("association >", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("association >=", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationLessThan(Boolean value) {
|
||||
addCriterion("association <", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("association <=", value, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationIn(List<Boolean> values) {
|
||||
addCriterion("association in", values, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationNotIn(List<Boolean> values) {
|
||||
addCriterion("association not in", values, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("association between", value1, value2, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssociationNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("association not between", value1, value2, "association");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package io.metersphere.bug.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BugBlob implements Serializable {
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "缺陷描述")
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1,29 +1,43 @@
|
|||
package io.metersphere.bug.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 java.io.Serializable;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugComment implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_comment.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 64, message = "{bug_comment.id.length_range}", groups = {Created.class, Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_comment.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_comment.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 64, message = "{bug_comment.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_comment.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "回复人")
|
||||
private String replyUser;
|
||||
|
||||
@Schema(description = "父评论ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "评论人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
|
@ -33,4 +47,83 @@ public class BugComment implements Serializable {
|
|||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
replyUser("reply_user", "replyUser", "VARCHAR", false),
|
||||
parentId("parent_id", "parentId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
description("description", "description", "LONGVARCHAR", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -244,6 +244,146 @@ public class BugCommentExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserIsNull() {
|
||||
addCriterion("reply_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserIsNotNull() {
|
||||
addCriterion("reply_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserEqualTo(String value) {
|
||||
addCriterion("reply_user =", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserNotEqualTo(String value) {
|
||||
addCriterion("reply_user <>", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserGreaterThan(String value) {
|
||||
addCriterion("reply_user >", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("reply_user >=", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserLessThan(String value) {
|
||||
addCriterion("reply_user <", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("reply_user <=", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserLike(String value) {
|
||||
addCriterion("reply_user like", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserNotLike(String value) {
|
||||
addCriterion("reply_user not like", value, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserIn(List<String> values) {
|
||||
addCriterion("reply_user in", values, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserNotIn(List<String> values) {
|
||||
addCriterion("reply_user not in", values, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserBetween(String value1, String value2) {
|
||||
addCriterion("reply_user between", value1, value2, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReplyUserNotBetween(String value1, String value2) {
|
||||
addCriterion("reply_user not between", value1, value2, "replyUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdIsNull() {
|
||||
addCriterion("parent_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdIsNotNull() {
|
||||
addCriterion("parent_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdEqualTo(String value) {
|
||||
addCriterion("parent_id =", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdNotEqualTo(String value) {
|
||||
addCriterion("parent_id <>", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdGreaterThan(String value) {
|
||||
addCriterion("parent_id >", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("parent_id >=", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdLessThan(String value) {
|
||||
addCriterion("parent_id <", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("parent_id <=", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdLike(String value) {
|
||||
addCriterion("parent_id like", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdNotLike(String value) {
|
||||
addCriterion("parent_id not like", value, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdIn(List<String> values) {
|
||||
addCriterion("parent_id in", values, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdNotIn(List<String> values) {
|
||||
addCriterion("parent_id not in", values, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdBetween(String value1, String value2) {
|
||||
addCriterion("parent_id between", value1, value2, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andParentIdNotBetween(String value1, String value2) {
|
||||
addCriterion("parent_id not between", value1, value2, "parentId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
|
@ -374,6 +514,76 @@ public class BugCommentExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserIsNull() {
|
||||
addCriterion("update_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserIsNotNull() {
|
||||
addCriterion("update_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserEqualTo(String value) {
|
||||
addCriterion("update_user =", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotEqualTo(String value) {
|
||||
addCriterion("update_user <>", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserGreaterThan(String value) {
|
||||
addCriterion("update_user >", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("update_user >=", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserLessThan(String value) {
|
||||
addCriterion("update_user <", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("update_user <=", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserLike(String value) {
|
||||
addCriterion("update_user like", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotLike(String value) {
|
||||
addCriterion("update_user not like", value, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserIn(List<String> values) {
|
||||
addCriterion("update_user in", values, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotIn(List<String> values) {
|
||||
addCriterion("update_user not in", values, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserBetween(String value1, String value2) {
|
||||
addCriterion("update_user between", value1, value2, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("update_user not between", value1, value2, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
package io.metersphere.bug.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 lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugContent implements Serializable {
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_content.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_content.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "缺陷描述")
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
description("description", "description", "LONGVARCHAR", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,14 +3,14 @@ package io.metersphere.bug.domain;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BugBlobExample {
|
||||
public class BugContentExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BugBlobExample() {
|
||||
public BugContentExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
|
@ -104,73 +104,73 @@ public class BugBlobExample {
|
|||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
public Criteria andBugIdIsNull() {
|
||||
addCriterion("bug_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
public Criteria andBugIdIsNotNull() {
|
||||
addCriterion("bug_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
public Criteria andBugIdEqualTo(String value) {
|
||||
addCriterion("bug_id =", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
public Criteria andBugIdNotEqualTo(String value) {
|
||||
addCriterion("bug_id <>", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
public Criteria andBugIdGreaterThan(String value) {
|
||||
addCriterion("bug_id >", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
public Criteria andBugIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("bug_id >=", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
public Criteria andBugIdLessThan(String value) {
|
||||
addCriterion("bug_id <", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
public Criteria andBugIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("bug_id <=", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
public Criteria andBugIdLike(String value) {
|
||||
addCriterion("bug_id like", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
public Criteria andBugIdNotLike(String value) {
|
||||
addCriterion("bug_id not like", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
public Criteria andBugIdIn(List<String> values) {
|
||||
addCriterion("bug_id in", values, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
public Criteria andBugIdNotIn(List<String> values) {
|
||||
addCriterion("bug_id not in", values, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
public Criteria andBugIdBetween(String value1, String value2) {
|
||||
addCriterion("bug_id between", value1, value2, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
public Criteria andBugIdNotBetween(String value1, String value2) {
|
||||
addCriterion("bug_id not between", value1, value2, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
|
@ -1,14 +1,19 @@
|
|||
package io.metersphere.bug.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 java.io.Serializable;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugCustomField implements Serializable {
|
||||
@Schema(description = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_custom_field.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_custom_field.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
@ -21,8 +26,78 @@ public class BugCustomField implements Serializable {
|
|||
@Schema(description = "字段值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "文本类型字段值")
|
||||
private byte[] textValue;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
fieldId("field_id", "fieldId", "VARCHAR", false),
|
||||
value("value", "value", "VARCHAR", true);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -304,6 +304,146 @@ public class BugExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserIsNull() {
|
||||
addCriterion("assign_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserIsNotNull() {
|
||||
addCriterion("assign_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserEqualTo(String value) {
|
||||
addCriterion("assign_user =", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserNotEqualTo(String value) {
|
||||
addCriterion("assign_user <>", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserGreaterThan(String value) {
|
||||
addCriterion("assign_user >", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("assign_user >=", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserLessThan(String value) {
|
||||
addCriterion("assign_user <", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("assign_user <=", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserLike(String value) {
|
||||
addCriterion("assign_user like", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserNotLike(String value) {
|
||||
addCriterion("assign_user not like", value, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserIn(List<String> values) {
|
||||
addCriterion("assign_user in", values, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserNotIn(List<String> values) {
|
||||
addCriterion("assign_user not in", values, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserBetween(String value1, String value2) {
|
||||
addCriterion("assign_user between", value1, value2, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAssignUserNotBetween(String value1, String value2) {
|
||||
addCriterion("assign_user not between", value1, value2, "assignUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -424,76 +564,6 @@ public class BugExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIsNull() {
|
||||
addCriterion("platform is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIsNotNull() {
|
||||
addCriterion("platform is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformEqualTo(String value) {
|
||||
addCriterion("platform =", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformNotEqualTo(String value) {
|
||||
addCriterion("platform <>", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformGreaterThan(String value) {
|
||||
addCriterion("platform >", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform >=", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformLessThan(String value) {
|
||||
addCriterion("platform <", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform <=", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformLike(String value) {
|
||||
addCriterion("platform like", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformNotLike(String value) {
|
||||
addCriterion("platform not like", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIn(List<String> values) {
|
||||
addCriterion("platform in", values, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformNotIn(List<String> values) {
|
||||
addCriterion("platform not in", values, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformBetween(String value1, String value2) {
|
||||
addCriterion("platform between", value1, value2, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformNotBetween(String value1, String value2) {
|
||||
addCriterion("platform not between", value1, value2, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
|
@ -564,283 +634,343 @@ public class BugExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
public Criteria andTemplateIdIsNull() {
|
||||
addCriterion("template_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
public Criteria andTemplateIdIsNotNull() {
|
||||
addCriterion("template_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
public Criteria andTemplateIdEqualTo(String value) {
|
||||
addCriterion("template_id =", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
public Criteria andTemplateIdNotEqualTo(String value) {
|
||||
addCriterion("template_id <>", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
public Criteria andTemplateIdGreaterThan(String value) {
|
||||
addCriterion("template_id >", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
public Criteria andTemplateIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("template_id >=", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
public Criteria andTemplateIdLessThan(String value) {
|
||||
addCriterion("template_id <", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
public Criteria andTemplateIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("template_id <=", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
public Criteria andTemplateIdLike(String value) {
|
||||
addCriterion("template_id like", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
public Criteria andTemplateIdNotLike(String value) {
|
||||
addCriterion("template_id not like", value, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
public Criteria andTemplateIdIn(List<String> values) {
|
||||
addCriterion("template_id in", values, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
public Criteria andTemplateIdNotIn(List<String> values) {
|
||||
addCriterion("template_id not in", values, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
public Criteria andTemplateIdBetween(String value1, String value2) {
|
||||
addCriterion("template_id between", value1, value2, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
public Criteria andTemplateIdNotBetween(String value1, String value2) {
|
||||
addCriterion("template_id not between", value1, value2, "templateId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdIsNull() {
|
||||
addCriterion("source_id is null");
|
||||
public Criteria andPlatformIsNull() {
|
||||
addCriterion("platform is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdIsNotNull() {
|
||||
addCriterion("source_id is not null");
|
||||
public Criteria andPlatformIsNotNull() {
|
||||
addCriterion("platform is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdEqualTo(String value) {
|
||||
addCriterion("source_id =", value, "sourceId");
|
||||
public Criteria andPlatformEqualTo(String value) {
|
||||
addCriterion("platform =", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdNotEqualTo(String value) {
|
||||
addCriterion("source_id <>", value, "sourceId");
|
||||
public Criteria andPlatformNotEqualTo(String value) {
|
||||
addCriterion("platform <>", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdGreaterThan(String value) {
|
||||
addCriterion("source_id >", value, "sourceId");
|
||||
public Criteria andPlatformGreaterThan(String value) {
|
||||
addCriterion("platform >", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("source_id >=", value, "sourceId");
|
||||
public Criteria andPlatformGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform >=", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdLessThan(String value) {
|
||||
addCriterion("source_id <", value, "sourceId");
|
||||
public Criteria andPlatformLessThan(String value) {
|
||||
addCriterion("platform <", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("source_id <=", value, "sourceId");
|
||||
public Criteria andPlatformLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform <=", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdLike(String value) {
|
||||
addCriterion("source_id like", value, "sourceId");
|
||||
public Criteria andPlatformLike(String value) {
|
||||
addCriterion("platform like", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdNotLike(String value) {
|
||||
addCriterion("source_id not like", value, "sourceId");
|
||||
public Criteria andPlatformNotLike(String value) {
|
||||
addCriterion("platform not like", value, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdIn(List<String> values) {
|
||||
addCriterion("source_id in", values, "sourceId");
|
||||
public Criteria andPlatformIn(List<String> values) {
|
||||
addCriterion("platform in", values, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdNotIn(List<String> values) {
|
||||
addCriterion("source_id not in", values, "sourceId");
|
||||
public Criteria andPlatformNotIn(List<String> values) {
|
||||
addCriterion("platform not in", values, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdBetween(String value1, String value2) {
|
||||
addCriterion("source_id between", value1, value2, "sourceId");
|
||||
public Criteria andPlatformBetween(String value1, String value2) {
|
||||
addCriterion("platform between", value1, value2, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("source_id not between", value1, value2, "sourceId");
|
||||
public Criteria andPlatformNotBetween(String value1, String value2) {
|
||||
addCriterion("platform not between", value1, value2, "platform");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIsNull() {
|
||||
addCriterion("platform_status is null");
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIsNotNull() {
|
||||
addCriterion("platform_status is not null");
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusEqualTo(String value) {
|
||||
addCriterion("platform_status =", value, "platformStatus");
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotEqualTo(String value) {
|
||||
addCriterion("platform_status <>", value, "platformStatus");
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusGreaterThan(String value) {
|
||||
addCriterion("platform_status >", value, "platformStatus");
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform_status >=", value, "platformStatus");
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLessThan(String value) {
|
||||
addCriterion("platform_status <", value, "platformStatus");
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform_status <=", value, "platformStatus");
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLike(String value) {
|
||||
addCriterion("platform_status like", value, "platformStatus");
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotLike(String value) {
|
||||
addCriterion("platform_status not like", value, "platformStatus");
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIn(List<String> values) {
|
||||
addCriterion("platform_status in", values, "platformStatus");
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotIn(List<String> values) {
|
||||
addCriterion("platform_status not in", values, "platformStatus");
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusBetween(String value1, String value2) {
|
||||
addCriterion("platform_status between", value1, value2, "platformStatus");
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("platform_status not between", value1, value2, "platformStatus");
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdIsNull() {
|
||||
addCriterion("platform_id is null");
|
||||
public Criteria andPlatformBugIdIsNull() {
|
||||
addCriterion("platform_bug_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdIsNotNull() {
|
||||
addCriterion("platform_id is not null");
|
||||
public Criteria andPlatformBugIdIsNotNull() {
|
||||
addCriterion("platform_bug_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdEqualTo(String value) {
|
||||
addCriterion("platform_id =", value, "platformId");
|
||||
public Criteria andPlatformBugIdEqualTo(String value) {
|
||||
addCriterion("platform_bug_id =", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdNotEqualTo(String value) {
|
||||
addCriterion("platform_id <>", value, "platformId");
|
||||
public Criteria andPlatformBugIdNotEqualTo(String value) {
|
||||
addCriterion("platform_bug_id <>", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdGreaterThan(String value) {
|
||||
addCriterion("platform_id >", value, "platformId");
|
||||
public Criteria andPlatformBugIdGreaterThan(String value) {
|
||||
addCriterion("platform_bug_id >", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform_id >=", value, "platformId");
|
||||
public Criteria andPlatformBugIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform_bug_id >=", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdLessThan(String value) {
|
||||
addCriterion("platform_id <", value, "platformId");
|
||||
public Criteria andPlatformBugIdLessThan(String value) {
|
||||
addCriterion("platform_bug_id <", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform_id <=", value, "platformId");
|
||||
public Criteria andPlatformBugIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform_bug_id <=", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdLike(String value) {
|
||||
addCriterion("platform_id like", value, "platformId");
|
||||
public Criteria andPlatformBugIdLike(String value) {
|
||||
addCriterion("platform_bug_id like", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdNotLike(String value) {
|
||||
addCriterion("platform_id not like", value, "platformId");
|
||||
public Criteria andPlatformBugIdNotLike(String value) {
|
||||
addCriterion("platform_bug_id not like", value, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdIn(List<String> values) {
|
||||
addCriterion("platform_id in", values, "platformId");
|
||||
public Criteria andPlatformBugIdIn(List<String> values) {
|
||||
addCriterion("platform_bug_id in", values, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdNotIn(List<String> values) {
|
||||
addCriterion("platform_id not in", values, "platformId");
|
||||
public Criteria andPlatformBugIdNotIn(List<String> values) {
|
||||
addCriterion("platform_bug_id not in", values, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdBetween(String value1, String value2) {
|
||||
addCriterion("platform_id between", value1, value2, "platformId");
|
||||
public Criteria andPlatformBugIdBetween(String value1, String value2) {
|
||||
addCriterion("platform_bug_id between", value1, value2, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformIdNotBetween(String value1, String value2) {
|
||||
addCriterion("platform_id not between", value1, value2, "platformId");
|
||||
public Criteria andPlatformBugIdNotBetween(String value1, String value2) {
|
||||
addCriterion("platform_bug_id not between", value1, value2, "platformBugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashIsNull() {
|
||||
addCriterion("trash is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashIsNotNull() {
|
||||
addCriterion("trash is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashEqualTo(Boolean value) {
|
||||
addCriterion("trash =", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashNotEqualTo(Boolean value) {
|
||||
addCriterion("trash <>", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashGreaterThan(Boolean value) {
|
||||
addCriterion("trash >", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("trash >=", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashLessThan(Boolean value) {
|
||||
addCriterion("trash <", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("trash <=", value, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashIn(List<Boolean> values) {
|
||||
addCriterion("trash in", values, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashNotIn(List<Boolean> values) {
|
||||
addCriterion("trash not in", values, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("trash between", value1, value2, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTrashNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("trash not between", value1, value2, "trash");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
package io.metersphere.bug.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 java.io.Serializable;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugFollower implements Serializable {
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@ -19,4 +24,76 @@ public class BugFollower implements Serializable {
|
|||
private String userId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
userId("user_id", "userId", "VARCHAR", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package io.metersphere.bug.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BugFunctionalCase implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_functional_case.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_functional_case.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "功能用例或测试计划功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_functional_case.resource_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_functional_case.resource_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String resourceId;
|
||||
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_functional_case.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_functional_case.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "关联的类型:关联功能用例/关联测试计划功能用例", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_functional_case.ref_type.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 64, message = "{bug_functional_case.ref_type.length_range}", groups = {Created.class, Updated.class})
|
||||
private String refType;
|
||||
|
||||
@Schema(description = "测试计划的用例所指向的用例的id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_functional_case.ref_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_functional_case.ref_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String refId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
package io.metersphere.bug.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.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugHistory implements Serializable {
|
||||
@Schema(description = "变更记录ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_history.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_history.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "所属缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_history.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_history.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "变更记录批次号")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "操作人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "操作时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{bug_history.content.not_blank}", groups = {Created.class})
|
||||
private byte[] content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
num("num", "num", "INTEGER", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
content("content", "content", "LONGVARBINARY", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,14 +3,14 @@ package io.metersphere.bug.domain;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BugFunctionalCaseExample {
|
||||
public class BugHistoryExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BugFunctionalCaseExample() {
|
||||
public BugHistoryExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
|
@ -174,76 +174,6 @@ public class BugFunctionalCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
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 andBugIdIsNull() {
|
||||
addCriterion("bug_id is null");
|
||||
return (Criteria) this;
|
||||
|
@ -314,143 +244,133 @@ public class BugFunctionalCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeIsNull() {
|
||||
addCriterion("ref_type is null");
|
||||
public Criteria andNumIsNull() {
|
||||
addCriterion("num is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeIsNotNull() {
|
||||
addCriterion("ref_type is not null");
|
||||
public Criteria andNumIsNotNull() {
|
||||
addCriterion("num is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeEqualTo(String value) {
|
||||
addCriterion("ref_type =", value, "refType");
|
||||
public Criteria andNumEqualTo(Integer value) {
|
||||
addCriterion("num =", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeNotEqualTo(String value) {
|
||||
addCriterion("ref_type <>", value, "refType");
|
||||
public Criteria andNumNotEqualTo(Integer value) {
|
||||
addCriterion("num <>", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeGreaterThan(String value) {
|
||||
addCriterion("ref_type >", value, "refType");
|
||||
public Criteria andNumGreaterThan(Integer value) {
|
||||
addCriterion("num >", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("ref_type >=", value, "refType");
|
||||
public Criteria andNumGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("num >=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeLessThan(String value) {
|
||||
addCriterion("ref_type <", value, "refType");
|
||||
public Criteria andNumLessThan(Integer value) {
|
||||
addCriterion("num <", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("ref_type <=", value, "refType");
|
||||
public Criteria andNumLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("num <=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeLike(String value) {
|
||||
addCriterion("ref_type like", value, "refType");
|
||||
public Criteria andNumIn(List<Integer> values) {
|
||||
addCriterion("num in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeNotLike(String value) {
|
||||
addCriterion("ref_type not like", value, "refType");
|
||||
public Criteria andNumNotIn(List<Integer> values) {
|
||||
addCriterion("num not in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeIn(List<String> values) {
|
||||
addCriterion("ref_type in", values, "refType");
|
||||
public Criteria andNumBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeNotIn(List<String> values) {
|
||||
addCriterion("ref_type not in", values, "refType");
|
||||
public Criteria andNumNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num not between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeBetween(String value1, String value2) {
|
||||
addCriterion("ref_type between", value1, value2, "refType");
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("ref_type not between", value1, value2, "refType");
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdIsNull() {
|
||||
addCriterion("ref_id is null");
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdIsNotNull() {
|
||||
addCriterion("ref_id is not null");
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdEqualTo(String value) {
|
||||
addCriterion("ref_id =", value, "refId");
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdNotEqualTo(String value) {
|
||||
addCriterion("ref_id <>", value, "refId");
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdGreaterThan(String value) {
|
||||
addCriterion("ref_id >", value, "refId");
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("ref_id >=", value, "refId");
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdLessThan(String value) {
|
||||
addCriterion("ref_id <", value, "refId");
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("ref_id <=", value, "refId");
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdLike(String value) {
|
||||
addCriterion("ref_id like", value, "refId");
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdNotLike(String value) {
|
||||
addCriterion("ref_id not like", value, "refId");
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdIn(List<String> values) {
|
||||
addCriterion("ref_id in", values, "refId");
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdNotIn(List<String> values) {
|
||||
addCriterion("ref_id not in", values, "refId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdBetween(String value1, String value2) {
|
||||
addCriterion("ref_id between", value1, value2, "refId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRefIdNotBetween(String value1, String value2) {
|
||||
addCriterion("ref_id not between", value1, value2, "refId");
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
|
@ -513,66 +433,6 @@ public class BugFunctionalCaseExample {
|
|||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Long value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
|
@ -0,0 +1,131 @@
|
|||
package io.metersphere.bug.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 lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class BugRelationCase implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_relation_case.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_relation_case.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "关联功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_relation_case.case_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_relation_case.case_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_relation_case.bug_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{bug_relation_case.bug_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String bugId;
|
||||
|
||||
@Schema(description = "关联的用例类型;functional/api/ui/performance", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug_relation_case.case_type.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 64, message = "{bug_relation_case.case_type.length_range}", groups = {Created.class, Updated.class})
|
||||
private String caseType;
|
||||
|
||||
@Schema(description = "关联测试计划ID")
|
||||
private String testPlanId;
|
||||
|
||||
@Schema(description = "关联测试计划用例ID")
|
||||
private String testPlanCaseId;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
caseId("case_id", "caseId", "VARCHAR", false),
|
||||
bugId("bug_id", "bugId", "VARCHAR", false),
|
||||
caseType("case_type", "caseType", "VARCHAR", false),
|
||||
testPlanId("test_plan_id", "testPlanId", "VARCHAR", false),
|
||||
testPlanCaseId("test_plan_case_id", "testPlanCaseId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,810 @@
|
|||
package io.metersphere.bug.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BugRelationCaseExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BugRelationCaseExample() {
|
||||
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 andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
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 andBugIdIsNull() {
|
||||
addCriterion("bug_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdIsNotNull() {
|
||||
addCriterion("bug_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdEqualTo(String value) {
|
||||
addCriterion("bug_id =", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdNotEqualTo(String value) {
|
||||
addCriterion("bug_id <>", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdGreaterThan(String value) {
|
||||
addCriterion("bug_id >", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("bug_id >=", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdLessThan(String value) {
|
||||
addCriterion("bug_id <", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("bug_id <=", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdLike(String value) {
|
||||
addCriterion("bug_id like", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdNotLike(String value) {
|
||||
addCriterion("bug_id not like", value, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdIn(List<String> values) {
|
||||
addCriterion("bug_id in", values, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdNotIn(List<String> values) {
|
||||
addCriterion("bug_id not in", values, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdBetween(String value1, String value2) {
|
||||
addCriterion("bug_id between", value1, value2, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBugIdNotBetween(String value1, String value2) {
|
||||
addCriterion("bug_id not between", value1, value2, "bugId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeIsNull() {
|
||||
addCriterion("case_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeIsNotNull() {
|
||||
addCriterion("case_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeEqualTo(String value) {
|
||||
addCriterion("case_type =", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeNotEqualTo(String value) {
|
||||
addCriterion("case_type <>", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeGreaterThan(String value) {
|
||||
addCriterion("case_type >", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("case_type >=", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeLessThan(String value) {
|
||||
addCriterion("case_type <", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("case_type <=", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeLike(String value) {
|
||||
addCriterion("case_type like", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeNotLike(String value) {
|
||||
addCriterion("case_type not like", value, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeIn(List<String> values) {
|
||||
addCriterion("case_type in", values, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeNotIn(List<String> values) {
|
||||
addCriterion("case_type not in", values, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeBetween(String value1, String value2) {
|
||||
addCriterion("case_type between", value1, value2, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("case_type not between", value1, value2, "caseType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdIsNull() {
|
||||
addCriterion("test_plan_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdIsNotNull() {
|
||||
addCriterion("test_plan_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdEqualTo(String value) {
|
||||
addCriterion("test_plan_id =", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdNotEqualTo(String value) {
|
||||
addCriterion("test_plan_id <>", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdGreaterThan(String value) {
|
||||
addCriterion("test_plan_id >", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_id >=", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdLessThan(String value) {
|
||||
addCriterion("test_plan_id <", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_id <=", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdLike(String value) {
|
||||
addCriterion("test_plan_id like", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdNotLike(String value) {
|
||||
addCriterion("test_plan_id not like", value, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdIn(List<String> values) {
|
||||
addCriterion("test_plan_id in", values, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdNotIn(List<String> values) {
|
||||
addCriterion("test_plan_id not in", values, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_id between", value1, value2, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_id not between", value1, value2, "testPlanId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdIsNull() {
|
||||
addCriterion("test_plan_case_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdIsNotNull() {
|
||||
addCriterion("test_plan_case_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdEqualTo(String value) {
|
||||
addCriterion("test_plan_case_id =", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdNotEqualTo(String value) {
|
||||
addCriterion("test_plan_case_id <>", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdGreaterThan(String value) {
|
||||
addCriterion("test_plan_case_id >", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_case_id >=", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdLessThan(String value) {
|
||||
addCriterion("test_plan_case_id <", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_case_id <=", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdLike(String value) {
|
||||
addCriterion("test_plan_case_id like", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdNotLike(String value) {
|
||||
addCriterion("test_plan_case_id not like", value, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdIn(List<String> values) {
|
||||
addCriterion("test_plan_case_id in", values, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdNotIn(List<String> values) {
|
||||
addCriterion("test_plan_case_id not in", values, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_case_id between", value1, value2, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanCaseIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_case_id not between", value1, value2, "testPlanCaseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Long value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,15 +2,16 @@ package io.metersphere.bug.mapper;
|
|||
|
||||
import io.metersphere.bug.domain.BugAttachment;
|
||||
import io.metersphere.bug.domain.BugAttachmentExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugAttachmentMapper {
|
||||
long countByExample(BugAttachmentExample example);
|
||||
|
||||
int deleteByExample(BugAttachmentExample example);
|
||||
|
||||
int deleteByPrimaryKey(@Param("bugId") String bugId, @Param("fileId") String fileId);
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BugAttachment record);
|
||||
|
||||
|
@ -18,7 +19,17 @@ public interface BugAttachmentMapper {
|
|||
|
||||
List<BugAttachment> selectByExample(BugAttachmentExample example);
|
||||
|
||||
BugAttachment selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugAttachment record, @Param("example") BugAttachmentExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugAttachment record, @Param("example") BugAttachmentExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugAttachment record);
|
||||
|
||||
int updateByPrimaryKey(BugAttachment record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugAttachment> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugAttachment> list, @Param("selective") BugAttachment.Column ... selective);
|
||||
}
|
|
@ -2,8 +2,14 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.bug.mapper.BugAttachmentMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugAttachment">
|
||||
<id column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<id column="file_id" jdbcType="VARCHAR" property="fileId" />
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
|
||||
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
||||
<result column="size" jdbcType="BIGINT" property="size" />
|
||||
<result column="association" jdbcType="BIT" property="association" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -64,7 +70,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
bug_id, file_id
|
||||
id, bug_id, file_id, file_name, `size`, association, create_user, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugAttachmentExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -80,10 +86,15 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="map">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bug_attachment
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bug_attachment
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and file_id = #{fileId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugAttachmentExample">
|
||||
delete from bug_attachment
|
||||
|
@ -92,26 +103,66 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugAttachment">
|
||||
insert into bug_attachment (bug_id, file_id)
|
||||
values (#{bugId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR})
|
||||
insert into bug_attachment (id, bug_id, file_id,
|
||||
file_name, `size`, association,
|
||||
create_user, create_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR},
|
||||
#{fileName,jdbcType=VARCHAR}, #{size,jdbcType=BIGINT}, #{association,jdbcType=BIT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugAttachment">
|
||||
insert into bug_attachment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
bug_id,
|
||||
</if>
|
||||
<if test="fileId != null">
|
||||
file_id,
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name,
|
||||
</if>
|
||||
<if test="size != null">
|
||||
`size`,
|
||||
</if>
|
||||
<if test="association != null">
|
||||
association,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
#{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileId != null">
|
||||
#{fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
#{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="size != null">
|
||||
#{size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="association != null">
|
||||
#{association,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugAttachmentExample" resultType="java.lang.Long">
|
||||
|
@ -123,12 +174,30 @@
|
|||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update bug_attachment
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bugId != null">
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fileId != null">
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fileName != null">
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.size != null">
|
||||
`size` = #{record.size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.association != null">
|
||||
association = #{record.association,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -136,10 +205,102 @@
|
|||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bug_attachment
|
||||
set bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR}
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
file_id = #{record.fileId,jdbcType=VARCHAR},
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
`size` = #{record.size,jdbcType=BIGINT},
|
||||
association = #{record.association,jdbcType=BIT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugAttachment">
|
||||
update bug_attachment
|
||||
<set>
|
||||
<if test="bugId != null">
|
||||
bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileId != null">
|
||||
file_id = #{fileId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="size != null">
|
||||
`size` = #{size,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="association != null">
|
||||
association = #{association,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugAttachment">
|
||||
update bug_attachment
|
||||
set bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
file_id = #{fileId,jdbcType=VARCHAR},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
`size` = #{size,jdbcType=BIGINT},
|
||||
association = #{association,jdbcType=BIT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_attachment
|
||||
(id, bug_id, file_id, file_name, `size`, association, create_user, create_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.bugId,jdbcType=VARCHAR}, #{item.fileId,jdbcType=VARCHAR},
|
||||
#{item.fileName,jdbcType=VARCHAR}, #{item.size,jdbcType=BIGINT}, #{item.association,jdbcType=BIT},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_attachment (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'file_id'.toString() == column.value">
|
||||
#{item.fileId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'file_name'.toString() == column.value">
|
||||
#{item.fileName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'size'.toString() == column.value">
|
||||
#{item.size,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'association'.toString() == column.value">
|
||||
#{item.association,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -1,34 +0,0 @@
|
|||
package io.metersphere.bug.mapper;
|
||||
|
||||
import io.metersphere.bug.domain.BugBlob;
|
||||
import io.metersphere.bug.domain.BugBlobExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface BugBlobMapper {
|
||||
long countByExample(BugBlobExample example);
|
||||
|
||||
int deleteByExample(BugBlobExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BugBlob record);
|
||||
|
||||
int insertSelective(BugBlob record);
|
||||
|
||||
List<BugBlob> selectByExampleWithBLOBs(BugBlobExample example);
|
||||
|
||||
List<BugBlob> selectByExample(BugBlobExample example);
|
||||
|
||||
BugBlob selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugBlob record, @Param("example") BugBlobExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") BugBlob record, @Param("example") BugBlobExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugBlob record, @Param("example") BugBlobExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugBlob record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(BugBlob record);
|
||||
}
|
|
@ -2,9 +2,10 @@ package io.metersphere.bug.mapper;
|
|||
|
||||
import io.metersphere.bug.domain.BugComment;
|
||||
import io.metersphere.bug.domain.BugCommentExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugCommentMapper {
|
||||
long countByExample(BugCommentExample example);
|
||||
|
||||
|
@ -33,4 +34,8 @@ public interface BugCommentMapper {
|
|||
int updateByPrimaryKeyWithBLOBs(BugComment record);
|
||||
|
||||
int updateByPrimaryKey(BugComment record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugComment> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugComment> list, @Param("selective") BugComment.Column ... selective);
|
||||
}
|
|
@ -4,8 +4,11 @@
|
|||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugComment">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<result column="reply_user" jdbcType="VARCHAR" property="replyUser" />
|
||||
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.bug.domain.BugComment">
|
||||
|
@ -70,7 +73,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, bug_id, create_user, create_time, update_time
|
||||
id, bug_id, reply_user, parent_id, create_user, create_time, update_user, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
|
@ -124,11 +127,13 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugComment">
|
||||
insert into bug_comment (id, bug_id, create_user,
|
||||
create_time, update_time, description
|
||||
insert into bug_comment (id, bug_id, reply_user,
|
||||
parent_id, create_user, create_time,
|
||||
update_user, update_time, description
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}
|
||||
values (#{id,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{replyUser,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugComment">
|
||||
|
@ -140,12 +145,21 @@
|
|||
<if test="bugId != null">
|
||||
bug_id,
|
||||
</if>
|
||||
<if test="replyUser != null">
|
||||
reply_user,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
|
@ -160,12 +174,21 @@
|
|||
<if test="bugId != null">
|
||||
#{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="replyUser != null">
|
||||
#{replyUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -189,12 +212,21 @@
|
|||
<if test="record.bugId != null">
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.replyUser != null">
|
||||
reply_user = #{record.replyUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -210,8 +242,11 @@
|
|||
update bug_comment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
reply_user = #{record.replyUser,jdbcType=VARCHAR},
|
||||
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -222,8 +257,11 @@
|
|||
update bug_comment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
reply_user = #{record.replyUser,jdbcType=VARCHAR},
|
||||
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -235,12 +273,21 @@
|
|||
<if test="bugId != null">
|
||||
bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="replyUser != null">
|
||||
reply_user = #{replyUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -253,8 +300,11 @@
|
|||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.bug.domain.BugComment">
|
||||
update bug_comment
|
||||
set bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
reply_user = #{replyUser,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -262,9 +312,65 @@
|
|||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugComment">
|
||||
update bug_comment
|
||||
set bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
reply_user = #{replyUser,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_comment
|
||||
(id, bug_id, reply_user, parent_id, create_user, create_time, update_user, update_time,
|
||||
description)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.bugId,jdbcType=VARCHAR}, #{item.replyUser,jdbcType=VARCHAR},
|
||||
#{item.parentId,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT}, #{item.description,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_comment (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'reply_user'.toString() == column.value">
|
||||
#{item.replyUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'parent_id'.toString() == column.value">
|
||||
#{item.parentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -0,0 +1,39 @@
|
|||
package io.metersphere.bug.mapper;
|
||||
|
||||
import io.metersphere.bug.domain.BugContent;
|
||||
import io.metersphere.bug.domain.BugContentExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugContentMapper {
|
||||
long countByExample(BugContentExample example);
|
||||
|
||||
int deleteByExample(BugContentExample example);
|
||||
|
||||
int deleteByPrimaryKey(String bugId);
|
||||
|
||||
int insert(BugContent record);
|
||||
|
||||
int insertSelective(BugContent record);
|
||||
|
||||
List<BugContent> selectByExampleWithBLOBs(BugContentExample example);
|
||||
|
||||
List<BugContent> selectByExample(BugContentExample example);
|
||||
|
||||
BugContent selectByPrimaryKey(String bugId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugContent record, @Param("example") BugContentExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") BugContent record, @Param("example") BugContentExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugContent record, @Param("example") BugContentExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugContent record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(BugContent record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugContent> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugContent> list, @Param("selective") BugContent.Column ... selective);
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
<?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.bug.mapper.BugBlobMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugBlob">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<mapper namespace="io.metersphere.bug.mapper.BugContentMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugContent">
|
||||
<id column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.bug.domain.BugBlob">
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.bug.domain.BugContent">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
|
@ -66,12 +66,12 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
bug_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.bug.domain.BugBlobExample" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.bug.domain.BugContentExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
|
@ -79,7 +79,7 @@
|
|||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_blob
|
||||
from bug_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -87,13 +87,13 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugBlobExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugContentExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from bug_blob
|
||||
from bug_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -106,53 +106,53 @@
|
|||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_blob
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
from bug_content
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bug_blob
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
delete from bug_content
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugBlobExample">
|
||||
delete from bug_blob
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugContentExample">
|
||||
delete from bug_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugBlob">
|
||||
insert into bug_blob (id, description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugContent">
|
||||
insert into bug_content (bug_id, description)
|
||||
values (#{bugId,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugBlob">
|
||||
insert into bug_blob
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugContent">
|
||||
insert into bug_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
<if test="bugId != null">
|
||||
bug_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
<if test="bugId != null">
|
||||
#{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugBlobExample" resultType="java.lang.Long">
|
||||
select count(*) from bug_blob
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugContentExample" resultType="java.lang.Long">
|
||||
select count(*) from bug_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update bug_blob
|
||||
update bug_content
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
<if test="record.bugId != null">
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
|
@ -163,32 +163,60 @@
|
|||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update bug_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
update bug_content
|
||||
set bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bug_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR}
|
||||
update bug_content
|
||||
set bug_id = #{record.bugId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugBlob">
|
||||
update bug_blob
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugContent">
|
||||
update bug_content
|
||||
<set>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.bug.domain.BugBlob">
|
||||
update bug_blob
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.bug.domain.BugContent">
|
||||
update bug_content
|
||||
set description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_content
|
||||
(bug_id, description)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.bugId,jdbcType=VARCHAR}, #{item.description,jdbcType=LONGVARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_content (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -2,35 +2,34 @@ package io.metersphere.bug.mapper;
|
|||
|
||||
import io.metersphere.bug.domain.BugCustomField;
|
||||
import io.metersphere.bug.domain.BugCustomFieldExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugCustomFieldMapper {
|
||||
long countByExample(BugCustomFieldExample example);
|
||||
|
||||
int deleteByExample(BugCustomFieldExample example);
|
||||
|
||||
int deleteByPrimaryKey(@Param("bugId") String bugId, @Param("fieldId") String fieldId);
|
||||
int deleteByPrimaryKey(String bugId);
|
||||
|
||||
int insert(BugCustomField record);
|
||||
|
||||
int insertSelective(BugCustomField record);
|
||||
|
||||
List<BugCustomField> selectByExampleWithBLOBs(BugCustomFieldExample example);
|
||||
|
||||
List<BugCustomField> selectByExample(BugCustomFieldExample example);
|
||||
|
||||
BugCustomField selectByPrimaryKey(@Param("bugId") String bugId, @Param("fieldId") String fieldId);
|
||||
BugCustomField selectByPrimaryKey(String bugId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugCustomField record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(BugCustomField record);
|
||||
|
||||
int updateByPrimaryKey(BugCustomField record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugCustomField> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugCustomField> list, @Param("selective") BugCustomField.Column ... selective);
|
||||
}
|
|
@ -3,12 +3,9 @@
|
|||
<mapper namespace="io.metersphere.bug.mapper.BugCustomFieldMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugCustomField">
|
||||
<id column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<id column="field_id" jdbcType="VARCHAR" property="fieldId" />
|
||||
<result column="field_id" jdbcType="VARCHAR" property="fieldId" />
|
||||
<result column="value" jdbcType="VARCHAR" property="value" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.bug.domain.BugCustomField">
|
||||
<result column="text_value" jdbcType="LONGVARBINARY" property="textValue" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
|
@ -70,25 +67,6 @@
|
|||
<sql id="Base_Column_List">
|
||||
bug_id, field_id, `value`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
text_value
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.bug.domain.BugCustomFieldExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_custom_field
|
||||
<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.bug.domain.BugCustomFieldExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
|
@ -103,19 +81,15 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="map" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_custom_field
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and field_id = #{fieldId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="map">
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bug_custom_field
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and field_id = #{fieldId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugCustomFieldExample">
|
||||
delete from bug_custom_field
|
||||
|
@ -124,10 +98,10 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugCustomField">
|
||||
insert into bug_custom_field (bug_id, field_id, `value`,
|
||||
text_value)
|
||||
values (#{bugId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
|
||||
#{textValue,jdbcType=LONGVARBINARY})
|
||||
insert into bug_custom_field (bug_id, field_id, `value`
|
||||
)
|
||||
values (#{bugId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugCustomField">
|
||||
insert into bug_custom_field
|
||||
|
@ -141,9 +115,6 @@
|
|||
<if test="value != null">
|
||||
`value`,
|
||||
</if>
|
||||
<if test="textValue != null">
|
||||
text_value,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="bugId != null">
|
||||
|
@ -155,9 +126,6 @@
|
|||
<if test="value != null">
|
||||
#{value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="textValue != null">
|
||||
#{textValue,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugCustomFieldExample" resultType="java.lang.Long">
|
||||
|
@ -178,24 +146,11 @@
|
|||
<if test="record.value != null">
|
||||
`value` = #{record.value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.textValue != null">
|
||||
text_value = #{record.textValue,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update bug_custom_field
|
||||
set bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
field_id = #{record.fieldId,jdbcType=VARCHAR},
|
||||
`value` = #{record.value,jdbcType=VARCHAR},
|
||||
text_value = #{record.textValue,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bug_custom_field
|
||||
set bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
|
@ -208,27 +163,51 @@
|
|||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugCustomField">
|
||||
update bug_custom_field
|
||||
<set>
|
||||
<if test="fieldId != null">
|
||||
field_id = #{fieldId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="textValue != null">
|
||||
text_value = #{textValue,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and field_id = #{fieldId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.bug.domain.BugCustomField">
|
||||
update bug_custom_field
|
||||
set `value` = #{value,jdbcType=VARCHAR},
|
||||
text_value = #{textValue,jdbcType=LONGVARBINARY}
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and field_id = #{fieldId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugCustomField">
|
||||
update bug_custom_field
|
||||
set `value` = #{value,jdbcType=VARCHAR}
|
||||
set field_id = #{fieldId,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=VARCHAR}
|
||||
where bug_id = #{bugId,jdbcType=VARCHAR}
|
||||
and field_id = #{fieldId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_custom_field
|
||||
(bug_id, field_id, `value`)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.bugId,jdbcType=VARCHAR}, #{item.fieldId,jdbcType=VARCHAR}, #{item.value,jdbcType=VARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_custom_field (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'field_id'.toString() == column.value">
|
||||
#{item.fieldId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'value'.toString() == column.value">
|
||||
#{item.value,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -2,9 +2,10 @@ package io.metersphere.bug.mapper;
|
|||
|
||||
import io.metersphere.bug.domain.BugFollower;
|
||||
import io.metersphere.bug.domain.BugFollowerExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugFollowerMapper {
|
||||
long countByExample(BugFollowerExample example);
|
||||
|
||||
|
@ -21,4 +22,8 @@ public interface BugFollowerMapper {
|
|||
int updateByExampleSelective(@Param("record") BugFollower record, @Param("example") BugFollowerExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugFollower record, @Param("example") BugFollowerExample example);
|
||||
|
||||
int batchInsert(@Param("list") List<BugFollower> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugFollower> list, @Param("selective") BugFollower.Column ... selective);
|
||||
}
|
|
@ -142,4 +142,32 @@
|
|||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_follower
|
||||
(bug_id, user_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.bugId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_follower (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'user_id'.toString() == column.value">
|
||||
#{item.userId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -1,30 +0,0 @@
|
|||
package io.metersphere.bug.mapper;
|
||||
|
||||
import io.metersphere.bug.domain.BugFunctionalCase;
|
||||
import io.metersphere.bug.domain.BugFunctionalCaseExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface BugFunctionalCaseMapper {
|
||||
long countByExample(BugFunctionalCaseExample example);
|
||||
|
||||
int deleteByExample(BugFunctionalCaseExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BugFunctionalCase record);
|
||||
|
||||
int insertSelective(BugFunctionalCase record);
|
||||
|
||||
List<BugFunctionalCase> selectByExample(BugFunctionalCaseExample example);
|
||||
|
||||
BugFunctionalCase selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugFunctionalCase record, @Param("example") BugFunctionalCaseExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugFunctionalCase record, @Param("example") BugFunctionalCaseExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugFunctionalCase record);
|
||||
|
||||
int updateByPrimaryKey(BugFunctionalCase record);
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package io.metersphere.bug.mapper;
|
||||
|
||||
import io.metersphere.bug.domain.BugHistory;
|
||||
import io.metersphere.bug.domain.BugHistoryExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugHistoryMapper {
|
||||
long countByExample(BugHistoryExample example);
|
||||
|
||||
int deleteByExample(BugHistoryExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BugHistory record);
|
||||
|
||||
int insertSelective(BugHistory record);
|
||||
|
||||
List<BugHistory> selectByExampleWithBLOBs(BugHistoryExample example);
|
||||
|
||||
List<BugHistory> selectByExample(BugHistoryExample example);
|
||||
|
||||
BugHistory selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugHistory record, @Param("example") BugHistoryExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") BugHistory record, @Param("example") BugHistoryExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugHistory record, @Param("example") BugHistoryExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugHistory record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(BugHistory record);
|
||||
|
||||
int updateByPrimaryKey(BugHistory record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugHistory> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugHistory> list, @Param("selective") BugHistory.Column ... selective);
|
||||
}
|
|
@ -0,0 +1,312 @@
|
|||
<?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.bug.mapper.BugHistoryMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugHistory">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.bug.domain.BugHistory">
|
||||
<result column="content" jdbcType="LONGVARBINARY" property="content" />
|
||||
</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">
|
||||
id, bug_id, num, create_user, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.bug.domain.BugHistoryExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_history
|
||||
<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.bug.domain.BugHistoryExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from bug_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from bug_history
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bug_history
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugHistoryExample">
|
||||
delete from bug_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugHistory">
|
||||
insert into bug_history (id, bug_id, num,
|
||||
create_user, create_time, content
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugHistory">
|
||||
insert into bug_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
bug_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
#{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugHistoryExample" resultType="java.lang.Long">
|
||||
select count(*) from bug_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update bug_history
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bugId != null">
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update bug_history
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bug_history
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugHistory">
|
||||
update bug_history
|
||||
<set>
|
||||
<if test="bugId != null">
|
||||
bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.bug.domain.BugHistory">
|
||||
update bug_history
|
||||
set bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugHistory">
|
||||
update bug_history
|
||||
set bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_history
|
||||
(id, bug_id, num, create_user, create_time, content)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.bugId,jdbcType=VARCHAR}, #{item.num,jdbcType=INTEGER},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.content,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_history (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'content'.toString() == column.value">
|
||||
#{item.content,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -2,9 +2,10 @@ package io.metersphere.bug.mapper;
|
|||
|
||||
import io.metersphere.bug.domain.Bug;
|
||||
import io.metersphere.bug.domain.BugExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugMapper {
|
||||
long countByExample(BugExample example);
|
||||
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="assign_user" jdbcType="VARCHAR" property="assignUser" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="platform" jdbcType="VARCHAR" property="platform" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="source_id" jdbcType="VARCHAR" property="sourceId" />
|
||||
<result column="platform_status" jdbcType="VARCHAR" property="platformStatus" />
|
||||
<result column="platform_id" jdbcType="VARCHAR" property="platformId" />
|
||||
<result column="template_id" jdbcType="VARCHAR" property="templateId" />
|
||||
<result column="platform" jdbcType="VARCHAR" property="platform" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="platform_bug_id" jdbcType="VARCHAR" property="platformBugId" />
|
||||
<result column="trash" jdbcType="BIT" property="trash" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -73,8 +75,8 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, num, title, create_time, update_time, platform, project_id, create_user, source_id,
|
||||
platform_status, platform_id
|
||||
id, num, title, assign_user, create_user, create_time, update_time, project_id, template_id,
|
||||
platform, `status`, platform_bug_id, trash
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -108,13 +110,15 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.Bug">
|
||||
insert into bug (id, num, title,
|
||||
create_time, update_time, platform,
|
||||
project_id, create_user, source_id,
|
||||
platform_status, platform_id)
|
||||
assign_user, create_user, create_time,
|
||||
update_time, project_id, template_id,
|
||||
platform, `status`, platform_bug_id,
|
||||
trash)
|
||||
values (#{id,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{platform,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR},
|
||||
#{platformStatus,jdbcType=VARCHAR}, #{platformId,jdbcType=VARCHAR})
|
||||
#{assignUser,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR},
|
||||
#{platform,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{platformBugId,jdbcType=VARCHAR},
|
||||
#{trash,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.Bug">
|
||||
insert into bug
|
||||
|
@ -128,29 +132,35 @@
|
|||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="assignUser != null">
|
||||
assign_user,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
platform,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
<if test="templateId != null">
|
||||
template_id,
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
source_id,
|
||||
<if test="platform != null">
|
||||
platform,
|
||||
</if>
|
||||
<if test="platformStatus != null">
|
||||
platform_status,
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="platformId != null">
|
||||
platform_id,
|
||||
<if test="platformBugId != null">
|
||||
platform_bug_id,
|
||||
</if>
|
||||
<if test="trash != null">
|
||||
trash,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
@ -163,29 +173,35 @@
|
|||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="assignUser != null">
|
||||
#{assignUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
#{platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
<if test="templateId != null">
|
||||
#{templateId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
#{sourceId,jdbcType=VARCHAR},
|
||||
<if test="platform != null">
|
||||
#{platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="platformStatus != null">
|
||||
#{platformStatus,jdbcType=VARCHAR},
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="platformId != null">
|
||||
#{platformId,jdbcType=VARCHAR},
|
||||
<if test="platformBugId != null">
|
||||
#{platformBugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trash != null">
|
||||
#{trash,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -207,29 +223,35 @@
|
|||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.assignUser != null">
|
||||
assign_user = #{record.assignUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.platform != null">
|
||||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
<if test="record.templateId != null">
|
||||
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sourceId != null">
|
||||
source_id = #{record.sourceId,jdbcType=VARCHAR},
|
||||
<if test="record.platform != null">
|
||||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.platformStatus != null">
|
||||
platform_status = #{record.platformStatus,jdbcType=VARCHAR},
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.platformId != null">
|
||||
platform_id = #{record.platformId,jdbcType=VARCHAR},
|
||||
<if test="record.platformBugId != null">
|
||||
platform_bug_id = #{record.platformBugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trash != null">
|
||||
trash = #{record.trash,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
|
@ -241,14 +263,16 @@
|
|||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
assign_user = #{record.assignUser,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
source_id = #{record.sourceId,jdbcType=VARCHAR},
|
||||
platform_status = #{record.platformStatus,jdbcType=VARCHAR},
|
||||
platform_id = #{record.platformId,jdbcType=VARCHAR}
|
||||
template_id = #{record.templateId,jdbcType=VARCHAR},
|
||||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
platform_bug_id = #{record.platformBugId,jdbcType=VARCHAR},
|
||||
trash = #{record.trash,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -262,29 +286,35 @@
|
|||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="assignUser != null">
|
||||
assign_user = #{assignUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
platform = #{platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
<if test="templateId != null">
|
||||
template_id = #{templateId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
source_id = #{sourceId,jdbcType=VARCHAR},
|
||||
<if test="platform != null">
|
||||
platform = #{platform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="platformStatus != null">
|
||||
platform_status = #{platformStatus,jdbcType=VARCHAR},
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="platformId != null">
|
||||
platform_id = #{platformId,jdbcType=VARCHAR},
|
||||
<if test="platformBugId != null">
|
||||
platform_bug_id = #{platformBugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trash != null">
|
||||
trash = #{trash,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -293,26 +323,29 @@
|
|||
update bug
|
||||
set num = #{num,jdbcType=INTEGER},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
assign_user = #{assignUser,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
platform = #{platform,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
source_id = #{sourceId,jdbcType=VARCHAR},
|
||||
platform_status = #{platformStatus,jdbcType=VARCHAR},
|
||||
platform_id = #{platformId,jdbcType=VARCHAR}
|
||||
template_id = #{templateId,jdbcType=VARCHAR},
|
||||
platform = #{platform,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
platform_bug_id = #{platformBugId,jdbcType=VARCHAR},
|
||||
trash = #{trash,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug
|
||||
(id, num, title, create_time, update_time, platform, project_id, create_user, source_id,
|
||||
platform_status, platform_id)
|
||||
(id, num, title, assign_user, create_user, create_time, update_time, project_id,
|
||||
template_id, platform, `status`, platform_bug_id, trash)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.num,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.platform,jdbcType=VARCHAR},
|
||||
#{item.projectId,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.sourceId,jdbcType=VARCHAR},
|
||||
#{item.platformStatus,jdbcType=VARCHAR}, #{item.platformId,jdbcType=VARCHAR})
|
||||
#{item.assignUser,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.updateTime,jdbcType=BIGINT}, #{item.projectId,jdbcType=VARCHAR}, #{item.templateId,jdbcType=VARCHAR},
|
||||
#{item.platform,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.platformBugId,jdbcType=VARCHAR},
|
||||
#{item.trash,jdbcType=BIT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
|
@ -334,29 +367,35 @@
|
|||
<if test="'title'.toString() == column.value">
|
||||
#{item.title,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'assign_user'.toString() == column.value">
|
||||
#{item.assignUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'platform'.toString() == column.value">
|
||||
#{item.platform,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
<if test="'template_id'.toString() == column.value">
|
||||
#{item.templateId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'source_id'.toString() == column.value">
|
||||
#{item.sourceId,jdbcType=VARCHAR}
|
||||
<if test="'platform'.toString() == column.value">
|
||||
#{item.platform,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'platform_status'.toString() == column.value">
|
||||
#{item.platformStatus,jdbcType=VARCHAR}
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'platform_id'.toString() == column.value">
|
||||
#{item.platformId,jdbcType=VARCHAR}
|
||||
<if test="'platform_bug_id'.toString() == column.value">
|
||||
#{item.platformBugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'trash'.toString() == column.value">
|
||||
#{item.trash,jdbcType=BIT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package io.metersphere.bug.mapper;
|
||||
|
||||
import io.metersphere.bug.domain.BugRelationCase;
|
||||
import io.metersphere.bug.domain.BugRelationCaseExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BugRelationCaseMapper {
|
||||
long countByExample(BugRelationCaseExample example);
|
||||
|
||||
int deleteByExample(BugRelationCaseExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BugRelationCase record);
|
||||
|
||||
int insertSelective(BugRelationCase record);
|
||||
|
||||
List<BugRelationCase> selectByExample(BugRelationCaseExample example);
|
||||
|
||||
BugRelationCase selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BugRelationCase record, @Param("example") BugRelationCaseExample example);
|
||||
|
||||
int updateByExample(@Param("record") BugRelationCase record, @Param("example") BugRelationCaseExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BugRelationCase record);
|
||||
|
||||
int updateByPrimaryKey(BugRelationCase record);
|
||||
|
||||
int batchInsert(@Param("list") List<BugRelationCase> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<BugRelationCase> list, @Param("selective") BugRelationCase.Column ... selective);
|
||||
}
|
|
@ -1,12 +1,14 @@
|
|||
<?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.bug.mapper.BugFunctionalCaseMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugFunctionalCase">
|
||||
<mapper namespace="io.metersphere.bug.mapper.BugRelationCaseMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.bug.domain.BugRelationCase">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
||||
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
||||
<result column="bug_id" jdbcType="VARCHAR" property="bugId" />
|
||||
<result column="ref_type" jdbcType="VARCHAR" property="refType" />
|
||||
<result column="ref_id" jdbcType="VARCHAR" property="refId" />
|
||||
<result column="case_type" jdbcType="VARCHAR" property="caseType" />
|
||||
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
|
||||
<result column="test_plan_case_id" jdbcType="VARCHAR" property="testPlanCaseId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
|
@ -69,15 +71,16 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, resource_id, bug_id, ref_type, ref_id, create_time, update_time
|
||||
id, case_id, bug_id, case_type, test_plan_id, test_plan_case_id, create_user, create_time,
|
||||
update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugFunctionalCaseExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugRelationCaseExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from bug_functional_case
|
||||
from bug_relation_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -88,44 +91,52 @@
|
|||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bug_functional_case
|
||||
from bug_relation_case
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bug_functional_case
|
||||
delete from bug_relation_case
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugFunctionalCaseExample">
|
||||
delete from bug_functional_case
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.bug.domain.BugRelationCaseExample">
|
||||
delete from bug_relation_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugFunctionalCase">
|
||||
insert into bug_functional_case (id, resource_id, bug_id,
|
||||
ref_type, ref_id, create_time,
|
||||
update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR},
|
||||
#{refType,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT})
|
||||
<insert id="insert" parameterType="io.metersphere.bug.domain.BugRelationCase">
|
||||
insert into bug_relation_case (id, case_id, bug_id,
|
||||
case_type, test_plan_id, test_plan_case_id,
|
||||
create_user, create_time, update_time
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR},
|
||||
#{caseType,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{testPlanCaseId,jdbcType=VARCHAR},
|
||||
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugFunctionalCase">
|
||||
insert into bug_functional_case
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.BugRelationCase">
|
||||
insert into bug_relation_case
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
resource_id,
|
||||
<if test="caseId != null">
|
||||
case_id,
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
bug_id,
|
||||
</if>
|
||||
<if test="refType != null">
|
||||
ref_type,
|
||||
<if test="caseType != null">
|
||||
case_type,
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id,
|
||||
<if test="testPlanId != null">
|
||||
test_plan_id,
|
||||
</if>
|
||||
<if test="testPlanCaseId != null">
|
||||
test_plan_case_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
|
@ -138,17 +149,23 @@
|
|||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
#{resourceId,jdbcType=VARCHAR},
|
||||
<if test="caseId != null">
|
||||
#{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
#{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refType != null">
|
||||
#{refType,jdbcType=VARCHAR},
|
||||
<if test="caseType != null">
|
||||
#{caseType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
#{refId,jdbcType=VARCHAR},
|
||||
<if test="testPlanId != null">
|
||||
#{testPlanId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testPlanCaseId != null">
|
||||
#{testPlanCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
|
@ -158,29 +175,35 @@
|
|||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugFunctionalCaseExample" resultType="java.lang.Long">
|
||||
select count(*) from bug_functional_case
|
||||
<select id="countByExample" parameterType="io.metersphere.bug.domain.BugRelationCaseExample" resultType="java.lang.Long">
|
||||
select count(*) from bug_relation_case
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update bug_functional_case
|
||||
update bug_relation_case
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resourceId != null">
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
<if test="record.caseId != null">
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bugId != null">
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.refType != null">
|
||||
ref_type = #{record.refType,jdbcType=VARCHAR},
|
||||
<if test="record.caseType != null">
|
||||
case_type = #{record.caseType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.refId != null">
|
||||
ref_id = #{record.refId,jdbcType=VARCHAR},
|
||||
<if test="record.testPlanId != null">
|
||||
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testPlanCaseId != null">
|
||||
test_plan_case_id = #{record.testPlanCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
|
@ -194,32 +217,40 @@
|
|||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bug_functional_case
|
||||
update bug_relation_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
bug_id = #{record.bugId,jdbcType=VARCHAR},
|
||||
ref_type = #{record.refType,jdbcType=VARCHAR},
|
||||
ref_id = #{record.refId,jdbcType=VARCHAR},
|
||||
case_type = #{record.caseType,jdbcType=VARCHAR},
|
||||
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
|
||||
test_plan_case_id = #{record.testPlanCaseId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugFunctionalCase">
|
||||
update bug_functional_case
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.bug.domain.BugRelationCase">
|
||||
update bug_relation_case
|
||||
<set>
|
||||
<if test="resourceId != null">
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
<if test="caseId != null">
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bugId != null">
|
||||
bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refType != null">
|
||||
ref_type = #{refType,jdbcType=VARCHAR},
|
||||
<if test="caseType != null">
|
||||
case_type = #{caseType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id = #{refId,jdbcType=VARCHAR},
|
||||
<if test="testPlanId != null">
|
||||
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testPlanCaseId != null">
|
||||
test_plan_case_id = #{testPlanCaseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
|
@ -230,14 +261,69 @@
|
|||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugFunctionalCase">
|
||||
update bug_functional_case
|
||||
set resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.bug.domain.BugRelationCase">
|
||||
update bug_relation_case
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
bug_id = #{bugId,jdbcType=VARCHAR},
|
||||
ref_type = #{refType,jdbcType=VARCHAR},
|
||||
ref_id = #{refId,jdbcType=VARCHAR},
|
||||
case_type = #{caseType,jdbcType=VARCHAR},
|
||||
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
|
||||
test_plan_case_id = #{testPlanCaseId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug_relation_case
|
||||
(id, case_id, bug_id, case_type, test_plan_id, test_plan_case_id, create_user, create_time,
|
||||
update_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.caseId,jdbcType=VARCHAR}, #{item.bugId,jdbcType=VARCHAR},
|
||||
#{item.caseType,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.testPlanCaseId,jdbcType=VARCHAR},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into bug_relation_case (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'case_id'.toString() == column.value">
|
||||
#{item.caseId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'bug_id'.toString() == column.value">
|
||||
#{item.bugId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'case_type'.toString() == column.value">
|
||||
#{item.caseType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'test_plan_id'.toString() == column.value">
|
||||
#{item.testPlanId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'test_plan_case_id'.toString() == column.value">
|
||||
#{item.testPlanCaseId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -1,23 +1,125 @@
|
|||
-- set innodb lock wait timeout
|
||||
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||
|
||||
DROP TABLE IF EXISTS bug;
|
||||
CREATE TABLE IF NOT EXISTS bug(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`num` INT NOT NULL COMMENT '业务ID' ,
|
||||
`title` VARCHAR(300) NOT NULL COMMENT '缺陷标题' ,
|
||||
`assign_user` VARCHAR(50) NOT NULL COMMENT '指派人' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
`platform` VARCHAR(50) NOT NULL COMMENT '缺陷平台' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`source_id` VARCHAR(50) COMMENT '缺陷来源,记录创建该缺陷的测试计划的ID' ,
|
||||
`platform_status` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '第三方平台状态' ,
|
||||
`platform_id` VARCHAR(50) COMMENT '第三方平台缺陷ID' ,
|
||||
`template_id` VARCHAR(50) COMMENT '模板ID' ,
|
||||
`platform` VARCHAR(50) NOT NULL COMMENT '缺陷平台' ,
|
||||
`status` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '平台状态' ,
|
||||
`platform_bug_id` VARCHAR(50) COMMENT '第三方平台缺陷ID' ,
|
||||
`trash` BIT(1) NOT NULL COMMENT '是否回收站' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '缺陷';
|
||||
) COMMENT = '缺陷';
|
||||
|
||||
|
||||
CREATE INDEX idx_num ON bug(num);
|
||||
CREATE INDEX idx_title ON bug(title);
|
||||
CREATE INDEX idx_assign_user ON bug(assign_user);
|
||||
CREATE INDEX idx_create_user ON bug(create_user);
|
||||
CREATE INDEX idx_create_time ON bug(create_time);
|
||||
CREATE INDEX idx_update_time ON bug(update_time);
|
||||
CREATE INDEX idx_project_id ON bug(project_id);
|
||||
CREATE INDEX idx_platform ON bug(platform);
|
||||
CREATE INDEX idx_status ON bug(status);
|
||||
CREATE INDEX idx_trash ON bug(trash);
|
||||
|
||||
DROP TABLE IF EXISTS bug_content;
|
||||
CREATE TABLE IF NOT EXISTS bug_content(
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`description` LONGTEXT COMMENT '缺陷描述' ,
|
||||
PRIMARY KEY (bug_id)
|
||||
) COMMENT = '缺陷内容';
|
||||
|
||||
DROP TABLE IF EXISTS bug_follower;
|
||||
CREATE TABLE IF NOT EXISTS bug_follower(
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID' ,
|
||||
PRIMARY KEY (bug_id,user_id)
|
||||
) COMMENT = '缺陷关注人';
|
||||
|
||||
|
||||
CREATE INDEX idx_follow_id ON bug_follower(user_id);
|
||||
|
||||
DROP TABLE IF EXISTS bug_comment;
|
||||
CREATE TABLE IF NOT EXISTS bug_comment(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`reply_user` VARCHAR(50) COMMENT '回复人' ,
|
||||
`parent_id` VARCHAR(50) COMMENT '父评论ID' ,
|
||||
`description` TEXT NOT NULL COMMENT '内容' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '评论人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '更新人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '缺陷评论';
|
||||
|
||||
|
||||
CREATE INDEX idx_bug_id ON bug_comment(bug_id);
|
||||
CREATE INDEX idx_parent_id ON bug_comment(parent_id);
|
||||
|
||||
DROP TABLE IF EXISTS bug_attachment;
|
||||
CREATE TABLE IF NOT EXISTS bug_attachment(
|
||||
`id` VARCHAR(255) NOT NULL COMMENT 'ID' ,
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`file_id` VARCHAR(50) NOT NULL COMMENT '文件ID' ,
|
||||
`file_name` VARCHAR(255) NOT NULL COMMENT '文件名称' ,
|
||||
`size` BIGINT NOT NULL COMMENT '文件大小' ,
|
||||
`association` BIT(1) NOT NULL COMMENT '是否关联' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '缺陷附件';
|
||||
|
||||
DROP TABLE IF EXISTS bug_custom_field;
|
||||
CREATE TABLE IF NOT EXISTS bug_custom_field(
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`field_id` VARCHAR(50) NOT NULL COMMENT '字段ID' ,
|
||||
`value` VARCHAR(1000) COMMENT '字段值' ,
|
||||
PRIMARY KEY (bug_id)
|
||||
) COMMENT = '缺陷自定义字段';
|
||||
|
||||
DROP TABLE IF EXISTS bug_relation_case;
|
||||
CREATE TABLE IF NOT EXISTS bug_relation_case(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`case_id` VARCHAR(50) NOT NULL COMMENT '关联功能用例ID' ,
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '缺陷ID' ,
|
||||
`case_type` VARCHAR(64) NOT NULL DEFAULT 'functional' COMMENT '关联的用例类型;functional/api/ui/performance' ,
|
||||
`test_plan_id` VARCHAR(50) COMMENT '关联测试计划ID' ,
|
||||
`test_plan_case_id` VARCHAR(50) COMMENT '关联测试计划用例ID' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '用例和缺陷的关联表';
|
||||
|
||||
|
||||
CREATE INDEX idx_bug_id ON bug_relation_case(bug_id);
|
||||
CREATE INDEX idx_plan_case_id ON bug_relation_case(test_plan_id,test_plan_case_id);
|
||||
CREATE INDEX idx_case_id ON bug_relation_case(case_id);
|
||||
CREATE INDEX idx_case_type ON bug_relation_case(case_type);
|
||||
|
||||
DROP TABLE IF EXISTS bug_history;
|
||||
CREATE TABLE IF NOT EXISTS bug_history(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '变更记录ID' ,
|
||||
`bug_id` VARCHAR(50) NOT NULL COMMENT '所属缺陷ID' ,
|
||||
`num` INT NOT NULL COMMENT '变更记录批次号' ,
|
||||
`content` BLOB NOT NULL COMMENT '修改内容' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '操作人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '操作时间' ,
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '缺陷变更记录';
|
||||
|
||||
|
||||
CREATE INDEX idx_bug_id ON bug_history(bug_id);
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
||||
|
|
|
@ -1,38 +1,30 @@
|
|||
bug_exists=The bug already exists under this project
|
||||
|
||||
# bug
|
||||
bug.id.not_blank=ID不能为空
|
||||
bug.id.length_range=ID长度必须在1-50之间
|
||||
bug.title.not_blank=缺陷标题不能为空
|
||||
bug.title.length_range=缺陷标题长度必须在1-50之间
|
||||
bug.platform.not_blank=缺陷平台不能为空
|
||||
bug.platform.length_range=缺陷平台长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
bug.project_id.length_range=项目ID长度必须在1-50之间
|
||||
bug.assign_user.not_blank=指派人不能为空
|
||||
bug.assign_user.length_range=指派人长度必须在1-50之间
|
||||
bug.create_user.not_blank=创建人不能为空
|
||||
bug.create_user.length_range=创建人长度必须在1-50之间
|
||||
bug.platform_status.not_blank=第三方平台状态不能为空
|
||||
bug.platform_status.length_range=第三方平台状态长度必须在1-50之间
|
||||
bug_blob.id.not_blank=缺陷ID不能为空
|
||||
bug_blob.id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
bug.project_id.length_range=项目ID长度必须在1-50之间
|
||||
bug.platform.not_blank=缺陷平台不能为空
|
||||
bug.platform.length_range=缺陷平台长度必须在1-50之间
|
||||
bug.status.not_blank=平台状态不能为空
|
||||
bug.status.length_range=平台状态长度必须在1-50之间
|
||||
bug.trash.not_blank=是否回收站不能为空
|
||||
bug.trash.length_range=是否回收站长度必须在1-50之间
|
||||
|
||||
# bugsFunctionalCase
|
||||
bugs_functional_case.id.not_blank=ID不能为空
|
||||
bugs_functional_case.id.length_range=ID长度必须在1-50之间
|
||||
bugs_functional_case.resource_id.not_blank=功能用例或测试计划功能用例ID不能为空
|
||||
bugs_functional_case.resource_id.length_range=功能用例或测试计划功能用例ID长度必须在1-50之间
|
||||
bugs_functional_case.bugs_id.not_blank=缺陷ID不能为空
|
||||
bugs_functional_case.bugs_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bugs_functional_case.ref_type.not_blank=关联的类型:关联功能用例/关联测试计划功能用例不能为空
|
||||
bugs_functional_case.ref_type.length_range=关联的类型:关联功能用例/关联测试计划功能用例长度必须在1-50之间
|
||||
bugs_functional_case.ref_id.not_blank=测试计划的用例所指向的用例的id不能为空
|
||||
bugs_functional_case.ref_id.length_range=测试计划的用例所指向的用例的id长度必须在1-50之间
|
||||
# bugContent
|
||||
bug_content.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_content.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
|
||||
# bugAttachment
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_attachment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_attachment.file_id.not_blank=文件的ID不能为空
|
||||
bug_attachment.file_id.length_range=文件的ID长度必须在1-50之间
|
||||
# bugFollower
|
||||
bug_follower.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_follower.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_follower.user_id.not_blank=关注人ID不能为空
|
||||
bug_follower.user_id.length_range=关注人ID长度必须在1-50之间
|
||||
|
||||
# bugComment
|
||||
bug_comment.id.not_blank=ID不能为空
|
||||
|
@ -41,9 +33,45 @@ bug_comment.bug_id.not_blank=缺陷ID不能为空
|
|||
bug_comment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_comment.create_user.not_blank=评论人不能为空
|
||||
bug_comment.create_user.length_range=评论人长度必须在1-50之间
|
||||
bug_comment.update_user.not_blank=更新人不能为空
|
||||
bug_comment.update_user.length_range=更新人长度必须在1-50之间
|
||||
|
||||
# bugFollow
|
||||
bug_follow.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_follow.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_follow.follow_id.not_blank=关注人ID不能为空
|
||||
bug_follow.follow_id.length_range=关注人ID长度必须在1-50之间
|
||||
# bugAttachment
|
||||
bug_attachment.id.not_blank=ID不能为空
|
||||
bug_attachment.id.length_range=ID长度必须在1-50之间
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_attachment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_attachment.file_id.not_blank=文件ID不能为空
|
||||
bug_attachment.file_id.length_range=文件ID长度必须在1-50之间
|
||||
bug_attachment.file_name.not_blank=文件名称不能为空
|
||||
bug_attachment.file_name.length_range=文件名称长度必须在1-50之间
|
||||
bug_attachment.association.not_blank=是否关联不能为空
|
||||
bug_attachment.association.length_range=是否关联长度必须在1-50之间
|
||||
bug_attachment.create_user.not_blank=创建人不能为空
|
||||
bug_attachment.create_user.length_range=创建人长度必须在1-50之间
|
||||
|
||||
# bugCustomField
|
||||
bug_custom_field.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_custom_field.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_custom_field.field_id.not_blank=字段ID不能为空
|
||||
bug_custom_field.field_id.length_range=字段ID长度必须在1-50之间
|
||||
|
||||
# bugRelationCase
|
||||
bug_relation_case.id.not_blank=ID不能为空
|
||||
bug_relation_case.id.length_range=ID长度必须在1-50之间
|
||||
bug_relation_case.case_id.not_blank=关联功能用例ID不能为空
|
||||
bug_relation_case.case_id.length_range=关联功能用例ID长度必须在1-50之间
|
||||
bug_relation_case.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_relation_case.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_relation_case.case_type.not_blank=关联的用例类型不能为空
|
||||
bug_relation_case.case_type.length_range=关联的用例类型长度必须在1-50之间
|
||||
bug_relation_case.create_user.not_blank=创建人不能为空
|
||||
bug_relation_case.create_user.length_range=创建人长度必须在1-50之间
|
||||
|
||||
# bugHistory
|
||||
bug_history.id.not_blank=变更记录ID不能为空
|
||||
bug_history.id.length_range=变更记录ID长度必须在1-50之间
|
||||
bug_history.bug_id.not_blank=所属缺陷ID不能为空
|
||||
bug_history.bug_id.length_range=所属缺陷ID长度必须在1-50之间
|
||||
bug_history.create_user.not_blank=操作人不能为空
|
||||
bug_history.create_user.length_range=操作人长度必须在1-50之间
|
|
@ -1,38 +1,30 @@
|
|||
bug_exists=The bug already exists under this project
|
||||
|
||||
# bug
|
||||
bug.id.not_blank=id cannot be empty
|
||||
bug.id.length_range=id length must be between 1-50
|
||||
bug.title.not_blank=title cannot be empty
|
||||
bug.title.length_range=title length must be between 1-50
|
||||
bug.platform.not_blank=platform cannot be empty
|
||||
bug.platform.length_range=platform length must be between 1-50
|
||||
bug.project_id.not_blank=projectId cannot be empty
|
||||
bug.project_id.length_range=projectId length must be between 1-50
|
||||
bug.assign_user.not_blank=assignUser cannot be empty
|
||||
bug.assign_user.length_range=assignUser length must be between 1-50
|
||||
bug.create_user.not_blank=createUser cannot be empty
|
||||
bug.create_user.length_range=createUser length must be between 1-50
|
||||
bug.platform_status.not_blank=platformStatus cannot be empty
|
||||
bug.platform_status.length_range=platformStatus length must be between 1-50
|
||||
bug_blob.id.not_blank=id cannot be empty
|
||||
bug_blob.id.length_range=id length must be between 1-50
|
||||
bug.project_id.not_blank=projectId cannot be empty
|
||||
bug.project_id.length_range=projectId length must be between 1-50
|
||||
bug.platform.not_blank=platform cannot be empty
|
||||
bug.platform.length_range=platform length must be between 1-50
|
||||
bug.status.not_blank=status cannot be empty
|
||||
bug.status.length_range=status length must be between 1-50
|
||||
bug.trash.not_blank=trash cannot be empty
|
||||
bug.trash.length_range=trash length must be between 1-50
|
||||
|
||||
# bugsFunctionalCase
|
||||
bugs_functional_case.id.not_blank=id cannot be empty
|
||||
bugs_functional_case.id.length_range=id length must be between 1-50
|
||||
bugs_functional_case.resource_id.not_blank=resourceId cannot be empty
|
||||
bugs_functional_case.resource_id.length_range=resourceId length must be between 1-50
|
||||
bugs_functional_case.bugs_id.not_blank=bugsId cannot be empty
|
||||
bugs_functional_case.bugs_id.length_range=bugsId length must be between 1-50
|
||||
bugs_functional_case.ref_type.not_blank=refType cannot be empty
|
||||
bugs_functional_case.ref_type.length_range=refType length must be between 1-50
|
||||
bugs_functional_case.ref_id.not_blank=refId cannot be empty
|
||||
bugs_functional_case.ref_id.length_range=refId length must be between 1-50
|
||||
# bugContent
|
||||
bug_content.bug_id.not_blank=bugId cannot be empty
|
||||
bug_content.bug_id.length_range=bugId length must be between 1-50
|
||||
|
||||
# bugAttachment
|
||||
bug_attachment.bug_id.not_blank=bugId cannot be empty
|
||||
bug_attachment.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_attachment.file_id.not_blank=fileId cannot be empty
|
||||
bug_attachment.file_id.length_range=fileId length must be between 1-50
|
||||
# bugFollower
|
||||
bug_follower.bug_id.not_blank=bugId cannot be empty
|
||||
bug_follower.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_follower.user_id.not_blank=userId cannot be empty
|
||||
bug_follower.user_id.length_range=userId length must be between 1-50
|
||||
|
||||
# bugComment
|
||||
bug_comment.id.not_blank=id cannot be empty
|
||||
|
@ -41,8 +33,45 @@ bug_comment.bug_id.not_blank=bugId cannot be empty
|
|||
bug_comment.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_comment.create_user.not_blank=createUser cannot be empty
|
||||
bug_comment.create_user.length_range=createUser length must be between 1-50
|
||||
bug_comment.update_user.not_blank=updateUser cannot be empty
|
||||
bug_comment.update_user.length_range=updateUser length must be between 1-50
|
||||
|
||||
# bugFollow
|
||||
bug_follow.bug_id.not_blank=bugId cannot be empty
|
||||
bug_follow.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_follow.follow_id.not_blank=followId cannot be empty
|
||||
# bugAttachment
|
||||
bug_attachment.id.not_blank=id cannot be empty
|
||||
bug_attachment.id.length_range=id length must be between 1-50
|
||||
bug_attachment.bug_id.not_blank=bugId cannot be empty
|
||||
bug_attachment.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_attachment.file_id.not_blank=fileId cannot be empty
|
||||
bug_attachment.file_id.length_range=fileId length must be between 1-50
|
||||
bug_attachment.file_name.not_blank=fileName cannot be empty
|
||||
bug_attachment.file_name.length_range=fileName length must be between 1-50
|
||||
bug_attachment.association.not_blank=association cannot be empty
|
||||
bug_attachment.association.length_range=association length must be between 1-50
|
||||
bug_attachment.create_user.not_blank=createUser cannot be empty
|
||||
bug_attachment.create_user.length_range=createUser length must be between 1-50
|
||||
|
||||
# bugCustomField
|
||||
bug_custom_field.bug_id.not_blank=bugId cannot be empty
|
||||
bug_custom_field.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_custom_field.field_id.not_blank=fieldId cannot be empty
|
||||
bug_custom_field.field_id.length_range=fieldId length must be between 1-50
|
||||
|
||||
# bugRelationCase
|
||||
bug_relation_case.id.not_blank=id cannot be empty
|
||||
bug_relation_case.id.length_range=id length must be between 1-50
|
||||
bug_relation_case.case_id.not_blank=caseId cannot be empty
|
||||
bug_relation_case.case_id.length_range=caseId length must be between 1-50
|
||||
bug_relation_case.bug_id.not_blank=bugId cannot be empty
|
||||
bug_relation_case.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_relation_case.case_type.not_blank=caseType cannot be empty
|
||||
bug_relation_case.case_type.length_range=caseType length must be between 1-50
|
||||
bug_relation_case.create_user.not_blank=createUser cannot be empty
|
||||
bug_relation_case.create_user.length_range=createUser length must be between 1-50
|
||||
|
||||
# bugHistory
|
||||
bug_history.id.not_blank=id cannot be empty
|
||||
bug_history.id.length_range=id length must be between 1-50
|
||||
bug_history.bug_id.not_blank=bugId cannot be empty
|
||||
bug_history.bug_id.length_range=bugId length must be between 1-50
|
||||
bug_history.create_user.not_blank=createUser cannot be empty
|
||||
bug_history.create_user.length_range=createUser length must be between 1-50
|
|
@ -1,38 +1,30 @@
|
|||
bug_exists=The bug already exists under this project
|
||||
|
||||
# bug
|
||||
bug.id.not_blank=ID不能为空
|
||||
bug.id.length_range=ID长度必须在1-50之间
|
||||
bug.title.not_blank=缺陷标题不能为空
|
||||
bug.title.length_range=缺陷标题长度必须在1-50之间
|
||||
bug.platform.not_blank=缺陷平台不能为空
|
||||
bug.platform.length_range=缺陷平台长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
bug.project_id.length_range=项目ID长度必须在1-50之间
|
||||
bug.assign_user.not_blank=指派人不能为空
|
||||
bug.assign_user.length_range=指派人长度必须在1-50之间
|
||||
bug.create_user.not_blank=创建人不能为空
|
||||
bug.create_user.length_range=创建人长度必须在1-50之间
|
||||
bug.platform_status.not_blank=第三方平台状态不能为空
|
||||
bug.platform_status.length_range=第三方平台状态长度必须在1-50之间
|
||||
bug_blob.id.not_blank=缺陷ID不能为空
|
||||
bug_blob.id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
bug.project_id.length_range=项目ID长度必须在1-50之间
|
||||
bug.platform.not_blank=缺陷平台不能为空
|
||||
bug.platform.length_range=缺陷平台长度必须在1-50之间
|
||||
bug.status.not_blank=平台状态不能为空
|
||||
bug.status.length_range=平台状态长度必须在1-50之间
|
||||
bug.trash.not_blank=是否回收站不能为空
|
||||
bug.trash.length_range=是否回收站长度必须在1-50之间
|
||||
|
||||
# bugsFunctionalCase
|
||||
bugs_functional_case.id.not_blank=ID不能为空
|
||||
bugs_functional_case.id.length_range=ID长度必须在1-50之间
|
||||
bugs_functional_case.resource_id.not_blank=功能用例或测试计划功能用例ID不能为空
|
||||
bugs_functional_case.resource_id.length_range=功能用例或测试计划功能用例ID长度必须在1-50之间
|
||||
bugs_functional_case.bugs_id.not_blank=缺陷ID不能为空
|
||||
bugs_functional_case.bugs_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bugs_functional_case.ref_type.not_blank=关联的类型:关联功能用例/关联测试计划功能用例不能为空
|
||||
bugs_functional_case.ref_type.length_range=关联的类型:关联功能用例/关联测试计划功能用例长度必须在1-50之间
|
||||
bugs_functional_case.ref_id.not_blank=测试计划的用例所指向的用例的id不能为空
|
||||
bugs_functional_case.ref_id.length_range=测试计划的用例所指向的用例的id长度必须在1-50之间
|
||||
# bugContent
|
||||
bug_content.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_content.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
|
||||
# bugAttachment
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_attachment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_attachment.file_id.not_blank=文件的ID不能为空
|
||||
bug_attachment.file_id.length_range=文件的ID长度必须在1-50之间
|
||||
# bugFollower
|
||||
bug_follower.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_follower.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_follower.user_id.not_blank=关注人ID不能为空
|
||||
bug_follower.user_id.length_range=关注人ID长度必须在1-50之间
|
||||
|
||||
# bugComment
|
||||
bug_comment.id.not_blank=ID不能为空
|
||||
|
@ -41,9 +33,45 @@ bug_comment.bug_id.not_blank=缺陷ID不能为空
|
|||
bug_comment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_comment.create_user.not_blank=评论人不能为空
|
||||
bug_comment.create_user.length_range=评论人长度必须在1-50之间
|
||||
bug_comment.update_user.not_blank=更新人不能为空
|
||||
bug_comment.update_user.length_range=更新人长度必须在1-50之间
|
||||
|
||||
# bugFollow
|
||||
bug_follow.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_follow.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_follow.follow_id.not_blank=关注人ID不能为空
|
||||
bug_follow.follow_id.length_range=关注人ID长度必须在1-50之间
|
||||
# bugAttachment
|
||||
bug_attachment.id.not_blank=ID不能为空
|
||||
bug_attachment.id.length_range=ID长度必须在1-50之间
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_attachment.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_attachment.file_id.not_blank=文件ID不能为空
|
||||
bug_attachment.file_id.length_range=文件ID长度必须在1-50之间
|
||||
bug_attachment.file_name.not_blank=文件名称不能为空
|
||||
bug_attachment.file_name.length_range=文件名称长度必须在1-50之间
|
||||
bug_attachment.association.not_blank=是否关联不能为空
|
||||
bug_attachment.association.length_range=是否关联长度必须在1-50之间
|
||||
bug_attachment.create_user.not_blank=创建人不能为空
|
||||
bug_attachment.create_user.length_range=创建人长度必须在1-50之间
|
||||
|
||||
# bugCustomField
|
||||
bug_custom_field.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_custom_field.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_custom_field.field_id.not_blank=字段ID不能为空
|
||||
bug_custom_field.field_id.length_range=字段ID长度必须在1-50之间
|
||||
|
||||
# bugRelationCase
|
||||
bug_relation_case.id.not_blank=ID不能为空
|
||||
bug_relation_case.id.length_range=ID长度必须在1-50之间
|
||||
bug_relation_case.case_id.not_blank=关联功能用例ID不能为空
|
||||
bug_relation_case.case_id.length_range=关联功能用例ID长度必须在1-50之间
|
||||
bug_relation_case.bug_id.not_blank=缺陷ID不能为空
|
||||
bug_relation_case.bug_id.length_range=缺陷ID长度必须在1-50之间
|
||||
bug_relation_case.case_type.not_blank=关联的用例类型不能为空
|
||||
bug_relation_case.case_type.length_range=关联的用例类型长度必须在1-50之间
|
||||
bug_relation_case.create_user.not_blank=创建人不能为空
|
||||
bug_relation_case.create_user.length_range=创建人长度必须在1-50之间
|
||||
|
||||
# bugHistory
|
||||
bug_history.id.not_blank=变更记录ID不能为空
|
||||
bug_history.id.length_range=变更记录ID长度必须在1-50之间
|
||||
bug_history.bug_id.not_blank=所属缺陷ID不能为空
|
||||
bug_history.bug_id.length_range=所属缺陷ID长度必须在1-50之间
|
||||
bug_history.create_user.not_blank=操作人不能为空
|
||||
bug_history.create_user.length_range=操作人长度必须在1-50之间
|
|
@ -1,38 +1,30 @@
|
|||
bug_exists=該項目下已存在該缺陷
|
||||
|
||||
# bug
|
||||
bug.id.not_blank=ID不能為空
|
||||
bug.id.length_range=ID長度必須在1-50之間
|
||||
bug.title.not_blank=缺陷标题不能為空
|
||||
bug.title.length_range=缺陷标题長度必須在1-50之間
|
||||
bug.platform.not_blank=缺陷平台不能為空
|
||||
bug.platform.length_range=缺陷平台長度必須在1-50之間
|
||||
bug.project_id.not_blank=项目ID不能為空
|
||||
bug.project_id.length_range=项目ID長度必須在1-50之間
|
||||
bug.assign_user.not_blank=指派人不能為空
|
||||
bug.assign_user.length_range=指派人長度必須在1-50之間
|
||||
bug.create_user.not_blank=创建人不能為空
|
||||
bug.create_user.length_range=创建人長度必須在1-50之間
|
||||
bug.platform_status.not_blank=第三方平台状态不能為空
|
||||
bug.platform_status.length_range=第三方平台状态長度必須在1-50之間
|
||||
bug_blob.id.not_blank=缺陷ID不能為空
|
||||
bug_blob.id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug.project_id.not_blank=项目ID不能為空
|
||||
bug.project_id.length_range=项目ID長度必須在1-50之間
|
||||
bug.platform.not_blank=缺陷平台不能為空
|
||||
bug.platform.length_range=缺陷平台長度必須在1-50之間
|
||||
bug.status.not_blank=平台状态不能為空
|
||||
bug.status.length_range=平台状态長度必須在1-50之間
|
||||
bug.trash.not_blank=是否回收站不能為空
|
||||
bug.trash.length_range=是否回收站長度必須在1-50之間
|
||||
|
||||
# bugsFunctionalCase
|
||||
bugs_functional_case.id.not_blank=ID不能為空
|
||||
bugs_functional_case.id.length_range=ID長度必須在1-50之間
|
||||
bugs_functional_case.resource_id.not_blank=功能用例或测试计划功能用例ID不能為空
|
||||
bugs_functional_case.resource_id.length_range=功能用例或测试计划功能用例ID長度必須在1-50之間
|
||||
bugs_functional_case.bugs_id.not_blank=缺陷ID不能為空
|
||||
bugs_functional_case.bugs_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bugs_functional_case.ref_type.not_blank=关联的类型:关联功能用例/关联测试计划功能用例不能為空
|
||||
bugs_functional_case.ref_type.length_range=关联的类型:关联功能用例/关联测试计划功能用例長度必須在1-50之間
|
||||
bugs_functional_case.ref_id.not_blank=测试计划的用例所指向的用例的id不能為空
|
||||
bugs_functional_case.ref_id.length_range=测试计划的用例所指向的用例的id長度必須在1-50之間
|
||||
# bugContent
|
||||
bug_content.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_content.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
|
||||
# bugAttachment
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_attachment.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_attachment.file_id.not_blank=文件的ID不能為空
|
||||
bug_attachment.file_id.length_range=文件的ID長度必須在1-50之間
|
||||
# bugFollower
|
||||
bug_follower.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_follower.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_follower.user_id.not_blank=关注人ID不能為空
|
||||
bug_follower.user_id.length_range=关注人ID長度必須在1-50之間
|
||||
|
||||
# bugComment
|
||||
bug_comment.id.not_blank=ID不能為空
|
||||
|
@ -41,9 +33,47 @@ bug_comment.bug_id.not_blank=缺陷ID不能為空
|
|||
bug_comment.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_comment.create_user.not_blank=评论人不能為空
|
||||
bug_comment.create_user.length_range=评论人長度必須在1-50之間
|
||||
bug_comment.update_user.not_blank=更新人不能為空
|
||||
bug_comment.update_user.length_range=更新人長度必須在1-50之間
|
||||
|
||||
# bugAttachment
|
||||
bug_attachment.id.not_blank=ID不能為空
|
||||
bug_attachment.id.length_range=ID長度必須在1-50之間
|
||||
bug_attachment.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_attachment.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_attachment.file_id.not_blank=文件ID不能為空
|
||||
bug_attachment.file_id.length_range=文件ID長度必須在1-50之間
|
||||
bug_attachment.file_name.not_blank=文件名称不能為空
|
||||
bug_attachment.file_name.length_range=文件名称長度必須在1-50之間
|
||||
bug_attachment.association.not_blank=是否关联不能為空
|
||||
bug_attachment.association.length_range=是否关联長度必須在1-50之間
|
||||
bug_attachment.create_user.not_blank=创建人不能為空
|
||||
bug_attachment.create_user.length_range=创建人長度必須在1-50之間
|
||||
|
||||
# bugCustomField
|
||||
bug_custom_field.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_custom_field.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_custom_field.field_id.not_blank=字段ID不能為空
|
||||
bug_custom_field.field_id.length_range=字段ID長度必須在1-50之間
|
||||
|
||||
# bugRelationCase
|
||||
bug_relation_case.id.not_blank=ID不能為空
|
||||
bug_relation_case.id.length_range=ID長度必須在1-50之間
|
||||
bug_relation_case.case_id.not_blank=关联功能用例ID不能為空
|
||||
bug_relation_case.case_id.length_range=关联功能用例ID長度必須在1-50之間
|
||||
bug_relation_case.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_relation_case.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_relation_case.case_type.not_blank=关联的用例类型不能為空
|
||||
bug_relation_case.case_type.length_range=关联的用例类型長度必須在1-50之間
|
||||
bug_relation_case.create_user.not_blank=创建人不能為空
|
||||
bug_relation_case.create_user.length_range=创建人長度必須在1-50之間
|
||||
|
||||
# bugHistory
|
||||
bug_history.id.not_blank=变更记录ID不能為空
|
||||
bug_history.id.length_range=变更记录ID長度必須在1-50之間
|
||||
bug_history.bug_id.not_blank=所属缺陷ID不能為空
|
||||
bug_history.bug_id.length_range=所属缺陷ID長度必須在1-50之間
|
||||
bug_history.create_user.not_blank=操作人不能為空
|
||||
bug_history.create_user.length_range=操作人長度必須在1-50之間
|
||||
|
||||
|
||||
# bugFollow
|
||||
bug_follow.bug_id.not_blank=缺陷ID不能為空
|
||||
bug_follow.bug_id.length_range=缺陷ID長度必須在1-50之間
|
||||
bug_follow.follow_id.not_blank=关注人ID不能為空
|
||||
bug_follow.follow_id.length_range=关注人ID長度必須在1-50之間
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
package io.metersphere.bug.controller;
|
||||
|
||||
import io.metersphere.bug.domain.Bug;
|
||||
import io.metersphere.bug.service.BugService;
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author : jianxing
|
||||
* @date : 2023-5-17
|
||||
*/
|
||||
@Schema(description = "缺陷")
|
||||
@RestController
|
||||
@RequestMapping("/bug")
|
||||
public class BugController {
|
||||
@Resource
|
||||
private BugService bugService;
|
||||
|
||||
@GetMapping("/list-all")
|
||||
public List<Bug> listAll() {
|
||||
return bugService.list();
|
||||
}
|
||||
|
||||
@GetMapping("/get/{id}")
|
||||
public Bug get(@PathVariable String id) {
|
||||
return bugService.get(id);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public Bug add(@Validated({Created.class}) @RequestBody Bug bug) {
|
||||
return bugService.add(bug);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public Bug update(@Validated({Created.class}) @RequestBody Bug bug) {
|
||||
return bugService.update(bug);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
public int delete(@PathVariable String id) {
|
||||
return bugService.delete(id);
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package io.metersphere.bug.controller.result;
|
||||
|
||||
|
||||
import io.metersphere.sdk.exception.IResultCode;
|
||||
|
||||
public enum BugMgtResultCode implements IResultCode {
|
||||
|
||||
BUG_EXIST_EXCEPTION(108001, "bug_exists");
|
||||
|
||||
private int code;
|
||||
private String message;
|
||||
|
||||
BugMgtResultCode(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return getTranslationMessage(this.message);
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
package io.metersphere.bug.service;
|
||||
|
||||
import io.metersphere.bug.controller.result.BugMgtResultCode;
|
||||
import io.metersphere.bug.domain.Bug;
|
||||
import io.metersphere.bug.domain.BugExample;
|
||||
import io.metersphere.bug.mapper.BugMapper;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author jianxing
|
||||
* @date : 2023-5-17
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class BugService {
|
||||
|
||||
@Resource
|
||||
private BugMapper bugMapper;
|
||||
|
||||
|
||||
public List<Bug> list() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public Bug get(String id) {
|
||||
return bugMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public Bug add(Bug bug) {
|
||||
BugExample example = new BugExample();
|
||||
example.createCriteria().andTitleEqualTo(bug.getTitle());
|
||||
example.createCriteria().andProjectIdEqualTo(bug.getProjectId());
|
||||
List<Bug> bugs = bugMapper.selectByExample(example);
|
||||
if (CollectionUtils.isNotEmpty(bugs)) {
|
||||
throw new MSException(BugMgtResultCode.BUG_EXIST_EXCEPTION);
|
||||
}
|
||||
bug.setCreateTime(System.currentTimeMillis());
|
||||
bug.setUpdateTime(System.currentTimeMillis());
|
||||
bugMapper.insert(bug);
|
||||
return bug;
|
||||
}
|
||||
|
||||
public Bug update(Bug bug) {
|
||||
bugMapper.updateByPrimaryKeySelective(bug);
|
||||
return bug;
|
||||
}
|
||||
|
||||
public int delete(String id) {
|
||||
return bugMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package io.metersphere.bug.service;
|
||||
|
||||
import io.metersphere.system.service.CleanupProjectResourceService;
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CleanupBugResourceService implements CleanupProjectResourceService {
|
||||
|
||||
@Override
|
||||
public void deleteResources(String projectId) {
|
||||
LogUtils.info("删除当前项目[" + projectId + "]相关缺陷资源");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanReportResources(String projectId) {
|
||||
LogUtils.info("清理当前项目[" + projectId + "]相关缺陷报告资源");
|
||||
}
|
||||
}
|
|
@ -71,12 +71,15 @@
|
|||
|
||||
<!--要生成的数据库表 -->
|
||||
<table tableName="bug" />
|
||||
<table tableName="bug_blob" />
|
||||
<table tableName="bug_functional_case" />
|
||||
<table tableName="bug_attachment" />
|
||||
<table tableName="bug_comment" />
|
||||
<table tableName="bug_content" />
|
||||
<table tableName="bug_follower" />
|
||||
<table tableName="bug_comment" />
|
||||
<table tableName="bug_attachment" />
|
||||
<table tableName="bug_custom_field" />
|
||||
<table tableName="bug_relation_case" />
|
||||
<table tableName="bug_history" />
|
||||
|
||||
|
||||
|
||||
<!-- 要忽略的字段-->
|
||||
<!-- <table tableName="test_case">
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
package io.metersphere.bug.controller;
|
||||
|
||||
import com.jayway.jsonpath.JsonPath;
|
||||
import io.metersphere.bug.domain.Bug;
|
||||
import io.metersphere.sdk.constants.SessionConstants;
|
||||
import io.metersphere.sdk.util.JSON;
|
||||
import io.metersphere.system.uid.UUID;
|
||||
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.MvcResult;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
||||
|
||||
|
||||
@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@AutoConfigureMockMvc
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class BugControllerTest {
|
||||
|
||||
@Resource
|
||||
private MockMvc mockMvc;
|
||||
|
||||
private static String sessionId;
|
||||
private static String csrfToken;
|
||||
|
||||
|
||||
@Test
|
||||
@Order(0)
|
||||
public void login() throws Exception {
|
||||
MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.post("/login")
|
||||
.content("{\"username\":\"admin\",\"password\":\"metersphere\"}")
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andReturn();
|
||||
sessionId = JsonPath.read(mvcResult.getResponse().getContentAsString(), "$.data.sessionId");
|
||||
csrfToken = JsonPath.read(mvcResult.getResponse().getContentAsString(), "$.data.csrfToken");
|
||||
}
|
||||
|
||||
@Test
|
||||
void listAll() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void get() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void add() throws Exception {
|
||||
Bug bug = new Bug();
|
||||
bug.setTitle("test");
|
||||
bug.setId(UUID.randomUUID().toString());
|
||||
bug.setProjectId(UUID.randomUUID().toString());
|
||||
bug.setCreateUser(UUID.randomUUID().toString());
|
||||
bug.setNum(1);
|
||||
bug.setPlatformStatus(UUID.randomUUID().toString());
|
||||
bug.setPlatform(UUID.randomUUID().toString());
|
||||
bug.setSourceId(UUID.randomUUID().toString());
|
||||
|
||||
mockMvc.perform(
|
||||
MockMvcRequestBuilders.post("/bug/add")
|
||||
.header(SessionConstants.HEADER_TOKEN, sessionId)
|
||||
.header(SessionConstants.CSRF_TOKEN, csrfToken)
|
||||
.content(JSON.toJSONString(bug))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
// 检查状态
|
||||
.andExpect(status().isOk())
|
||||
// 检查响应头
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
// 检查数据
|
||||
.andExpect(jsonPath("$.data.title").value("test"))
|
||||
;
|
||||
|
||||
// 缺陷已存在校验
|
||||
mockMvc.perform(
|
||||
MockMvcRequestBuilders.post("/bug/add")
|
||||
.header(SessionConstants.HEADER_TOKEN, sessionId)
|
||||
.header(SessionConstants.CSRF_TOKEN, csrfToken)
|
||||
.content(JSON.toJSONString(bug))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
// 检查失败状态码
|
||||
.andExpect(status().is5xxServerError())
|
||||
// 检查响应头
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
// 检查业务状态码
|
||||
.andExpect(jsonPath("$.code").value(108001))
|
||||
;
|
||||
}
|
||||
|
||||
@Test
|
||||
void update() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void delete() {
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package io.metersphere.bug.controller;
|
||||
|
||||
import io.metersphere.bug.service.CleanupBugResourceService;
|
||||
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;
|
||||
|
||||
|
||||
@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
@AutoConfigureMockMvc
|
||||
public class CleanupResourceTests {
|
||||
@Resource
|
||||
private CleanupBugResourceService resourceService;
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
public void testCleanupResource() throws Exception {
|
||||
resourceService.deleteResources("test");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
public void testCleanupReportResource() throws Exception {
|
||||
resourceService.cleanReportResources("test");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue