From efd4d10627fb17583c0c0f33a445928ccd3d1c89 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 20 Sep 2022 15:39:21 +0800 Subject: [PATCH] 1 --- .../main/java/com/hai/dao/BsMsgMapper.java | 15 +++-- .../java/com/hai/dao/BsMsgSqlProvider.java | 14 +++++ .../src/main/java/com/hai/entity/BsMsg.java | 16 +++++ .../java/com/hai/entity/BsMsgExample.java | 60 +++++++++++++++++++ 4 files changed, 100 insertions(+), 5 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 72f4b445..054f99ec 100644 --- a/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsMsgMapper.java @@ -43,14 +43,16 @@ public interface BsMsgMapper extends BsMsgMapperExt { "jump_type, msg_type, ", "object_id, image, ", "content, op_id, op_name, ", - "create_time, update_time, ", - "ext_1, ext_2, ext_3)", + "company_id, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", "values (#{title,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, ", "#{jumpType,jdbcType=INTEGER}, #{msgType,jdbcType=INTEGER}, ", "#{objectId,jdbcType=BIGINT}, #{image,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})" + "#{companyId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsMsg record); @@ -71,6 +73,7 @@ public interface BsMsgMapper extends BsMsgMapperExt { @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="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @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), @@ -82,7 +85,7 @@ public interface BsMsgMapper extends BsMsgMapperExt { @Select({ "select", "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", + "company_id, create_time, update_time, ext_1, ext_2, ext_3", "from bs_msg", "where id = #{id,jdbcType=BIGINT}" }) @@ -97,6 +100,7 @@ public interface BsMsgMapper extends BsMsgMapperExt { @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="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @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), @@ -125,6 +129,7 @@ public interface BsMsgMapper extends BsMsgMapperExt { "content = #{content,jdbcType=VARCHAR},", "op_id = #{opId,jdbcType=BIGINT},", "op_name = #{opName,jdbcType=VARCHAR},", + "company_id = #{companyId,jdbcType=BIGINT},", "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 a41c9038..35f9744a 100644 --- a/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsMsgSqlProvider.java @@ -64,6 +64,10 @@ public class BsMsgSqlProvider { sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); } + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -103,6 +107,7 @@ public class BsMsgSqlProvider { sql.SELECT("content"); sql.SELECT("op_id"); sql.SELECT("op_name"); + sql.SELECT("company_id"); sql.SELECT("create_time"); sql.SELECT("update_time"); sql.SELECT("ext_1"); @@ -165,6 +170,10 @@ public class BsMsgSqlProvider { sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); } + if (record.getCompanyId() != null) { + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -203,6 +212,7 @@ public class BsMsgSqlProvider { 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("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); @@ -254,6 +264,10 @@ public class BsMsgSqlProvider { sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); } + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + 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 54cfc920..fb7308e1 100644 --- a/hai-service/src/main/java/com/hai/entity/BsMsg.java +++ b/hai-service/src/main/java/com/hai/entity/BsMsg.java @@ -63,6 +63,11 @@ public class BsMsg implements Serializable { */ private String opName; + /** + * 公司id + */ + private Long companyId; + /** * 创建时间 */ @@ -170,6 +175,14 @@ public class BsMsg implements Serializable { this.opName = opName; } + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + public Date getCreateTime() { return createTime; } @@ -232,6 +245,7 @@ public class BsMsg implements Serializable { && (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.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (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())) @@ -253,6 +267,7 @@ public class BsMsg implements Serializable { 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 + ((getCompanyId() == null) ? 0 : getCompanyId().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()); @@ -277,6 +292,7 @@ public class BsMsg implements Serializable { sb.append(", content=").append(content); sb.append(", opId=").append(opId); sb.append(", opName=").append(opName); + sb.append(", companyId=").append(companyId); 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 d75ca43f..cce21c90 100644 --- a/hai-service/src/main/java/com/hai/entity/BsMsgExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsMsgExample.java @@ -765,6 +765,66 @@ public class BsMsgExample { return (Criteria) this; } + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this;