From d177803363b71a22a76ab94e340d65ed6dd9aa2d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 24 Nov 2021 15:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hai/dao/HighDiscountUserRelMapper.java | 19 +++--- .../dao/HighDiscountUserRelSqlProvider.java | 14 +++++ .../com/hai/entity/HighDiscountUserRel.java | 16 +++++ .../entity/HighDiscountUserRelExample.java | 60 +++++++++++++++++++ 4 files changed, 101 insertions(+), 8 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java index 8d482d39..b106cd97 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java @@ -39,14 +39,14 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount_user_rel (discount_id, agent_id, ", - "discount_agent_code_id, user_id, ", - "`status`, use_time, ", + "insert into high_discount_user_rel (discount_id, using_attribution, ", + "agent_id, discount_agent_code_id, ", + "user_id, `status`, use_time, ", "create_time, use_end_time, ", "ext_1, ext_2, ext_3)", - "values (#{discountId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", - "#{discountAgentCodeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", + "values (#{discountId,jdbcType=BIGINT}, #{usingAttribution,jdbcType=INTEGER}, ", + "#{agentId,jdbcType=BIGINT}, #{discountAgentCodeId,jdbcType=BIGINT}, ", + "#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -61,6 +61,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), + @Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="discount_agent_code_id", property="discountAgentCodeId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @@ -76,14 +77,15 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Select({ "select", - "id, discount_id, agent_id, discount_agent_code_id, user_id, `status`, use_time, ", - "create_time, use_end_time, ext_1, ext_2, ext_3", + "id, discount_id, using_attribution, agent_id, discount_agent_code_id, user_id, ", + "`status`, use_time, create_time, use_end_time, ext_1, ext_2, ext_3", "from high_discount_user_rel", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), + @Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="discount_agent_code_id", property="discountAgentCodeId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @@ -109,6 +111,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Update({ "update high_discount_user_rel", "set discount_id = #{discountId,jdbcType=BIGINT},", + "using_attribution = #{usingAttribution,jdbcType=INTEGER},", "agent_id = #{agentId,jdbcType=BIGINT},", "discount_agent_code_id = #{discountAgentCodeId,jdbcType=BIGINT},", "user_id = #{userId,jdbcType=BIGINT},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java index 37a99bc8..8dafd5db 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java @@ -32,6 +32,10 @@ public class HighDiscountUserRelSqlProvider { sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); } + if (record.getUsingAttribution() != null) { + sql.VALUES("using_attribution", "#{usingAttribution,jdbcType=INTEGER}"); + } + if (record.getAgentId() != null) { sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); } @@ -83,6 +87,7 @@ public class HighDiscountUserRelSqlProvider { sql.SELECT("id"); } sql.SELECT("discount_id"); + sql.SELECT("using_attribution"); sql.SELECT("agent_id"); sql.SELECT("discount_agent_code_id"); sql.SELECT("user_id"); @@ -118,6 +123,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); } + if (record.getUsingAttribution() != null) { + sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); + } + if (record.getAgentId() != null) { sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); } @@ -168,6 +177,7 @@ public class HighDiscountUserRelSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); + sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}"); sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); sql.SET("discount_agent_code_id = #{record.discountAgentCodeId,jdbcType=BIGINT}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); @@ -192,6 +202,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); } + if (record.getUsingAttribution() != null) { + sql.SET("using_attribution = #{usingAttribution,jdbcType=INTEGER}"); + } + if (record.getAgentId() != null) { sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java index 11e966a4..57c4b59e 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java @@ -25,6 +25,11 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser */ private Long discountId; + /** + * 使用归属 + */ + private Integer usingAttribution; + /** * 代理商id */ @@ -84,6 +89,14 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser this.discountId = discountId; } + public Integer getUsingAttribution() { + return usingAttribution; + } + + public void setUsingAttribution(Integer usingAttribution) { + this.usingAttribution = usingAttribution; + } + public Long getAgentId() { return agentId; } @@ -178,6 +191,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser HighDiscountUserRel other = (HighDiscountUserRel) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) + && (this.getUsingAttribution() == null ? other.getUsingAttribution() == null : this.getUsingAttribution().equals(other.getUsingAttribution())) && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) && (this.getDiscountAgentCodeId() == null ? other.getDiscountAgentCodeId() == null : this.getDiscountAgentCodeId().equals(other.getDiscountAgentCodeId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) @@ -196,6 +210,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); + result = prime * result + ((getUsingAttribution() == null) ? 0 : getUsingAttribution().hashCode()); result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); result = prime * result + ((getDiscountAgentCodeId() == null) ? 0 : getDiscountAgentCodeId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); @@ -217,6 +232,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", discountId=").append(discountId); + sb.append(", usingAttribution=").append(usingAttribution); sb.append(", agentId=").append(agentId); sb.append(", discountAgentCodeId=").append(discountAgentCodeId); sb.append(", userId=").append(userId); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java index 1c593d37..54aa08e8 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java @@ -245,6 +245,66 @@ public class HighDiscountUserRelExample { return (Criteria) this; } + public Criteria andUsingAttributionIsNull() { + addCriterion("using_attribution is null"); + return (Criteria) this; + } + + public Criteria andUsingAttributionIsNotNull() { + addCriterion("using_attribution is not null"); + return (Criteria) this; + } + + public Criteria andUsingAttributionEqualTo(Integer value) { + addCriterion("using_attribution =", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionNotEqualTo(Integer value) { + addCriterion("using_attribution <>", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionGreaterThan(Integer value) { + addCriterion("using_attribution >", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionGreaterThanOrEqualTo(Integer value) { + addCriterion("using_attribution >=", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionLessThan(Integer value) { + addCriterion("using_attribution <", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionLessThanOrEqualTo(Integer value) { + addCriterion("using_attribution <=", value, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionIn(List values) { + addCriterion("using_attribution in", values, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionNotIn(List values) { + addCriterion("using_attribution not in", values, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionBetween(Integer value1, Integer value2) { + addCriterion("using_attribution between", value1, value2, "usingAttribution"); + return (Criteria) this; + } + + public Criteria andUsingAttributionNotBetween(Integer value1, Integer value2) { + addCriterion("using_attribution not between", value1, value2, "usingAttribution"); + return (Criteria) this; + } + public Criteria andAgentIdIsNull() { addCriterion("agent_id is null"); return (Criteria) this;