From 28afaf47190781742354768fa060de3b63aadbd0 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Sun, 14 Aug 2022 04:12:29 +0800 Subject: [PATCH] 1 --- .../hai/dao/BsDistributionRebateMapper.java | 26 ++++---- .../dao/BsDistributionRebateSqlProvider.java | 14 +++++ .../com/hai/entity/BsDistributionRebate.java | 16 +++++ .../entity/BsDistributionRebateExample.java | 60 +++++++++++++++++++ 4 files changed, 106 insertions(+), 10 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java index 00fa9ee8..fe27b432 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java @@ -41,16 +41,18 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Insert({ "insert into bs_distribution_rebate (title, order_no, ", "agent_id, popularize_user_id, ", - "user_id, user_name, ", - "integral_num, create_time, ", - "update_time, `status`, ", - "ext_1, ext_2, ext_3)", + "second_popularize_user_id, user_id, ", + "user_name, integral_num, ", + "create_time, update_time, ", + "`status`, ext_1, ext_2, ", + "ext_3)", "values (#{title,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ", "#{agentId,jdbcType=BIGINT}, #{popularizeUserId,jdbcType=BIGINT}, ", - "#{userId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, ", - "#{integralNum,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{secondPopularizeUserId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", + "#{userName,jdbcType=VARCHAR}, #{integralNum,jdbcType=DECIMAL}, ", + "#{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(BsDistributionRebate record); @@ -66,6 +68,7 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="popularize_user_id", property="popularizeUserId", jdbcType=JdbcType.BIGINT), + @Result(column="second_popularize_user_id", property="secondPopularizeUserId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), @Result(column="integral_num", property="integralNum", jdbcType=JdbcType.DECIMAL), @@ -80,8 +83,9 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Select({ "select", - "id, title, order_no, agent_id, popularize_user_id, user_id, user_name, integral_num, ", - "create_time, update_time, `status`, ext_1, ext_2, ext_3", + "id, title, order_no, agent_id, popularize_user_id, second_popularize_user_id, ", + "user_id, user_name, integral_num, create_time, update_time, `status`, ext_1, ", + "ext_2, ext_3", "from bs_distribution_rebate", "where id = #{id,jdbcType=BIGINT}" }) @@ -91,6 +95,7 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="popularize_user_id", property="popularizeUserId", jdbcType=JdbcType.BIGINT), + @Result(column="second_popularize_user_id", property="secondPopularizeUserId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), @Result(column="integral_num", property="integralNum", jdbcType=JdbcType.DECIMAL), @@ -118,6 +123,7 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx "order_no = #{orderNo,jdbcType=VARCHAR},", "agent_id = #{agentId,jdbcType=BIGINT},", "popularize_user_id = #{popularizeUserId,jdbcType=BIGINT},", + "second_popularize_user_id = #{secondPopularizeUserId,jdbcType=BIGINT},", "user_id = #{userId,jdbcType=BIGINT},", "user_name = #{userName,jdbcType=VARCHAR},", "integral_num = #{integralNum,jdbcType=DECIMAL},", diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java index 7dc4601e..384b9717 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java @@ -44,6 +44,10 @@ public class BsDistributionRebateSqlProvider { sql.VALUES("popularize_user_id", "#{popularizeUserId,jdbcType=BIGINT}"); } + if (record.getSecondPopularizeUserId() != null) { + sql.VALUES("second_popularize_user_id", "#{secondPopularizeUserId,jdbcType=BIGINT}"); + } + if (record.getUserId() != null) { sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); } @@ -94,6 +98,7 @@ public class BsDistributionRebateSqlProvider { sql.SELECT("order_no"); sql.SELECT("agent_id"); sql.SELECT("popularize_user_id"); + sql.SELECT("second_popularize_user_id"); sql.SELECT("user_id"); sql.SELECT("user_name"); sql.SELECT("integral_num"); @@ -140,6 +145,10 @@ public class BsDistributionRebateSqlProvider { sql.SET("popularize_user_id = #{record.popularizeUserId,jdbcType=BIGINT}"); } + if (record.getSecondPopularizeUserId() != null) { + sql.SET("second_popularize_user_id = #{record.secondPopularizeUserId,jdbcType=BIGINT}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); } @@ -189,6 +198,7 @@ public class BsDistributionRebateSqlProvider { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); sql.SET("popularize_user_id = #{record.popularizeUserId,jdbcType=BIGINT}"); + sql.SET("second_popularize_user_id = #{record.secondPopularizeUserId,jdbcType=BIGINT}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); sql.SET("integral_num = #{record.integralNum,jdbcType=DECIMAL}"); @@ -224,6 +234,10 @@ public class BsDistributionRebateSqlProvider { sql.SET("popularize_user_id = #{popularizeUserId,jdbcType=BIGINT}"); } + if (record.getSecondPopularizeUserId() != null) { + sql.SET("second_popularize_user_id = #{secondPopularizeUserId,jdbcType=BIGINT}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{userId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java b/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java index 2171d74d..66f5bc49 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java @@ -39,6 +39,11 @@ public class BsDistributionRebate implements Serializable { */ private Long popularizeUserId; + /** + * 二级推广人员 + */ + private Long secondPopularizeUserId; + /** * 人员ID */ @@ -126,6 +131,14 @@ public class BsDistributionRebate implements Serializable { this.popularizeUserId = popularizeUserId; } + public Long getSecondPopularizeUserId() { + return secondPopularizeUserId; + } + + public void setSecondPopularizeUserId(Long secondPopularizeUserId) { + this.secondPopularizeUserId = secondPopularizeUserId; + } + public Long getUserId() { return userId; } @@ -215,6 +228,7 @@ public class BsDistributionRebate implements Serializable { && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) && (this.getPopularizeUserId() == null ? other.getPopularizeUserId() == null : this.getPopularizeUserId().equals(other.getPopularizeUserId())) + && (this.getSecondPopularizeUserId() == null ? other.getSecondPopularizeUserId() == null : this.getSecondPopularizeUserId().equals(other.getSecondPopularizeUserId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) && (this.getIntegralNum() == null ? other.getIntegralNum() == null : this.getIntegralNum().equals(other.getIntegralNum())) @@ -235,6 +249,7 @@ public class BsDistributionRebate implements Serializable { result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); result = prime * result + ((getPopularizeUserId() == null) ? 0 : getPopularizeUserId().hashCode()); + result = prime * result + ((getSecondPopularizeUserId() == null) ? 0 : getSecondPopularizeUserId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); result = prime * result + ((getIntegralNum() == null) ? 0 : getIntegralNum().hashCode()); @@ -258,6 +273,7 @@ public class BsDistributionRebate implements Serializable { sb.append(", orderNo=").append(orderNo); sb.append(", agentId=").append(agentId); sb.append(", popularizeUserId=").append(popularizeUserId); + sb.append(", secondPopularizeUserId=").append(secondPopularizeUserId); sb.append(", userId=").append(userId); sb.append(", userName=").append(userName); sb.append(", integralNum=").append(integralNum); diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java b/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java index 2797d30c..1cb597e4 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java @@ -446,6 +446,66 @@ public class BsDistributionRebateExample { return (Criteria) this; } + public Criteria andSecondPopularizeUserIdIsNull() { + addCriterion("second_popularize_user_id is null"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdIsNotNull() { + addCriterion("second_popularize_user_id is not null"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdEqualTo(Long value) { + addCriterion("second_popularize_user_id =", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdNotEqualTo(Long value) { + addCriterion("second_popularize_user_id <>", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdGreaterThan(Long value) { + addCriterion("second_popularize_user_id >", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("second_popularize_user_id >=", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdLessThan(Long value) { + addCriterion("second_popularize_user_id <", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdLessThanOrEqualTo(Long value) { + addCriterion("second_popularize_user_id <=", value, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdIn(List values) { + addCriterion("second_popularize_user_id in", values, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdNotIn(List values) { + addCriterion("second_popularize_user_id not in", values, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdBetween(Long value1, Long value2) { + addCriterion("second_popularize_user_id between", value1, value2, "secondPopularizeUserId"); + return (Criteria) this; + } + + public Criteria andSecondPopularizeUserIdNotBetween(Long value1, Long value2) { + addCriterion("second_popularize_user_id not between", value1, value2, "secondPopularizeUserId"); + return (Criteria) this; + } + public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this;