From 40c5011ca5d53fea4fce1c6dcd668813de3c4ac3 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 16 Aug 2022 14:58:05 +0800 Subject: [PATCH] 1 --- .../hai/dao/BsDistributionUserRelMapper.java | 17 +++-- .../dao/BsDistributionUserRelSqlProvider.java | 14 ++++ .../com/hai/entity/BsDistributionUserRel.java | 16 +++++ .../entity/BsDistributionUserRelExample.java | 70 +++++++++++++++++++ 4 files changed, 110 insertions(+), 7 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java index f310900b..383963cb 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java @@ -42,15 +42,15 @@ public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapper "insert into bs_distribution_user_rel (agent_id, agent_name, ", "popularize_user_id, popularize_user_name, ", "user_id, user_name, ", - "create_time, update_time, ", - "`status`, ext_1, ext_2, ", - "ext_3)", + "phone, create_time, ", + "update_time, `status`, ", + "ext_1, ext_2, ext_3)", "values (#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ", "#{popularizeUserId,jdbcType=BIGINT}, #{popularizeUserName,jdbcType=VARCHAR}, ", "#{userId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", - "#{ext3,jdbcType=VARCHAR})" + "#{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsDistributionUserRel record); @@ -68,6 +68,7 @@ public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapper @Result(column="popularize_user_name", property="popularizeUserName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -80,7 +81,7 @@ public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapper @Select({ "select", "id, agent_id, agent_name, popularize_user_id, popularize_user_name, user_id, ", - "user_name, create_time, update_time, `status`, ext_1, ext_2, ext_3", + "user_name, phone, create_time, update_time, `status`, ext_1, ext_2, ext_3", "from bs_distribution_user_rel", "where id = #{id,jdbcType=BIGINT}" }) @@ -92,6 +93,7 @@ public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapper @Result(column="popularize_user_name", property="popularizeUserName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -118,6 +120,7 @@ public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapper "popularize_user_name = #{popularizeUserName,jdbcType=VARCHAR},", "user_id = #{userId,jdbcType=BIGINT},", "user_name = #{userName,jdbcType=VARCHAR},", + "phone = #{phone,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java index 57f2186e..4a72218b 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java @@ -52,6 +52,10 @@ public class BsDistributionUserRelSqlProvider { sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}"); } + if (record.getPhone() != null) { + sql.VALUES("phone", "#{phone,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -92,6 +96,7 @@ public class BsDistributionUserRelSqlProvider { sql.SELECT("popularize_user_name"); sql.SELECT("user_id"); sql.SELECT("user_name"); + sql.SELECT("phone"); sql.SELECT("create_time"); sql.SELECT("update_time"); sql.SELECT("`status`"); @@ -143,6 +148,10 @@ public class BsDistributionUserRelSqlProvider { sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); } + if (record.getPhone() != null) { + sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -182,6 +191,7 @@ public class BsDistributionUserRelSqlProvider { sql.SET("popularize_user_name = #{record.popularizeUserName,jdbcType=VARCHAR}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -222,6 +232,10 @@ public class BsDistributionUserRelSqlProvider { sql.SET("user_name = #{userName,jdbcType=VARCHAR}"); } + if (record.getPhone() != null) { + sql.SET("phone = #{phone,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java index 75f33668..56c4b29d 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java @@ -48,6 +48,11 @@ public class BsDistributionUserRel implements Serializable { */ private String userName; + /** + * 用户手机号码 + */ + private String phone; + /** * 创建时间 */ @@ -136,6 +141,14 @@ public class BsDistributionUserRel implements Serializable { this.userName = userName; } + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + public Date getCreateTime() { return createTime; } @@ -203,6 +216,7 @@ public class BsDistributionUserRel implements Serializable { && (this.getPopularizeUserName() == null ? other.getPopularizeUserName() == null : this.getPopularizeUserName().equals(other.getPopularizeUserName())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) + && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -222,6 +236,7 @@ public class BsDistributionUserRel implements Serializable { result = prime * result + ((getPopularizeUserName() == null) ? 0 : getPopularizeUserName().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); + result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -244,6 +259,7 @@ public class BsDistributionUserRel implements Serializable { sb.append(", popularizeUserName=").append(popularizeUserName); sb.append(", userId=").append(userId); sb.append(", userName=").append(userName); + sb.append(", phone=").append(phone); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", status=").append(status); diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java index 2f4a006e..b08c7c15 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java @@ -575,6 +575,76 @@ public class BsDistributionUserRelExample { return (Criteria) this; } + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this;