refactor: update robot column

This commit is contained in:
guoyuqi 2023-08-24 13:31:02 +08:00 committed by 刘瑞斌
parent 1ec641ea0f
commit 5b662b92d4
4 changed files with 9 additions and 274 deletions

View File

@ -16,22 +16,22 @@ public class ProjectRobot implements Serializable {
private String id;
@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project_robot.project_id.not_blank}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_robot.project_id.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{project_robot.project_id.length_range}", groups = {Created.class, Updated.class})
private String projectId;
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project_robot.name.not_blank}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_robot.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{project_robot.name.length_range}", groups = {Created.class, Updated.class})
private String name;
@Schema(description = "所属平台(飞书,钉钉,企业微信,自定义)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project_robot.platform.not_blank}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_robot.platform.not_blank}", groups = {Created.class})
@Size(min = 1, max = 50, message = "{project_robot.platform.length_range}", groups = {Created.class, Updated.class})
private String platform;
@Schema(description = "webhook", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project_robot.webhook.not_blank}", groups = {Created.class, Updated.class})
@NotBlank(message = "{project_robot.webhook.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{project_robot.webhook.length_range}", groups = {Created.class, Updated.class})
private String webhook;
@ -59,16 +59,6 @@ public class ProjectRobot implements Serializable {
@Schema(description = "更新时间")
private Long updateTime;
@Schema(description = "删除人")
private String deleteUser;
@Schema(description = "删除时间")
private Long deleteTime;
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{project_robot.deleted.not_blank}", groups = {Created.class})
private Boolean deleted;
@Schema(description = "描述")
private String description;
@ -88,9 +78,6 @@ public class ProjectRobot implements Serializable {
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),
deleted("deleted", "deleted", "BIT", false),
description("description", "description", "VARCHAR", false);
private static final String BEGINNING_DELIMITER = "`";

View File

@ -984,196 +984,6 @@ public class ProjectRobotExample {
return (Criteria) this;
}
public Criteria andDeleteUserIsNull() {
addCriterion("delete_user is null");
return (Criteria) this;
}
public Criteria andDeleteUserIsNotNull() {
addCriterion("delete_user is not null");
return (Criteria) this;
}
public Criteria andDeleteUserEqualTo(String value) {
addCriterion("delete_user =", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserNotEqualTo(String value) {
addCriterion("delete_user <>", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserGreaterThan(String value) {
addCriterion("delete_user >", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserGreaterThanOrEqualTo(String value) {
addCriterion("delete_user >=", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserLessThan(String value) {
addCriterion("delete_user <", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserLessThanOrEqualTo(String value) {
addCriterion("delete_user <=", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserLike(String value) {
addCriterion("delete_user like", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserNotLike(String value) {
addCriterion("delete_user not like", value, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserIn(List<String> values) {
addCriterion("delete_user in", values, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserNotIn(List<String> values) {
addCriterion("delete_user not in", values, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserBetween(String value1, String value2) {
addCriterion("delete_user between", value1, value2, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteUserNotBetween(String value1, String value2) {
addCriterion("delete_user not between", value1, value2, "deleteUser");
return (Criteria) this;
}
public Criteria andDeleteTimeIsNull() {
addCriterion("delete_time is null");
return (Criteria) this;
}
public Criteria andDeleteTimeIsNotNull() {
addCriterion("delete_time is not null");
return (Criteria) this;
}
public Criteria andDeleteTimeEqualTo(Long value) {
addCriterion("delete_time =", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeNotEqualTo(Long value) {
addCriterion("delete_time <>", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeGreaterThan(Long value) {
addCriterion("delete_time >", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeGreaterThanOrEqualTo(Long value) {
addCriterion("delete_time >=", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeLessThan(Long value) {
addCriterion("delete_time <", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeLessThanOrEqualTo(Long value) {
addCriterion("delete_time <=", value, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeIn(List<Long> values) {
addCriterion("delete_time in", values, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeNotIn(List<Long> values) {
addCriterion("delete_time not in", values, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeBetween(Long value1, Long value2) {
addCriterion("delete_time between", value1, value2, "deleteTime");
return (Criteria) this;
}
public Criteria andDeleteTimeNotBetween(Long value1, Long value2) {
addCriterion("delete_time not between", value1, value2, "deleteTime");
return (Criteria) this;
}
public Criteria andDeletedIsNull() {
addCriterion("deleted is null");
return (Criteria) this;
}
public Criteria andDeletedIsNotNull() {
addCriterion("deleted is not null");
return (Criteria) this;
}
public Criteria andDeletedEqualTo(Boolean value) {
addCriterion("deleted =", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedNotEqualTo(Boolean value) {
addCriterion("deleted <>", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedGreaterThan(Boolean value) {
addCriterion("deleted >", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
addCriterion("deleted >=", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedLessThan(Boolean value) {
addCriterion("deleted <", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
addCriterion("deleted <=", value, "deleted");
return (Criteria) this;
}
public Criteria andDeletedIn(List<Boolean> values) {
addCriterion("deleted in", values, "deleted");
return (Criteria) this;
}
public Criteria andDeletedNotIn(List<Boolean> values) {
addCriterion("deleted not in", values, "deleted");
return (Criteria) this;
}
public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
addCriterion("deleted between", value1, value2, "deleted");
return (Criteria) this;
}
public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
addCriterion("deleted not between", value1, value2, "deleted");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;

View File

@ -15,9 +15,6 @@
<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" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
@ -80,8 +77,7 @@
</sql>
<sql id="Base_Column_List">
id, project_id, `name`, platform, webhook, `type`, app_key, app_secret, `enable`,
create_user, create_time, update_user, update_time, delete_user, delete_time, deleted,
description
create_user, create_time, update_user, update_time, description
</sql>
<select id="selectByExample" parameterType="io.metersphere.project.domain.ProjectRobotExample" resultMap="BaseResultMap">
select
@ -118,14 +114,12 @@
platform, webhook, `type`,
app_key, app_secret, `enable`,
create_user, create_time, update_user,
update_time, delete_user, delete_time,
deleted, description)
update_time, description)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{platform,jdbcType=VARCHAR}, #{webhook,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{appKey,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, #{enable,jdbcType=BIT},
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR},
#{updateTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT},
#{deleted,jdbcType=BIT}, #{description,jdbcType=VARCHAR})
#{updateTime,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.project.domain.ProjectRobot">
insert into project_robot
@ -169,15 +163,6 @@
<if test="updateTime != null">
update_time,
</if>
<if test="deleteUser != null">
delete_user,
</if>
<if test="deleteTime != null">
delete_time,
</if>
<if test="deleted != null">
deleted,
</if>
<if test="description != null">
description,
</if>
@ -222,15 +207,6 @@
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
<if test="deleteUser != null">
#{deleteUser,jdbcType=VARCHAR},
</if>
<if test="deleteTime != null">
#{deleteTime,jdbcType=BIGINT},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
@ -284,15 +260,6 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if test="record.deleteUser != null">
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
</if>
<if test="record.deleteTime != null">
delete_time = #{record.deleteTime,jdbcType=BIGINT},
</if>
<if test="record.deleted != null">
deleted = #{record.deleted,jdbcType=BIT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
@ -316,9 +283,6 @@
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},
deleted = #{record.deleted,jdbcType=BIT},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -363,15 +327,6 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if test="deleteUser != null">
delete_user = #{deleteUser,jdbcType=VARCHAR},
</if>
<if test="deleteTime != null">
delete_time = #{deleteTime,jdbcType=BIGINT},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
@ -392,25 +347,20 @@
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},
deleted = #{deleted,jdbcType=BIT},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
insert into project_robot
(id, project_id, `name`, platform, webhook, `type`, app_key, app_secret, `enable`,
create_user, create_time, update_user, update_time, delete_user, delete_time, deleted,
description)
create_user, create_time, update_user, update_time, description)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.platform,jdbcType=VARCHAR}, #{item.webhook,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR},
#{item.appKey,jdbcType=VARCHAR}, #{item.appSecret,jdbcType=VARCHAR}, #{item.enable,jdbcType=BIT},
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateUser,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=BIGINT},
#{item.deleted,jdbcType=BIT}, #{item.description,jdbcType=VARCHAR})
#{item.updateTime,jdbcType=BIGINT}, #{item.description,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -462,15 +412,6 @@
<if test="'update_time'.toString() == column.value">
#{item.updateTime,jdbcType=BIGINT}
</if>
<if test="'delete_user'.toString() == column.value">
#{item.deleteUser,jdbcType=VARCHAR}
</if>
<if test="'delete_time'.toString() == column.value">
#{item.deleteTime,jdbcType=BIGINT}
</if>
<if test="'deleted'.toString() == column.value">
#{item.deleted,jdbcType=BIT}
</if>
<if test="'description'.toString() == column.value">
#{item.description,jdbcType=VARCHAR}
</if>

View File

@ -397,9 +397,6 @@ CREATE TABLE IF NOT EXISTS project_robot(
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
`delete_user` VARCHAR(50) COMMENT '删除人' ,
`delete_time` BIGINT(255) COMMENT '删除时间' ,
`deleted` BIT NOT NULL DEFAULT 0 COMMENT '是否删除' ,
`description` VARCHAR(255) COMMENT '描述' ,
PRIMARY KEY (id)
) COMMENT = '项目机器人';