From bab4b8c50ccd7a2f71a0194b6802243900f70c5f Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 20 Sep 2022 15:27:00 +0800 Subject: [PATCH] 1 --- .../main/java/com/hai/dao/BsMsgMapper.java | 30 ++-- .../java/com/hai/dao/BsMsgSqlProvider.java | 36 +++- .../src/main/java/com/hai/entity/BsMsg.java | 38 ++++- .../java/com/hai/entity/BsMsgExample.java | 160 +++++++++++++++--- 4 files changed, 225 insertions(+), 39 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java b/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java index 5caefbcf..72f4b445 100644 --- a/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java @@ -42,15 +42,15 @@ public interface BsMsgMapper extends BsMsgMapperExt { "insert into bs_msg (title, `type`, ", "jump_type, msg_type, ", "object_id, image, ", - "content, create_time, ", - "update_time, ext_1, ", - "ext_2, ext_3)", + "content, op_id, op_name, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", "values (#{title,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, ", - "#{jumpType,jdbcType=INTEGER}, #{msgType,jdbcType=VARCHAR}, ", + "#{jumpType,jdbcType=INTEGER}, #{msgType,jdbcType=INTEGER}, ", "#{objectId,jdbcType=BIGINT}, #{image,jdbcType=VARCHAR}, ", - "#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{content,jdbcType=VARCHAR}, #{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsMsg record); @@ -65,10 +65,12 @@ public interface BsMsgMapper extends BsMsgMapperExt { @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), - @Result(column="msg_type", property="msgType", jdbcType=JdbcType.VARCHAR), + @Result(column="msg_type", property="msgType", jdbcType=JdbcType.INTEGER), @Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), @Result(column="image", property="image", jdbcType=JdbcType.VARCHAR), @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @@ -79,8 +81,8 @@ public interface BsMsgMapper extends BsMsgMapperExt { @Select({ "select", - "id, title, `type`, jump_type, msg_type, object_id, image, content, create_time, ", - "update_time, ext_1, ext_2, ext_3", + "id, title, `type`, jump_type, msg_type, object_id, image, content, op_id, op_name, ", + "create_time, update_time, ext_1, ext_2, ext_3", "from bs_msg", "where id = #{id,jdbcType=BIGINT}" }) @@ -89,10 +91,12 @@ public interface BsMsgMapper extends BsMsgMapperExt { @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER), - @Result(column="msg_type", property="msgType", jdbcType=JdbcType.VARCHAR), + @Result(column="msg_type", property="msgType", jdbcType=JdbcType.INTEGER), @Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), @Result(column="image", property="image", jdbcType=JdbcType.VARCHAR), @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @@ -115,10 +119,12 @@ public interface BsMsgMapper extends BsMsgMapperExt { "set title = #{title,jdbcType=VARCHAR},", "`type` = #{type,jdbcType=INTEGER},", "jump_type = #{jumpType,jdbcType=INTEGER},", - "msg_type = #{msgType,jdbcType=VARCHAR},", + "msg_type = #{msgType,jdbcType=INTEGER},", "object_id = #{objectId,jdbcType=BIGINT},", "image = #{image,jdbcType=VARCHAR},", "content = #{content,jdbcType=VARCHAR},", + "op_id = #{opId,jdbcType=BIGINT},", + "op_name = #{opName,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", "ext_1 = #{ext1,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java index 9dda659a..a41c9038 100644 --- a/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java @@ -41,7 +41,7 @@ public class BsMsgSqlProvider { } if (record.getMsgType() != null) { - sql.VALUES("msg_type", "#{msgType,jdbcType=VARCHAR}"); + sql.VALUES("msg_type", "#{msgType,jdbcType=INTEGER}"); } if (record.getObjectId() != null) { @@ -56,6 +56,14 @@ public class BsMsgSqlProvider { sql.VALUES("content", "#{content,jdbcType=VARCHAR}"); } + if (record.getOpId() != null) { + sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -93,6 +101,8 @@ public class BsMsgSqlProvider { sql.SELECT("object_id"); sql.SELECT("image"); sql.SELECT("content"); + sql.SELECT("op_id"); + sql.SELECT("op_name"); sql.SELECT("create_time"); sql.SELECT("update_time"); sql.SELECT("ext_1"); @@ -132,7 +142,7 @@ public class BsMsgSqlProvider { } if (record.getMsgType() != null) { - sql.SET("msg_type = #{record.msgType,jdbcType=VARCHAR}"); + sql.SET("msg_type = #{record.msgType,jdbcType=INTEGER}"); } if (record.getObjectId() != null) { @@ -147,6 +157,14 @@ public class BsMsgSqlProvider { sql.SET("content = #{record.content,jdbcType=VARCHAR}"); } + if (record.getOpId() != null) { + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -179,10 +197,12 @@ public class BsMsgSqlProvider { sql.SET("title = #{record.title,jdbcType=VARCHAR}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}"); - sql.SET("msg_type = #{record.msgType,jdbcType=VARCHAR}"); + sql.SET("msg_type = #{record.msgType,jdbcType=INTEGER}"); sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}"); sql.SET("image = #{record.image,jdbcType=VARCHAR}"); sql.SET("content = #{record.content,jdbcType=VARCHAR}"); + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); @@ -211,7 +231,7 @@ public class BsMsgSqlProvider { } if (record.getMsgType() != null) { - sql.SET("msg_type = #{msgType,jdbcType=VARCHAR}"); + sql.SET("msg_type = #{msgType,jdbcType=INTEGER}"); } if (record.getObjectId() != null) { @@ -226,6 +246,14 @@ public class BsMsgSqlProvider { sql.SET("content = #{content,jdbcType=VARCHAR}"); } + if (record.getOpId() != null) { + sql.SET("op_id = #{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } diff --git a/hai-service/src/main/java/com/hai/entity/BsMsg.java b/hai-service/src/main/java/com/hai/entity/BsMsg.java index 68f19f65..54cfc920 100644 --- a/hai-service/src/main/java/com/hai/entity/BsMsg.java +++ b/hai-service/src/main/java/com/hai/entity/BsMsg.java @@ -36,7 +36,7 @@ public class BsMsg implements Serializable { /** * 消息类型:1 个人信息 2 全局信息 */ - private String msgType; + private Integer msgType; /** * 对象id @@ -53,6 +53,16 @@ public class BsMsg implements Serializable { */ private String content; + /** + * 操作人员 + */ + private Long opId; + + /** + * 操作人员名称 + */ + private String opName; + /** * 创建时间 */ @@ -112,11 +122,11 @@ public class BsMsg implements Serializable { this.jumpType = jumpType; } - public String getMsgType() { + public Integer getMsgType() { return msgType; } - public void setMsgType(String msgType) { + public void setMsgType(Integer msgType) { this.msgType = msgType; } @@ -144,6 +154,22 @@ public class BsMsg implements Serializable { this.content = content; } + public Long getOpId() { + return opId; + } + + public void setOpId(Long opId) { + this.opId = opId; + } + + public String getOpName() { + return opName; + } + + public void setOpName(String opName) { + this.opName = opName; + } + public Date getCreateTime() { return createTime; } @@ -204,6 +230,8 @@ public class BsMsg implements Serializable { && (this.getObjectId() == null ? other.getObjectId() == null : this.getObjectId().equals(other.getObjectId())) && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage())) && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) + && (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) @@ -223,6 +251,8 @@ public class BsMsg implements Serializable { result = prime * result + ((getObjectId() == null) ? 0 : getObjectId().hashCode()); result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode()); result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); + result = prime * result + ((getOpName() == null) ? 0 : getOpName().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); @@ -245,6 +275,8 @@ public class BsMsg implements Serializable { sb.append(", objectId=").append(objectId); sb.append(", image=").append(image); sb.append(", content=").append(content); + sb.append(", opId=").append(opId); + sb.append(", opName=").append(opName); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", ext1=").append(ext1); diff --git a/hai-service/src/main/java/com/hai/entity/BsMsgExample.java b/hai-service/src/main/java/com/hai/entity/BsMsgExample.java index eb1b2144..d75ca43f 100644 --- a/hai-service/src/main/java/com/hai/entity/BsMsgExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsMsgExample.java @@ -385,62 +385,52 @@ public class BsMsgExample { return (Criteria) this; } - public Criteria andMsgTypeEqualTo(String value) { + public Criteria andMsgTypeEqualTo(Integer value) { addCriterion("msg_type =", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeNotEqualTo(String value) { + public Criteria andMsgTypeNotEqualTo(Integer value) { addCriterion("msg_type <>", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeGreaterThan(String value) { + public Criteria andMsgTypeGreaterThan(Integer value) { addCriterion("msg_type >", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeGreaterThanOrEqualTo(String value) { + public Criteria andMsgTypeGreaterThanOrEqualTo(Integer value) { addCriterion("msg_type >=", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeLessThan(String value) { + public Criteria andMsgTypeLessThan(Integer value) { addCriterion("msg_type <", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeLessThanOrEqualTo(String value) { + public Criteria andMsgTypeLessThanOrEqualTo(Integer value) { addCriterion("msg_type <=", value, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeLike(String value) { - addCriterion("msg_type like", value, "msgType"); - return (Criteria) this; - } - - public Criteria andMsgTypeNotLike(String value) { - addCriterion("msg_type not like", value, "msgType"); - return (Criteria) this; - } - - public Criteria andMsgTypeIn(List values) { + public Criteria andMsgTypeIn(List values) { addCriterion("msg_type in", values, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeNotIn(List values) { + public Criteria andMsgTypeNotIn(List values) { addCriterion("msg_type not in", values, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeBetween(String value1, String value2) { + public Criteria andMsgTypeBetween(Integer value1, Integer value2) { addCriterion("msg_type between", value1, value2, "msgType"); return (Criteria) this; } - public Criteria andMsgTypeNotBetween(String value1, String value2) { + public Criteria andMsgTypeNotBetween(Integer value1, Integer value2) { addCriterion("msg_type not between", value1, value2, "msgType"); return (Criteria) this; } @@ -645,6 +635,136 @@ public class BsMsgExample { return (Criteria) this; } + public Criteria andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this;