From 03d374aa8e9c7b6cc2588a083d20e6ee3663e5ed Mon Sep 17 00:00:00 2001 From: YuanYe <418471657@qq.com> Date: Fri, 30 Aug 2024 15:40:00 +0800 Subject: [PATCH] 1 --- .../main/java/com/hfkj/dao/SecUserMapper.java | 19 ++--- .../java/com/hfkj/dao/SecUserSqlProvider.java | 14 ++++ .../main/java/com/hfkj/entity/SecUser.java | 18 ++++- .../java/com/hfkj/entity/SecUserExample.java | 70 +++++++++++++++++++ 4 files changed, 112 insertions(+), 9 deletions(-) diff --git a/service/src/main/java/com/hfkj/dao/SecUserMapper.java b/service/src/main/java/com/hfkj/dao/SecUserMapper.java index 0d7529f..12b84bc 100644 --- a/service/src/main/java/com/hfkj/dao/SecUserMapper.java +++ b/service/src/main/java/com/hfkj/dao/SecUserMapper.java @@ -41,16 +41,16 @@ public interface SecUserMapper extends SecUserMapperExt { @Insert({ "insert into sec_user (avatar, user_name, ", "login_name, `password`, ", - "telephone, object_type, ", - "object_id, role_id, ", - "`status`, create_time, ", + "telephone, platform_code, ", + "object_type, object_id, ", + "role_id, `status`, create_time, ", "update_time, ext_1, ", "ext_2, ext_3)", "values (#{avatar,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ", "#{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, ", - "#{telephone,jdbcType=VARCHAR}, #{objectType,jdbcType=INTEGER}, ", - "#{objectId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{telephone,jdbcType=VARCHAR}, #{platformCode,jdbcType=VARCHAR}, ", + "#{objectType,jdbcType=INTEGER}, #{objectId,jdbcType=BIGINT}, ", + "#{roleId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -69,6 +69,7 @@ public interface SecUserMapper extends SecUserMapperExt { @Result(column="login_name", property="loginName", jdbcType=JdbcType.VARCHAR), @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), @Result(column="object_type", property="objectType", jdbcType=JdbcType.INTEGER), @Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), @Result(column="role_id", property="roleId", jdbcType=JdbcType.BIGINT), @@ -83,8 +84,8 @@ public interface SecUserMapper extends SecUserMapperExt { @Select({ "select", - "id, avatar, user_name, login_name, `password`, telephone, object_type, object_id, ", - "role_id, `status`, create_time, update_time, ext_1, ext_2, ext_3", + "id, avatar, user_name, login_name, `password`, telephone, platform_code, object_type, ", + "object_id, role_id, `status`, create_time, update_time, ext_1, ext_2, ext_3", "from sec_user", "where id = #{id,jdbcType=BIGINT}" }) @@ -95,6 +96,7 @@ public interface SecUserMapper extends SecUserMapperExt { @Result(column="login_name", property="loginName", jdbcType=JdbcType.VARCHAR), @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), @Result(column="object_type", property="objectType", jdbcType=JdbcType.INTEGER), @Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT), @Result(column="role_id", property="roleId", jdbcType=JdbcType.BIGINT), @@ -123,6 +125,7 @@ public interface SecUserMapper extends SecUserMapperExt { "login_name = #{loginName,jdbcType=VARCHAR},", "`password` = #{password,jdbcType=VARCHAR},", "telephone = #{telephone,jdbcType=VARCHAR},", + "platform_code = #{platformCode,jdbcType=VARCHAR},", "object_type = #{objectType,jdbcType=INTEGER},", "object_id = #{objectId,jdbcType=BIGINT},", "role_id = #{roleId,jdbcType=BIGINT},", diff --git a/service/src/main/java/com/hfkj/dao/SecUserSqlProvider.java b/service/src/main/java/com/hfkj/dao/SecUserSqlProvider.java index 0ed635d..9064af7 100644 --- a/service/src/main/java/com/hfkj/dao/SecUserSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/SecUserSqlProvider.java @@ -48,6 +48,10 @@ public class SecUserSqlProvider { sql.VALUES("telephone", "#{telephone,jdbcType=VARCHAR}"); } + if (record.getPlatformCode() != null) { + sql.VALUES("platform_code", "#{platformCode,jdbcType=VARCHAR}"); + } + if (record.getObjectType() != null) { sql.VALUES("object_type", "#{objectType,jdbcType=INTEGER}"); } @@ -99,6 +103,7 @@ public class SecUserSqlProvider { sql.SELECT("login_name"); sql.SELECT("`password`"); sql.SELECT("telephone"); + sql.SELECT("platform_code"); sql.SELECT("object_type"); sql.SELECT("object_id"); sql.SELECT("role_id"); @@ -149,6 +154,10 @@ public class SecUserSqlProvider { sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); } + if (record.getPlatformCode() != null) { + sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}"); + } + if (record.getObjectType() != null) { sql.SET("object_type = #{record.objectType,jdbcType=INTEGER}"); } @@ -199,6 +208,7 @@ public class SecUserSqlProvider { sql.SET("login_name = #{record.loginName,jdbcType=VARCHAR}"); sql.SET("`password` = #{record.password,jdbcType=VARCHAR}"); sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}"); + sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}"); sql.SET("object_type = #{record.objectType,jdbcType=INTEGER}"); sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}"); sql.SET("role_id = #{record.roleId,jdbcType=BIGINT}"); @@ -238,6 +248,10 @@ public class SecUserSqlProvider { sql.SET("telephone = #{telephone,jdbcType=VARCHAR}"); } + if (record.getPlatformCode() != null) { + sql.SET("platform_code = #{platformCode,jdbcType=VARCHAR}"); + } + if (record.getObjectType() != null) { sql.SET("object_type = #{objectType,jdbcType=INTEGER}"); } diff --git a/service/src/main/java/com/hfkj/entity/SecUser.java b/service/src/main/java/com/hfkj/entity/SecUser.java index 3fbe97a..8de30e6 100644 --- a/service/src/main/java/com/hfkj/entity/SecUser.java +++ b/service/src/main/java/com/hfkj/entity/SecUser.java @@ -43,6 +43,11 @@ public class SecUser implements Serializable { */ private String telephone; + /** + * 登录平台code + */ + private String platformCode; + /** * 对象类型 */ @@ -59,7 +64,7 @@ public class SecUser implements Serializable { private Long roleId; /** - * 状态 0:删除 1:可用 2:禁用 + * 状态 0:删除 1:可用 */ private Integer status; @@ -129,6 +134,14 @@ public class SecUser implements Serializable { this.telephone = telephone; } + public String getPlatformCode() { + return platformCode; + } + + public void setPlatformCode(String platformCode) { + this.platformCode = platformCode; + } + public Integer getObjectType() { return objectType; } @@ -219,6 +232,7 @@ public class SecUser implements Serializable { && (this.getLoginName() == null ? other.getLoginName() == null : this.getLoginName().equals(other.getLoginName())) && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone())) + && (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode())) && (this.getObjectType() == null ? other.getObjectType() == null : this.getObjectType().equals(other.getObjectType())) && (this.getObjectId() == null ? other.getObjectId() == null : this.getObjectId().equals(other.getObjectId())) && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId())) @@ -240,6 +254,7 @@ public class SecUser implements Serializable { result = prime * result + ((getLoginName() == null) ? 0 : getLoginName().hashCode()); result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode()); + result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode()); result = prime * result + ((getObjectType() == null) ? 0 : getObjectType().hashCode()); result = prime * result + ((getObjectId() == null) ? 0 : getObjectId().hashCode()); result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); @@ -264,6 +279,7 @@ public class SecUser implements Serializable { sb.append(", loginName=").append(loginName); sb.append(", password=").append(password); sb.append(", telephone=").append(telephone); + sb.append(", platformCode=").append(platformCode); sb.append(", objectType=").append(objectType); sb.append(", objectId=").append(objectId); sb.append(", roleId=").append(roleId); diff --git a/service/src/main/java/com/hfkj/entity/SecUserExample.java b/service/src/main/java/com/hfkj/entity/SecUserExample.java index 8314f2f..850a9c0 100644 --- a/service/src/main/java/com/hfkj/entity/SecUserExample.java +++ b/service/src/main/java/com/hfkj/entity/SecUserExample.java @@ -535,6 +535,76 @@ public class SecUserExample { return (Criteria) this; } + public Criteria andPlatformCodeIsNull() { + addCriterion("platform_code is null"); + return (Criteria) this; + } + + public Criteria andPlatformCodeIsNotNull() { + addCriterion("platform_code is not null"); + return (Criteria) this; + } + + public Criteria andPlatformCodeEqualTo(String value) { + addCriterion("platform_code =", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeNotEqualTo(String value) { + addCriterion("platform_code <>", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeGreaterThan(String value) { + addCriterion("platform_code >", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeGreaterThanOrEqualTo(String value) { + addCriterion("platform_code >=", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeLessThan(String value) { + addCriterion("platform_code <", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeLessThanOrEqualTo(String value) { + addCriterion("platform_code <=", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeLike(String value) { + addCriterion("platform_code like", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeNotLike(String value) { + addCriterion("platform_code not like", value, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeIn(List values) { + addCriterion("platform_code in", values, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeNotIn(List values) { + addCriterion("platform_code not in", values, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeBetween(String value1, String value2) { + addCriterion("platform_code between", value1, value2, "platformCode"); + return (Criteria) this; + } + + public Criteria andPlatformCodeNotBetween(String value1, String value2) { + addCriterion("platform_code not between", value1, value2, "platformCode"); + return (Criteria) this; + } + public Criteria andObjectTypeIsNull() { addCriterion("object_type is null"); return (Criteria) this;