diff --git a/service/src/main/java/com/hfkj/dao/BsUserMapper.java b/service/src/main/java/com/hfkj/dao/BsUserMapper.java index 3dd804f..0b485f1 100644 --- a/service/src/main/java/com/hfkj/dao/BsUserMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsUserMapper.java @@ -41,22 +41,22 @@ public interface BsUserMapper extends BsUserMapperExt { @Insert({ "insert into bs_user (head_img, `name`, ", "phone, grade, wechat_num, ", - "special_id, wechat_open_id, ", - "wechat_unionid, elm_pid, ", - "invite_user_id, invite_time, ", - "partner_level, partner_income_per, ", - "`status`, create_time, ", - "update_time, ext_1, ", - "ext_2, ext_3)", + "special_id, relation_id, ", + "wechat_open_id, wechat_unionid, ", + "elm_pid, invite_user_id, ", + "invite_time, partner_level, ", + "partner_income_per, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", "values (#{headImg,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ", "#{phone,jdbcType=VARCHAR}, #{grade,jdbcType=INTEGER}, #{wechatNum,jdbcType=VARCHAR}, ", - "#{specialId,jdbcType=VARCHAR}, #{wechatOpenId,jdbcType=VARCHAR}, ", - "#{wechatUnionid,jdbcType=VARCHAR}, #{elmPid,jdbcType=VARCHAR}, ", - "#{inviteUserId,jdbcType=BIGINT}, #{inviteTime,jdbcType=TIMESTAMP}, ", - "#{partnerLevel,jdbcType=INTEGER}, #{partnerIncomePer,jdbcType=DECIMAL}, ", - "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{specialId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR}, ", + "#{wechatOpenId,jdbcType=VARCHAR}, #{wechatUnionid,jdbcType=VARCHAR}, ", + "#{elmPid,jdbcType=VARCHAR}, #{inviteUserId,jdbcType=BIGINT}, ", + "#{inviteTime,jdbcType=TIMESTAMP}, #{partnerLevel,jdbcType=INTEGER}, ", + "#{partnerIncomePer,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsUser record); @@ -74,6 +74,7 @@ public interface BsUserMapper extends BsUserMapperExt { @Result(column="grade", property="grade", jdbcType=JdbcType.INTEGER), @Result(column="wechat_num", property="wechatNum", jdbcType=JdbcType.VARCHAR), @Result(column="special_id", property="specialId", jdbcType=JdbcType.VARCHAR), + @Result(column="relation_id", property="relationId", jdbcType=JdbcType.VARCHAR), @Result(column="wechat_open_id", property="wechatOpenId", jdbcType=JdbcType.VARCHAR), @Result(column="wechat_unionid", property="wechatUnionid", jdbcType=JdbcType.VARCHAR), @Result(column="elm_pid", property="elmPid", jdbcType=JdbcType.VARCHAR), @@ -92,7 +93,7 @@ public interface BsUserMapper extends BsUserMapperExt { @Select({ "select", - "id, head_img, `name`, phone, grade, wechat_num, special_id, wechat_open_id, ", + "id, head_img, `name`, phone, grade, wechat_num, special_id, relation_id, wechat_open_id, ", "wechat_unionid, elm_pid, invite_user_id, invite_time, partner_level, partner_income_per, ", "`status`, create_time, update_time, ext_1, ext_2, ext_3", "from bs_user", @@ -106,6 +107,7 @@ public interface BsUserMapper extends BsUserMapperExt { @Result(column="grade", property="grade", jdbcType=JdbcType.INTEGER), @Result(column="wechat_num", property="wechatNum", jdbcType=JdbcType.VARCHAR), @Result(column="special_id", property="specialId", jdbcType=JdbcType.VARCHAR), + @Result(column="relation_id", property="relationId", jdbcType=JdbcType.VARCHAR), @Result(column="wechat_open_id", property="wechatOpenId", jdbcType=JdbcType.VARCHAR), @Result(column="wechat_unionid", property="wechatUnionid", jdbcType=JdbcType.VARCHAR), @Result(column="elm_pid", property="elmPid", jdbcType=JdbcType.VARCHAR), @@ -139,6 +141,7 @@ public interface BsUserMapper extends BsUserMapperExt { "grade = #{grade,jdbcType=INTEGER},", "wechat_num = #{wechatNum,jdbcType=VARCHAR},", "special_id = #{specialId,jdbcType=VARCHAR},", + "relation_id = #{relationId,jdbcType=VARCHAR},", "wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR},", "wechat_unionid = #{wechatUnionid,jdbcType=VARCHAR},", "elm_pid = #{elmPid,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsUserSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsUserSqlProvider.java index 5150a17..ee056a0 100644 --- a/service/src/main/java/com/hfkj/dao/BsUserSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsUserSqlProvider.java @@ -52,6 +52,10 @@ public class BsUserSqlProvider { sql.VALUES("special_id", "#{specialId,jdbcType=VARCHAR}"); } + if (record.getRelationId() != null) { + sql.VALUES("relation_id", "#{relationId,jdbcType=VARCHAR}"); + } + if (record.getWechatOpenId() != null) { sql.VALUES("wechat_open_id", "#{wechatOpenId,jdbcType=VARCHAR}"); } @@ -120,6 +124,7 @@ public class BsUserSqlProvider { sql.SELECT("grade"); sql.SELECT("wechat_num"); sql.SELECT("special_id"); + sql.SELECT("relation_id"); sql.SELECT("wechat_open_id"); sql.SELECT("wechat_unionid"); sql.SELECT("elm_pid"); @@ -178,6 +183,10 @@ public class BsUserSqlProvider { sql.SET("special_id = #{record.specialId,jdbcType=VARCHAR}"); } + if (record.getRelationId() != null) { + sql.SET("relation_id = #{record.relationId,jdbcType=VARCHAR}"); + } + if (record.getWechatOpenId() != null) { sql.SET("wechat_open_id = #{record.wechatOpenId,jdbcType=VARCHAR}"); } @@ -245,6 +254,7 @@ public class BsUserSqlProvider { sql.SET("grade = #{record.grade,jdbcType=INTEGER}"); sql.SET("wechat_num = #{record.wechatNum,jdbcType=VARCHAR}"); sql.SET("special_id = #{record.specialId,jdbcType=VARCHAR}"); + sql.SET("relation_id = #{record.relationId,jdbcType=VARCHAR}"); sql.SET("wechat_open_id = #{record.wechatOpenId,jdbcType=VARCHAR}"); sql.SET("wechat_unionid = #{record.wechatUnionid,jdbcType=VARCHAR}"); sql.SET("elm_pid = #{record.elmPid,jdbcType=VARCHAR}"); @@ -292,6 +302,10 @@ public class BsUserSqlProvider { sql.SET("special_id = #{specialId,jdbcType=VARCHAR}"); } + if (record.getRelationId() != null) { + sql.SET("relation_id = #{relationId,jdbcType=VARCHAR}"); + } + if (record.getWechatOpenId() != null) { sql.SET("wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsUser.java b/service/src/main/java/com/hfkj/entity/BsUser.java index 9e538a2..d77e574 100644 --- a/service/src/main/java/com/hfkj/entity/BsUser.java +++ b/service/src/main/java/com/hfkj/entity/BsUser.java @@ -45,10 +45,15 @@ public class BsUser implements Serializable { private String wechatNum; /** - * 淘宝会员独有 + * 淘宝会员Id */ private String specialId; + /** + * 淘宝渠道关系ID + */ + private String relationId; + /** * 微信openid */ @@ -163,6 +168,14 @@ public class BsUser implements Serializable { this.specialId = specialId; } + public String getRelationId() { + return relationId; + } + + public void setRelationId(String relationId) { + this.relationId = relationId; + } + public String getWechatOpenId() { return wechatOpenId; } @@ -266,96 +279,4 @@ public class BsUser implements Serializable { public void setExt3(String ext3) { this.ext3 = ext3; } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - BsUser other = (BsUser) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getHeadImg() == null ? other.getHeadImg() == null : this.getHeadImg().equals(other.getHeadImg())) - && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) - && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) - && (this.getGrade() == null ? other.getGrade() == null : this.getGrade().equals(other.getGrade())) - && (this.getWechatNum() == null ? other.getWechatNum() == null : this.getWechatNum().equals(other.getWechatNum())) - && (this.getSpecialId() == null ? other.getSpecialId() == null : this.getSpecialId().equals(other.getSpecialId())) - && (this.getWechatOpenId() == null ? other.getWechatOpenId() == null : this.getWechatOpenId().equals(other.getWechatOpenId())) - && (this.getWechatUnionid() == null ? other.getWechatUnionid() == null : this.getWechatUnionid().equals(other.getWechatUnionid())) - && (this.getElmPid() == null ? other.getElmPid() == null : this.getElmPid().equals(other.getElmPid())) - && (this.getInviteUserId() == null ? other.getInviteUserId() == null : this.getInviteUserId().equals(other.getInviteUserId())) - && (this.getInviteTime() == null ? other.getInviteTime() == null : this.getInviteTime().equals(other.getInviteTime())) - && (this.getPartnerLevel() == null ? other.getPartnerLevel() == null : this.getPartnerLevel().equals(other.getPartnerLevel())) - && (this.getPartnerIncomePer() == null ? other.getPartnerIncomePer() == null : this.getPartnerIncomePer().equals(other.getPartnerIncomePer())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (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())) - && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) - && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getHeadImg() == null) ? 0 : getHeadImg().hashCode()); - result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); - result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); - result = prime * result + ((getGrade() == null) ? 0 : getGrade().hashCode()); - result = prime * result + ((getWechatNum() == null) ? 0 : getWechatNum().hashCode()); - result = prime * result + ((getSpecialId() == null) ? 0 : getSpecialId().hashCode()); - result = prime * result + ((getWechatOpenId() == null) ? 0 : getWechatOpenId().hashCode()); - result = prime * result + ((getWechatUnionid() == null) ? 0 : getWechatUnionid().hashCode()); - result = prime * result + ((getElmPid() == null) ? 0 : getElmPid().hashCode()); - result = prime * result + ((getInviteUserId() == null) ? 0 : getInviteUserId().hashCode()); - result = prime * result + ((getInviteTime() == null) ? 0 : getInviteTime().hashCode()); - result = prime * result + ((getPartnerLevel() == null) ? 0 : getPartnerLevel().hashCode()); - result = prime * result + ((getPartnerIncomePer() == null) ? 0 : getPartnerIncomePer().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().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()); - result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); - result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", headImg=").append(headImg); - sb.append(", name=").append(name); - sb.append(", phone=").append(phone); - sb.append(", grade=").append(grade); - sb.append(", wechatNum=").append(wechatNum); - sb.append(", specialId=").append(specialId); - sb.append(", wechatOpenId=").append(wechatOpenId); - sb.append(", wechatUnionid=").append(wechatUnionid); - sb.append(", elmPid=").append(elmPid); - sb.append(", inviteUserId=").append(inviteUserId); - sb.append(", inviteTime=").append(inviteTime); - sb.append(", partnerLevel=").append(partnerLevel); - sb.append(", partnerIncomePer=").append(partnerIncomePer); - sb.append(", status=").append(status); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append(", ext1=").append(ext1); - sb.append(", ext2=").append(ext2); - sb.append(", ext3=").append(ext3); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsUserExample.java b/service/src/main/java/com/hfkj/entity/BsUserExample.java index 0526f1c..1116e15 100644 --- a/service/src/main/java/com/hfkj/entity/BsUserExample.java +++ b/service/src/main/java/com/hfkj/entity/BsUserExample.java @@ -596,6 +596,76 @@ public class BsUserExample { return (Criteria) this; } + public Criteria andRelationIdIsNull() { + addCriterion("relation_id is null"); + return (Criteria) this; + } + + public Criteria andRelationIdIsNotNull() { + addCriterion("relation_id is not null"); + return (Criteria) this; + } + + public Criteria andRelationIdEqualTo(String value) { + addCriterion("relation_id =", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdNotEqualTo(String value) { + addCriterion("relation_id <>", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdGreaterThan(String value) { + addCriterion("relation_id >", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdGreaterThanOrEqualTo(String value) { + addCriterion("relation_id >=", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdLessThan(String value) { + addCriterion("relation_id <", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdLessThanOrEqualTo(String value) { + addCriterion("relation_id <=", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdLike(String value) { + addCriterion("relation_id like", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdNotLike(String value) { + addCriterion("relation_id not like", value, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdIn(List values) { + addCriterion("relation_id in", values, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdNotIn(List values) { + addCriterion("relation_id not in", values, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdBetween(String value1, String value2) { + addCriterion("relation_id between", value1, value2, "relationId"); + return (Criteria) this; + } + + public Criteria andRelationIdNotBetween(String value1, String value2) { + addCriterion("relation_id not between", value1, value2, "relationId"); + return (Criteria) this; + } + public Criteria andWechatOpenIdIsNull() { addCriterion("wechat_open_id is null"); return (Criteria) this;