refactor(项目设置): add bug domain && ddl
This commit is contained in:
parent
45e7e45064
commit
453522432b
|
@ -14,64 +14,67 @@ import java.util.Arrays;
|
|||
|
||||
@Data
|
||||
public class Bug implements Serializable {
|
||||
@Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{bug.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(title = "业务ID")
|
||||
@Schema(description = "业务ID")
|
||||
private Integer num;
|
||||
|
||||
@Schema(title = "缺陷标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "缺陷标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{bug.title.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 300, message = "{bug.title.length_range}", groups = {Created.class, Updated.class})
|
||||
private String title;
|
||||
|
||||
@Schema(title = "指派人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@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(title = "创建人")
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "更新时间")
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(title = "删除人")
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(title = "删除时间")
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@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(title = "模板ID")
|
||||
@Schema(description = "模板ID")
|
||||
private String templateId;
|
||||
|
||||
@Schema(title = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@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(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@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(title = "标签")
|
||||
@Schema(description = "标签")
|
||||
private String tag;
|
||||
|
||||
@Schema(title = "第三方平台缺陷ID")
|
||||
@Schema(description = "第三方平台缺陷ID")
|
||||
private String platformBugId;
|
||||
|
||||
@Schema(title = "是否回收站", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否回收站", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{bug.trash.not_blank}", groups = {Created.class})
|
||||
private Boolean trash;
|
||||
|
||||
|
@ -84,6 +87,7 @@ public class Bug implements Serializable {
|
|||
assignUser("assign_user", "assignUser", "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),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
|
|
|
@ -504,6 +504,76 @@ public class BugExample {
|
|||
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;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<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_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="delete_user" jdbcType="VARCHAR" property="deleteUser" />
|
||||
<result column="delete_time" jdbcType="BIGINT" property="deleteTime" />
|
||||
|
@ -78,8 +79,9 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, num, title, assign_user, create_user, create_time, update_time, delete_user,
|
||||
delete_time, project_id, template_id, platform, `status`, tag, platform_bug_id, trash
|
||||
id, num, title, assign_user, create_user, create_time, update_user, update_time,
|
||||
delete_user, delete_time, project_id, template_id, platform, `status`, tag, platform_bug_id,
|
||||
trash
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.bug.domain.BugExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -114,16 +116,16 @@
|
|||
<insert id="insert" parameterType="io.metersphere.bug.domain.Bug">
|
||||
insert into bug (id, num, title,
|
||||
assign_user, create_user, create_time,
|
||||
update_time, delete_user, delete_time,
|
||||
project_id, template_id, platform,
|
||||
`status`, tag, platform_bug_id,
|
||||
trash)
|
||||
update_user, update_time, delete_user,
|
||||
delete_time, project_id, template_id,
|
||||
platform, `status`, tag,
|
||||
platform_bug_id, trash)
|
||||
values (#{id,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
|
||||
#{assignUser,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT},
|
||||
#{projectId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR}, #{platformBugId,jdbcType=VARCHAR},
|
||||
#{trash,jdbcType=BIT})
|
||||
#{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR},
|
||||
#{deleteTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR},
|
||||
#{platform,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR},
|
||||
#{platformBugId,jdbcType=VARCHAR}, #{trash,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.bug.domain.Bug">
|
||||
insert into bug
|
||||
|
@ -146,6 +148,9 @@
|
|||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
|
@ -196,6 +201,9 @@
|
|||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -255,6 +263,9 @@
|
|||
<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>
|
||||
|
@ -298,6 +309,7 @@
|
|||
assign_user = #{record.assignUser,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},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
|
@ -330,6 +342,9 @@
|
|||
<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>
|
||||
|
@ -370,6 +385,7 @@
|
|||
assign_user = #{assignUser,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
|
@ -384,17 +400,17 @@
|
|||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into bug
|
||||
(id, num, title, assign_user, create_user, create_time, update_time, delete_user,
|
||||
delete_time, project_id, template_id, platform, `status`, tag, platform_bug_id,
|
||||
(id, num, title, assign_user, create_user, create_time, update_user, update_time,
|
||||
delete_user, delete_time, project_id, template_id, platform, `status`, tag, platform_bug_id,
|
||||
trash)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.num,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR},
|
||||
#{item.assignUser,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.updateTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=BIGINT},
|
||||
#{item.projectId,jdbcType=VARCHAR}, #{item.templateId,jdbcType=VARCHAR}, #{item.platform,jdbcType=VARCHAR},
|
||||
#{item.status,jdbcType=VARCHAR}, #{item.tag,jdbcType=VARCHAR}, #{item.platformBugId,jdbcType=VARCHAR},
|
||||
#{item.trash,jdbcType=BIT})
|
||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR},
|
||||
#{item.deleteTime,jdbcType=BIGINT}, #{item.projectId,jdbcType=VARCHAR}, #{item.templateId,jdbcType=VARCHAR},
|
||||
#{item.platform,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.tag,jdbcType=VARCHAR},
|
||||
#{item.platformBugId,jdbcType=VARCHAR}, #{item.trash,jdbcType=BIT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
|
@ -425,6 +441,9 @@
|
|||
<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>
|
||||
|
|
|
@ -9,6 +9,7 @@ CREATE TABLE IF NOT EXISTS bug(
|
|||
`assign_user` VARCHAR(50) 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 '更新时间' ,
|
||||
`delete_user` VARCHAR(50) NOT NULL COMMENT '删除人' ,
|
||||
`delete_time` BIGINT NOT NULL COMMENT '删除时间' ,
|
||||
|
|
|
@ -7,6 +7,8 @@ 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.update_user.not_blank=更新人不能为空
|
||||
bug.update_user.length_range=更新人长度必须在1-50之间
|
||||
bug.delete_user.not_blank=删除人不能为空
|
||||
bug.delete_user.length_range=删除人长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
|
|
|
@ -7,6 +7,8 @@ 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.update_user.not_blank=updateUser cannot be empty
|
||||
bug.update_user.length_range=updateUser length must be between 1-50
|
||||
bug.delete_user.not_blank=deleteUser cannot be empty
|
||||
bug.delete_user.length_range=deleteUser length must be between 1-50
|
||||
bug.project_id.not_blank=projectId cannot be empty
|
||||
|
|
|
@ -7,6 +7,8 @@ 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.update_user.not_blank=更新人不能为空
|
||||
bug.update_user.length_range=更新人长度必须在1-50之间
|
||||
bug.delete_user.not_blank=删除人不能为空
|
||||
bug.delete_user.length_range=删除人长度必须在1-50之间
|
||||
bug.project_id.not_blank=项目ID不能为空
|
||||
|
|
|
@ -7,6 +7,8 @@ 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.update_user.not_blank=更新人不能為空
|
||||
bug.update_user.length_range=更新人長度必須在1-50之間
|
||||
bug.delete_user.not_blank=删除人不能為空
|
||||
bug.delete_user.length_range=删除人長度必須在1-50之間
|
||||
bug.project_id.not_blank=项目ID不能為空
|
||||
|
|
Loading…
Reference in New Issue