From 92ba2dac9109819ccda3aa6e10b6c04007825876 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Thu, 11 Aug 2022 17:40:14 +0800 Subject: [PATCH 1/5] 1 --- .../hai/dao/BsDistributionRebateMapper.java | 133 ++ .../dao/BsDistributionRebateMapperExt.java | 7 + .../dao/BsDistributionRebateSqlProvider.java | 360 ++++++ .../hai/dao/BsDistributionUserRelMapper.java | 130 ++ .../dao/BsDistributionUserRelMapperExt.java | 7 + .../dao/BsDistributionUserRelSqlProvider.java | 346 +++++ .../com/hai/entity/BsDistributionRebate.java | 274 ++++ .../entity/BsDistributionRebateExample.java | 1124 +++++++++++++++++ .../com/hai/entity/BsDistributionUserRel.java | 257 ++++ .../entity/BsDistributionUserRelExample.java | 1063 ++++++++++++++++ 10 files changed, 3701 insertions(+) create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java new file mode 100644 index 00000000..00fa9ee8 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java @@ -0,0 +1,133 @@ +package com.hai.dao; + +import com.hai.entity.BsDistributionRebate; +import com.hai.entity.BsDistributionRebateExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface BsDistributionRebateMapper extends BsDistributionRebateMapperExt { + @SelectProvider(type=BsDistributionRebateSqlProvider.class, method="countByExample") + long countByExample(BsDistributionRebateExample example); + + @DeleteProvider(type=BsDistributionRebateSqlProvider.class, method="deleteByExample") + int deleteByExample(BsDistributionRebateExample example); + + @Delete({ + "delete from bs_distribution_rebate", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @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)", + "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})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsDistributionRebate record); + + @InsertProvider(type=BsDistributionRebateSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsDistributionRebate record); + + @SelectProvider(type=BsDistributionRebateSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @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="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), + @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), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsDistributionRebateExample example); + + @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", + "from bs_distribution_rebate", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @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="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), + @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), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsDistributionRebate selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsDistributionRebateSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsDistributionRebate record, @Param("example") BsDistributionRebateExample example); + + @UpdateProvider(type=BsDistributionRebateSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsDistributionRebate record, @Param("example") BsDistributionRebateExample example); + + @UpdateProvider(type=BsDistributionRebateSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsDistributionRebate record); + + @Update({ + "update bs_distribution_rebate", + "set title = #{title,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "agent_id = #{agentId,jdbcType=BIGINT},", + "popularize_user_id = #{popularizeUserId,jdbcType=BIGINT},", + "user_id = #{userId,jdbcType=BIGINT},", + "user_name = #{userName,jdbcType=VARCHAR},", + "integral_num = #{integralNum,jdbcType=DECIMAL},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsDistributionRebate record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapperExt.java b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapperExt.java new file mode 100644 index 00000000..b898b4be --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface BsDistributionRebateMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java new file mode 100644 index 00000000..7dc4601e --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java @@ -0,0 +1,360 @@ +package com.hai.dao; + +import com.hai.entity.BsDistributionRebate; +import com.hai.entity.BsDistributionRebateExample.Criteria; +import com.hai.entity.BsDistributionRebateExample.Criterion; +import com.hai.entity.BsDistributionRebateExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsDistributionRebateSqlProvider { + + public String countByExample(BsDistributionRebateExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_distribution_rebate"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsDistributionRebateExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_distribution_rebate"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsDistributionRebate record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_distribution_rebate"); + + if (record.getTitle() != null) { + sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserId() != null) { + sql.VALUES("popularize_user_id", "#{popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}"); + } + + if (record.getIntegralNum() != null) { + sql.VALUES("integral_num", "#{integralNum,jdbcType=DECIMAL}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsDistributionRebateExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("title"); + sql.SELECT("order_no"); + sql.SELECT("agent_id"); + sql.SELECT("popularize_user_id"); + sql.SELECT("user_id"); + sql.SELECT("user_name"); + sql.SELECT("integral_num"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_distribution_rebate"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsDistributionRebate record = (BsDistributionRebate) parameter.get("record"); + BsDistributionRebateExample example = (BsDistributionRebateExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_rebate"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getTitle() != null) { + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserId() != null) { + sql.SET("popularize_user_id = #{record.popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + } + + if (record.getIntegralNum() != null) { + sql.SET("integral_num = #{record.integralNum,jdbcType=DECIMAL}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_rebate"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + 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("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + sql.SET("integral_num = #{record.integralNum,jdbcType=DECIMAL}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsDistributionRebateExample example = (BsDistributionRebateExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsDistributionRebate record) { + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_rebate"); + + if (record.getTitle() != null) { + sql.SET("title = #{title,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserId() != null) { + sql.SET("popularize_user_id = #{popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{userName,jdbcType=VARCHAR}"); + } + + if (record.getIntegralNum() != null) { + sql.SET("integral_num = #{integralNum,jdbcType=DECIMAL}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsDistributionRebateExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java new file mode 100644 index 00000000..f310900b --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java @@ -0,0 +1,130 @@ +package com.hai.dao; + +import com.hai.entity.BsDistributionUserRel; +import com.hai.entity.BsDistributionUserRelExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface BsDistributionUserRelMapper extends BsDistributionUserRelMapperExt { + @SelectProvider(type=BsDistributionUserRelSqlProvider.class, method="countByExample") + long countByExample(BsDistributionUserRelExample example); + + @DeleteProvider(type=BsDistributionUserRelSqlProvider.class, method="deleteByExample") + int deleteByExample(BsDistributionUserRelExample example); + + @Delete({ + "delete from bs_distribution_user_rel", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "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)", + "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})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsDistributionUserRel record); + + @InsertProvider(type=BsDistributionUserRelSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsDistributionUserRel record); + + @SelectProvider(type=BsDistributionUserRelSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR), + @Result(column="popularize_user_id", property="popularizeUserId", jdbcType=JdbcType.BIGINT), + @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="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsDistributionUserRelExample example); + + @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", + "from bs_distribution_user_rel", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR), + @Result(column="popularize_user_id", property="popularizeUserId", jdbcType=JdbcType.BIGINT), + @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="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsDistributionUserRel selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsDistributionUserRelSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsDistributionUserRel record, @Param("example") BsDistributionUserRelExample example); + + @UpdateProvider(type=BsDistributionUserRelSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsDistributionUserRel record, @Param("example") BsDistributionUserRelExample example); + + @UpdateProvider(type=BsDistributionUserRelSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsDistributionUserRel record); + + @Update({ + "update bs_distribution_user_rel", + "set agent_id = #{agentId,jdbcType=BIGINT},", + "agent_name = #{agentName,jdbcType=VARCHAR},", + "popularize_user_id = #{popularizeUserId,jdbcType=BIGINT},", + "popularize_user_name = #{popularizeUserName,jdbcType=VARCHAR},", + "user_id = #{userId,jdbcType=BIGINT},", + "user_name = #{userName,jdbcType=VARCHAR},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsDistributionUserRel record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapperExt.java b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapperExt.java new file mode 100644 index 00000000..1cc0bed1 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface BsDistributionUserRelMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java new file mode 100644 index 00000000..57f2186e --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java @@ -0,0 +1,346 @@ +package com.hai.dao; + +import com.hai.entity.BsDistributionUserRel; +import com.hai.entity.BsDistributionUserRelExample.Criteria; +import com.hai.entity.BsDistributionUserRelExample.Criterion; +import com.hai.entity.BsDistributionUserRelExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsDistributionUserRelSqlProvider { + + public String countByExample(BsDistributionUserRelExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_distribution_user_rel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsDistributionUserRelExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_distribution_user_rel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsDistributionUserRel record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_distribution_user_rel"); + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.VALUES("agent_name", "#{agentName,jdbcType=VARCHAR}"); + } + + if (record.getPopularizeUserId() != null) { + sql.VALUES("popularize_user_id", "#{popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserName() != null) { + sql.VALUES("popularize_user_name", "#{popularizeUserName,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsDistributionUserRelExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("agent_id"); + sql.SELECT("agent_name"); + sql.SELECT("popularize_user_id"); + sql.SELECT("popularize_user_name"); + sql.SELECT("user_id"); + sql.SELECT("user_name"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_distribution_user_rel"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsDistributionUserRel record = (BsDistributionUserRel) parameter.get("record"); + BsDistributionUserRelExample example = (BsDistributionUserRelExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_user_rel"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}"); + } + + if (record.getPopularizeUserId() != null) { + sql.SET("popularize_user_id = #{record.popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserName() != null) { + sql.SET("popularize_user_name = #{record.popularizeUserName,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_user_rel"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}"); + sql.SET("popularize_user_id = #{record.popularizeUserId,jdbcType=BIGINT}"); + 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("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsDistributionUserRelExample example = (BsDistributionUserRelExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsDistributionUserRel record) { + SQL sql = new SQL(); + sql.UPDATE("bs_distribution_user_rel"); + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); + } + + if (record.getAgentName() != null) { + sql.SET("agent_name = #{agentName,jdbcType=VARCHAR}"); + } + + if (record.getPopularizeUserId() != null) { + sql.SET("popularize_user_id = #{popularizeUserId,jdbcType=BIGINT}"); + } + + if (record.getPopularizeUserName() != null) { + sql.SET("popularize_user_name = #{popularizeUserName,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{userName,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsDistributionUserRelExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java b/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java new file mode 100644 index 00000000..2171d74d --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java @@ -0,0 +1,274 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_distribution_rebate + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsDistributionRebate implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 标题 + */ + private String title; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 推广人员id + */ + private Long popularizeUserId; + + /** + * 人员ID + */ + private Long userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 积分数量 + */ + private BigDecimal integralNum; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 100 正常 99 删除 + */ + private Integer status; + + /** + * ext_1 + */ + private String ext1; + + /** + * ext_2 + */ + private String ext2; + + /** + * ext_3 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public Long getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + public Long getPopularizeUserId() { + return popularizeUserId; + } + + public void setPopularizeUserId(Long popularizeUserId) { + this.popularizeUserId = popularizeUserId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getIntegralNum() { + return integralNum; + } + + public void setIntegralNum(BigDecimal integralNum) { + this.integralNum = integralNum; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + 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; + } + BsDistributionRebate other = (BsDistributionRebate) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (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.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())) + && (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())) + && (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 + ((getTitle() == null) ? 0 : getTitle().hashCode()); + 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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); + result = prime * result + ((getIntegralNum() == null) ? 0 : getIntegralNum().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()); + 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(", title=").append(title); + sb.append(", orderNo=").append(orderNo); + sb.append(", agentId=").append(agentId); + sb.append(", popularizeUserId=").append(popularizeUserId); + sb.append(", userId=").append(userId); + sb.append(", userName=").append(userName); + sb.append(", integralNum=").append(integralNum); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", status=").append(status); + 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/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java b/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java new file mode 100644 index 00000000..2797d30c --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java @@ -0,0 +1,1124 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsDistributionRebateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsDistributionRebateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIsNull() { + addCriterion("popularize_user_id is null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIsNotNull() { + addCriterion("popularize_user_id is not null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdEqualTo(Long value) { + addCriterion("popularize_user_id =", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotEqualTo(Long value) { + addCriterion("popularize_user_id <>", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdGreaterThan(Long value) { + addCriterion("popularize_user_id >", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("popularize_user_id >=", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdLessThan(Long value) { + addCriterion("popularize_user_id <", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdLessThanOrEqualTo(Long value) { + addCriterion("popularize_user_id <=", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIn(List values) { + addCriterion("popularize_user_id in", values, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotIn(List values) { + addCriterion("popularize_user_id not in", values, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdBetween(Long value1, Long value2) { + addCriterion("popularize_user_id between", value1, value2, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotBetween(Long value1, Long value2) { + addCriterion("popularize_user_id not between", value1, value2, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserNameIsNull() { + addCriterion("user_name is null"); + return (Criteria) this; + } + + public Criteria andUserNameIsNotNull() { + addCriterion("user_name is not null"); + return (Criteria) this; + } + + public Criteria andUserNameEqualTo(String value) { + addCriterion("user_name =", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotEqualTo(String value) { + addCriterion("user_name <>", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThan(String value) { + addCriterion("user_name >", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThanOrEqualTo(String value) { + addCriterion("user_name >=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThan(String value) { + addCriterion("user_name <", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThanOrEqualTo(String value) { + addCriterion("user_name <=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLike(String value) { + addCriterion("user_name like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotLike(String value) { + addCriterion("user_name not like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameIn(List values) { + addCriterion("user_name in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotIn(List values) { + addCriterion("user_name not in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameBetween(String value1, String value2) { + addCriterion("user_name between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotBetween(String value1, String value2) { + addCriterion("user_name not between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andIntegralNumIsNull() { + addCriterion("integral_num is null"); + return (Criteria) this; + } + + public Criteria andIntegralNumIsNotNull() { + addCriterion("integral_num is not null"); + return (Criteria) this; + } + + public Criteria andIntegralNumEqualTo(BigDecimal value) { + addCriterion("integral_num =", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumNotEqualTo(BigDecimal value) { + addCriterion("integral_num <>", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumGreaterThan(BigDecimal value) { + addCriterion("integral_num >", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("integral_num >=", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumLessThan(BigDecimal value) { + addCriterion("integral_num <", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumLessThanOrEqualTo(BigDecimal value) { + addCriterion("integral_num <=", value, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumIn(List values) { + addCriterion("integral_num in", values, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumNotIn(List values) { + addCriterion("integral_num not in", values, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("integral_num between", value1, value2, "integralNum"); + return (Criteria) this; + } + + public Criteria andIntegralNumNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("integral_num not between", value1, value2, "integralNum"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java new file mode 100644 index 00000000..75f33668 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java @@ -0,0 +1,257 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_distribution_user_rel + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsDistributionUserRel implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 代理商名称 + */ + private String agentName; + + /** + * 推广人员id + */ + private Long popularizeUserId; + + /** + * 推广人员名称 + */ + private String popularizeUserName; + + /** + * 用户id + */ + private Long userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 100 正常 99 删除 + */ + private Integer status; + + /** + * ext_1 + */ + private String ext1; + + /** + * ext_2 + */ + private String ext2; + + /** + * ext_3 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + public String getAgentName() { + return agentName; + } + + public void setAgentName(String agentName) { + this.agentName = agentName; + } + + public Long getPopularizeUserId() { + return popularizeUserId; + } + + public void setPopularizeUserId(Long popularizeUserId) { + this.popularizeUserId = popularizeUserId; + } + + public String getPopularizeUserName() { + return popularizeUserName; + } + + public void setPopularizeUserName(String popularizeUserName) { + this.popularizeUserName = popularizeUserName; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + 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; + } + BsDistributionUserRel other = (BsDistributionUserRel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) + && (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName())) + && (this.getPopularizeUserId() == null ? other.getPopularizeUserId() == null : this.getPopularizeUserId().equals(other.getPopularizeUserId())) + && (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.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())) + && (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 + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); + result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode()); + result = prime * result + ((getPopularizeUserId() == null) ? 0 : getPopularizeUserId().hashCode()); + 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 + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", agentId=").append(agentId); + sb.append(", agentName=").append(agentName); + sb.append(", popularizeUserId=").append(popularizeUserId); + sb.append(", popularizeUserName=").append(popularizeUserName); + sb.append(", userId=").append(userId); + sb.append(", userName=").append(userName); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", status=").append(status); + 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/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java new file mode 100644 index 00000000..2f4a006e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java @@ -0,0 +1,1063 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsDistributionUserRelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsDistributionUserRelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNull() { + addCriterion("agent_name is null"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNotNull() { + addCriterion("agent_name is not null"); + return (Criteria) this; + } + + public Criteria andAgentNameEqualTo(String value) { + addCriterion("agent_name =", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotEqualTo(String value) { + addCriterion("agent_name <>", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThan(String value) { + addCriterion("agent_name >", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThanOrEqualTo(String value) { + addCriterion("agent_name >=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThan(String value) { + addCriterion("agent_name <", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThanOrEqualTo(String value) { + addCriterion("agent_name <=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLike(String value) { + addCriterion("agent_name like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotLike(String value) { + addCriterion("agent_name not like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameIn(List values) { + addCriterion("agent_name in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotIn(List values) { + addCriterion("agent_name not in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameBetween(String value1, String value2) { + addCriterion("agent_name between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotBetween(String value1, String value2) { + addCriterion("agent_name not between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIsNull() { + addCriterion("popularize_user_id is null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIsNotNull() { + addCriterion("popularize_user_id is not null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdEqualTo(Long value) { + addCriterion("popularize_user_id =", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotEqualTo(Long value) { + addCriterion("popularize_user_id <>", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdGreaterThan(Long value) { + addCriterion("popularize_user_id >", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("popularize_user_id >=", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdLessThan(Long value) { + addCriterion("popularize_user_id <", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdLessThanOrEqualTo(Long value) { + addCriterion("popularize_user_id <=", value, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdIn(List values) { + addCriterion("popularize_user_id in", values, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotIn(List values) { + addCriterion("popularize_user_id not in", values, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdBetween(Long value1, Long value2) { + addCriterion("popularize_user_id between", value1, value2, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserIdNotBetween(Long value1, Long value2) { + addCriterion("popularize_user_id not between", value1, value2, "popularizeUserId"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameIsNull() { + addCriterion("popularize_user_name is null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameIsNotNull() { + addCriterion("popularize_user_name is not null"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameEqualTo(String value) { + addCriterion("popularize_user_name =", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameNotEqualTo(String value) { + addCriterion("popularize_user_name <>", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameGreaterThan(String value) { + addCriterion("popularize_user_name >", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameGreaterThanOrEqualTo(String value) { + addCriterion("popularize_user_name >=", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameLessThan(String value) { + addCriterion("popularize_user_name <", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameLessThanOrEqualTo(String value) { + addCriterion("popularize_user_name <=", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameLike(String value) { + addCriterion("popularize_user_name like", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameNotLike(String value) { + addCriterion("popularize_user_name not like", value, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameIn(List values) { + addCriterion("popularize_user_name in", values, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameNotIn(List values) { + addCriterion("popularize_user_name not in", values, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameBetween(String value1, String value2) { + addCriterion("popularize_user_name between", value1, value2, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andPopularizeUserNameNotBetween(String value1, String value2) { + addCriterion("popularize_user_name not between", value1, value2, "popularizeUserName"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserNameIsNull() { + addCriterion("user_name is null"); + return (Criteria) this; + } + + public Criteria andUserNameIsNotNull() { + addCriterion("user_name is not null"); + return (Criteria) this; + } + + public Criteria andUserNameEqualTo(String value) { + addCriterion("user_name =", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotEqualTo(String value) { + addCriterion("user_name <>", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThan(String value) { + addCriterion("user_name >", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThanOrEqualTo(String value) { + addCriterion("user_name >=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThan(String value) { + addCriterion("user_name <", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThanOrEqualTo(String value) { + addCriterion("user_name <=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLike(String value) { + addCriterion("user_name like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotLike(String value) { + addCriterion("user_name not like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameIn(List values) { + addCriterion("user_name in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotIn(List values) { + addCriterion("user_name not in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameBetween(String value1, String value2) { + addCriterion("user_name between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotBetween(String value1, String value2) { + addCriterion("user_name not between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file From 80f1ec3403094e94034e5a2c5932c8e234e19de9 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 12 Aug 2022 11:44:53 +0800 Subject: [PATCH 2/5] 1 --- .../HighDiscountPackageController.java | 12 +-- .../service/BsDistributionUserRelService.java | 47 ++++++++++++ .../BsDistributionUserRelServiceImpl.java | 73 +++++++++++++++++++ .../impl/BsIntegralRebateServiceImpl.java | 8 ++ .../impl/HltUnionCardVipServiceImpl.java | 2 +- .../v1/controller/GzSinopecController.java | 2 +- 6 files changed, 136 insertions(+), 8 deletions(-) create mode 100644 hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java index 2fbd7056..ded4edef 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java @@ -164,9 +164,9 @@ public class HighDiscountPackageController { if (StringUtils.isBlank(highDiscountPackage.getTitle()) || highDiscountPackage.getSalesType() == null - || StringUtils.isBlank(highDiscountPackage.getBannerImg()) - || StringUtils.isBlank(highDiscountPackage.getListImg()) - || StringUtils.isBlank(highDiscountPackage.getDetailsImg()) +// || StringUtils.isBlank(highDiscountPackage.getBannerImg()) +// || StringUtils.isBlank(highDiscountPackage.getListImg()) +// || StringUtils.isBlank(highDiscountPackage.getDetailsImg()) ) { log.error("HighAgentController -> insertCouponPackageInfo() error!","参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); @@ -225,9 +225,9 @@ public class HighDiscountPackageController { if (StringUtils.isBlank(highDiscountPackage.getTitle()) || highDiscountPackage.getSalesType() == null || highDiscountPackage.getId() == null - || StringUtils.isBlank(highDiscountPackage.getBannerImg()) - || StringUtils.isBlank(highDiscountPackage.getListImg()) - || StringUtils.isBlank(highDiscountPackage.getDetailsImg()) +// || StringUtils.isBlank(highDiscountPackage.getBannerImg()) +// || StringUtils.isBlank(highDiscountPackage.getListImg()) +// || StringUtils.isBlank(highDiscountPackage.getDetailsImg()) ) { log.error("HighAgentController -> updateCouponPackageInfo() error!","参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); diff --git a/hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java b/hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java new file mode 100644 index 00000000..bae156b7 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java @@ -0,0 +1,47 @@ +package com.hai.service; + +import com.hai.entity.BsDistributionRebate; +import com.hai.entity.BsDistributionUserRel; + +import java.util.List; +import java.util.Map; + +/** + * @serviceName BsDistributionUserRelService.java + * @author Sum1Dream + * @version 1.0.0 + * @Description // 分销用户关联接口 + * @createTime 17:47 2022/8/11 + **/ +public interface BsDistributionUserRelService { + + /** + * @Author Sum1Dream + * @name insertDistributionRebate.java + * @Description // 新增关联关系 + * @Date 17:55 2022/8/11 + * @Param [java.lang.Long, java.lang.Long] + * @return void + */ + void insertDistributionRebate(Long userId , String userName, Long popularizeUserId); + + /** + * @Author Sum1Dream + * @name getDistributionRebateList.java + * @Description // 查询关联列表 + * @Date 17:51 2022/8/11 + * @Param [java.util.Map] + * @return java.util.List + */ + List getDistributionUserRelList(Map map); + + /** + * @Author Sum1Dream + * @name findDistributionUserRel.java + * @Description // 查询关联关系详情 + * @Date 18:00 2022/8/11 + * @Param [java.util.Map] + * @return com.hai.entity.BsDistributionUserRel + */ + BsDistributionUserRel findDistributionUserRel(Map map); +} diff --git a/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java new file mode 100644 index 00000000..bccc9d63 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java @@ -0,0 +1,73 @@ +package com.hai.service.impl; + +import com.hai.dao.BsDistributionRebateMapper; +import com.hai.dao.BsDistributionUserRelMapper; +import com.hai.entity.BsDistributionRebate; +import com.hai.entity.BsDistributionUserRel; +import com.hai.entity.BsDistributionUserRelExample; +import com.hai.service.BsDistributionUserRelService; +import org.apache.commons.collections4.MapUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service("bsDistributionUserRelService") +public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelService { + + @Resource + private BsDistributionUserRelMapper bsDistributionUserRelMapper; + + @Override + public void insertDistributionRebate(Long userId, String userName , Long popularizeUserId) { + + // 定义分销关联关系 + BsDistributionUserRel distributionUserRel = new BsDistributionUserRel(); + + // 查询推广员信息 + Map map = new HashMap<>(); + map.put("userId" , popularizeUserId); + + BsDistributionUserRel popularizeUser = findDistributionUserRel(map); + + distributionUserRel.setUserId(userId); + distributionUserRel.setUserName(userName); + distributionUserRel.setAgentId(popularizeUser.getAgentId()); + distributionUserRel.setAgentName(popularizeUser.getAgentName()); + distributionUserRel.setPopularizeUserId(popularizeUserId); + distributionUserRel.setPopularizeUserName(popularizeUser.getUserName()); + distributionUserRel.setCreateTime(new Date()); + distributionUserRel.setUpdateTime(new Date()); + distributionUserRel.setStatus(100); + + bsDistributionUserRelMapper.insert(distributionUserRel); + + } + + @Override + public List getDistributionUserRelList(Map map) { + return null; + } + + @Override + public BsDistributionUserRel findDistributionUserRel(Map map) { + + BsDistributionUserRelExample example = new BsDistributionUserRelExample(); + BsDistributionUserRelExample.Criteria criteria = example.createCriteria(); + + if (MapUtils.getLong(map , "userId") != null) { + criteria.andUserIdEqualTo(MapUtils.getLong(map , "userId")); + } + + List list = bsDistributionUserRelMapper.selectByExample(example); + + if (list.size() > 0) { + return list.get(0); + } + + return null; + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java index f78abcc9..8a9a92a2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java @@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject; import com.hai.dao.BsIntegralRebateMapper; import com.hai.entity.BsIntegralRebate; import com.hai.entity.BsIntegralRebateExample; +import com.hai.entity.HighOrder; import com.hai.service.BsIntegralRebateService; +import com.hai.service.HighOrderService; import com.hai.service.HighUserService; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; @@ -24,6 +26,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService { @Resource private HighUserService highUserService; + @Resource + private HighOrderService highOrderService; + @Override public BsIntegralRebate findIntegralRebateByMap(Map map) { @@ -101,6 +106,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService { if (bsIntegralRebate != null) { BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP ); + HighOrder order = highOrderService.getOrderById(object.getLong("orderId")); + + highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java index 1a9facf7..31d307ef 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java @@ -121,7 +121,7 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { map.put("salesType", 2); map.put("status", 1); - // 查询话费专属优惠券包 + // 查询专属优惠券包 List highDiscountPackages = highDiscountPackageService.getDiscountPackageList(map); if (highDiscountPackages.size() == 0) { diff --git a/v1/src/main/java/com/v1/controller/GzSinopecController.java b/v1/src/main/java/com/v1/controller/GzSinopecController.java index 7ba77376..d501f428 100644 --- a/v1/src/main/java/com/v1/controller/GzSinopecController.java +++ b/v1/src/main/java/com/v1/controller/GzSinopecController.java @@ -36,7 +36,7 @@ import java.util.Map; @Controller @RequestMapping(value = "/gzSinopec") @Api(value = "贵州中石化") -public class GzSinopecController { +public class GzSinopecController { private static Logger log = LoggerFactory.getLogger(GzSinopecController.class); From 1c9058ee8d9cf4eac053f9da550af4f48354f363 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 15 Aug 2022 11:46:13 +0800 Subject: [PATCH 3/5] 1 --- .../com/hai/dao/BsIntegralRebateMapper.java | 11 +- .../hai/dao/BsIntegralRebateSqlProvider.java | 28 ++++ .../main/java/com/hai/dao/HighUserMapper.java | 15 ++- .../java/com/hai/dao/HighUserSqlProvider.java | 14 ++ .../java/com/hai/entity/BsIntegralRebate.java | 32 +++++ .../hai/entity/BsIntegralRebateExample.java | 120 ++++++++++++++++++ .../main/java/com/hai/entity/HighUser.java | 22 +++- .../java/com/hai/entity/HighUserExample.java | 60 +++++++++ 8 files changed, 292 insertions(+), 10 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/BsIntegralRebateMapper.java b/hai-service/src/main/java/com/hai/dao/BsIntegralRebateMapper.java index c1ac80dd..277223cd 100644 --- a/hai-service/src/main/java/com/hai/dao/BsIntegralRebateMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsIntegralRebateMapper.java @@ -44,6 +44,7 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { "operator_id, operator_name, ", "create_time, update_time, ", "start_time, end_time, ", + "first_distribution, second_distribution, ", "`status`, ext_1, ext_2, ", "ext_3)", "values (#{companyId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ", @@ -51,6 +52,7 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, ", + "#{firstDistribution,jdbcType=DECIMAL}, #{secondDistribution,jdbcType=DECIMAL}, ", "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", "#{ext3,jdbcType=VARCHAR})" }) @@ -74,6 +76,8 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="first_distribution", property="firstDistribution", jdbcType=JdbcType.DECIMAL), + @Result(column="second_distribution", property="secondDistribution", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -84,7 +88,8 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { @Select({ "select", "id, company_id, `type`, product_id, percentage, operator_id, operator_name, ", - "create_time, update_time, start_time, end_time, `status`, ext_1, ext_2, ext_3", + "create_time, update_time, start_time, end_time, first_distribution, second_distribution, ", + "`status`, ext_1, ext_2, ext_3", "from bs_integral_rebate", "where id = #{id,jdbcType=BIGINT}" }) @@ -100,6 +105,8 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="first_distribution", property="firstDistribution", jdbcType=JdbcType.DECIMAL), + @Result(column="second_distribution", property="secondDistribution", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -128,6 +135,8 @@ public interface BsIntegralRebateMapper extends BsIntegralRebateMapperExt { "update_time = #{updateTime,jdbcType=TIMESTAMP},", "start_time = #{startTime,jdbcType=TIMESTAMP},", "end_time = #{endTime,jdbcType=TIMESTAMP},", + "first_distribution = #{firstDistribution,jdbcType=DECIMAL},", + "second_distribution = #{secondDistribution,jdbcType=DECIMAL},", "`status` = #{status,jdbcType=INTEGER},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/BsIntegralRebateSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsIntegralRebateSqlProvider.java index 3d4b782c..4dd6e9ad 100644 --- a/hai-service/src/main/java/com/hai/dao/BsIntegralRebateSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsIntegralRebateSqlProvider.java @@ -68,6 +68,14 @@ public class BsIntegralRebateSqlProvider { sql.VALUES("end_time", "#{endTime,jdbcType=TIMESTAMP}"); } + if (record.getFirstDistribution() != null) { + sql.VALUES("first_distribution", "#{firstDistribution,jdbcType=DECIMAL}"); + } + + if (record.getSecondDistribution() != null) { + sql.VALUES("second_distribution", "#{secondDistribution,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); } @@ -104,6 +112,8 @@ public class BsIntegralRebateSqlProvider { sql.SELECT("update_time"); sql.SELECT("start_time"); sql.SELECT("end_time"); + sql.SELECT("first_distribution"); + sql.SELECT("second_distribution"); sql.SELECT("`status`"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); @@ -169,6 +179,14 @@ public class BsIntegralRebateSqlProvider { sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}"); } + if (record.getFirstDistribution() != null) { + sql.SET("first_distribution = #{record.firstDistribution,jdbcType=DECIMAL}"); + } + + if (record.getSecondDistribution() != null) { + sql.SET("second_distribution = #{record.secondDistribution,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); } @@ -204,6 +222,8 @@ public class BsIntegralRebateSqlProvider { sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}"); sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}"); + sql.SET("first_distribution = #{record.firstDistribution,jdbcType=DECIMAL}"); + sql.SET("second_distribution = #{record.secondDistribution,jdbcType=DECIMAL}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); @@ -258,6 +278,14 @@ public class BsIntegralRebateSqlProvider { sql.SET("end_time = #{endTime,jdbcType=TIMESTAMP}"); } + if (record.getFirstDistribution() != null) { + sql.SET("first_distribution = #{firstDistribution,jdbcType=DECIMAL}"); + } + + if (record.getSecondDistribution() != null) { + sql.SET("second_distribution = #{secondDistribution,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{status,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighUserMapper.java b/hai-service/src/main/java/com/hai/dao/HighUserMapper.java index 200fd730..ae0236d4 100644 --- a/hai-service/src/main/java/com/hai/dao/HighUserMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighUserMapper.java @@ -45,16 +45,18 @@ public interface HighUserMapper extends HighUserMapperExt { "gold, `status`, open_id, ", "open_id_h5, union_id, ", "union_open_id, union_union_id, ", - "info_complete_status, ext_1, ", - "ext_2, ext_3, ext_4)", + "is_agent, info_complete_status, ", + "ext_1, ext_2, ext_3, ", + "ext_4)", "values (#{headerImg,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ", "#{phone,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, ", "#{sex,jdbcType=VARCHAR}, #{birthdate,jdbcType=DATE}, #{regTime,jdbcType=TIMESTAMP}, ", "#{gold,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{openId,jdbcType=VARCHAR}, ", "#{openIdH5,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR}, ", "#{unionOpenId,jdbcType=VARCHAR}, #{unionUnionId,jdbcType=VARCHAR}, ", - "#{infoCompleteStatus,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR})" + "#{isAgent,jdbcType=BIT}, #{infoCompleteStatus,jdbcType=INTEGER}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", + "#{ext4,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighUser record); @@ -80,6 +82,7 @@ public interface HighUserMapper extends HighUserMapperExt { @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR), @Result(column="union_open_id", property="unionOpenId", jdbcType=JdbcType.VARCHAR), @Result(column="union_union_id", property="unionUnionId", jdbcType=JdbcType.VARCHAR), + @Result(column="is_agent", property="isAgent", jdbcType=JdbcType.BIT), @Result(column="info_complete_status", property="infoCompleteStatus", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -91,7 +94,7 @@ public interface HighUserMapper extends HighUserMapperExt { @Select({ "select", "id, header_img, `name`, phone, `password`, sex, birthdate, reg_time, gold, `status`, ", - "open_id, open_id_h5, union_id, union_open_id, union_union_id, info_complete_status, ", + "open_id, open_id_h5, union_id, union_open_id, union_union_id, is_agent, info_complete_status, ", "ext_1, ext_2, ext_3, ext_4", "from high_user", "where id = #{id,jdbcType=BIGINT}" @@ -112,6 +115,7 @@ public interface HighUserMapper extends HighUserMapperExt { @Result(column="union_id", property="unionId", jdbcType=JdbcType.VARCHAR), @Result(column="union_open_id", property="unionOpenId", jdbcType=JdbcType.VARCHAR), @Result(column="union_union_id", property="unionUnionId", jdbcType=JdbcType.VARCHAR), + @Result(column="is_agent", property="isAgent", jdbcType=JdbcType.BIT), @Result(column="info_complete_status", property="infoCompleteStatus", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -145,6 +149,7 @@ public interface HighUserMapper extends HighUserMapperExt { "union_id = #{unionId,jdbcType=VARCHAR},", "union_open_id = #{unionOpenId,jdbcType=VARCHAR},", "union_union_id = #{unionUnionId,jdbcType=VARCHAR},", + "is_agent = #{isAgent,jdbcType=BIT},", "info_complete_status = #{infoCompleteStatus,jdbcType=INTEGER},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighUserSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighUserSqlProvider.java index db1ab51f..7ad27b1c 100644 --- a/hai-service/src/main/java/com/hai/dao/HighUserSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighUserSqlProvider.java @@ -84,6 +84,10 @@ public class HighUserSqlProvider { sql.VALUES("union_union_id", "#{unionUnionId,jdbcType=VARCHAR}"); } + if (record.getIsAgent() != null) { + sql.VALUES("is_agent", "#{isAgent,jdbcType=BIT}"); + } + if (record.getInfoCompleteStatus() != null) { sql.VALUES("info_complete_status", "#{infoCompleteStatus,jdbcType=INTEGER}"); } @@ -128,6 +132,7 @@ public class HighUserSqlProvider { sql.SELECT("union_id"); sql.SELECT("union_open_id"); sql.SELECT("union_union_id"); + sql.SELECT("is_agent"); sql.SELECT("info_complete_status"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); @@ -210,6 +215,10 @@ public class HighUserSqlProvider { sql.SET("union_union_id = #{record.unionUnionId,jdbcType=VARCHAR}"); } + if (record.getIsAgent() != null) { + sql.SET("is_agent = #{record.isAgent,jdbcType=BIT}"); + } + if (record.getInfoCompleteStatus() != null) { sql.SET("info_complete_status = #{record.infoCompleteStatus,jdbcType=INTEGER}"); } @@ -253,6 +262,7 @@ public class HighUserSqlProvider { sql.SET("union_id = #{record.unionId,jdbcType=VARCHAR}"); sql.SET("union_open_id = #{record.unionOpenId,jdbcType=VARCHAR}"); sql.SET("union_union_id = #{record.unionUnionId,jdbcType=VARCHAR}"); + sql.SET("is_agent = #{record.isAgent,jdbcType=BIT}"); sql.SET("info_complete_status = #{record.infoCompleteStatus,jdbcType=INTEGER}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); @@ -324,6 +334,10 @@ public class HighUserSqlProvider { sql.SET("union_union_id = #{unionUnionId,jdbcType=VARCHAR}"); } + if (record.getIsAgent() != null) { + sql.SET("is_agent = #{isAgent,jdbcType=BIT}"); + } + if (record.getInfoCompleteStatus() != null) { sql.SET("info_complete_status = #{infoCompleteStatus,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/BsIntegralRebate.java b/hai-service/src/main/java/com/hai/entity/BsIntegralRebate.java index 9df0aa5d..cb814b01 100644 --- a/hai-service/src/main/java/com/hai/entity/BsIntegralRebate.java +++ b/hai-service/src/main/java/com/hai/entity/BsIntegralRebate.java @@ -69,6 +69,16 @@ public class BsIntegralRebate implements Serializable { */ private Date endTime; + /** + * 一级分销 + */ + private BigDecimal firstDistribution; + + /** + * 二级分销 + */ + private BigDecimal secondDistribution; + /** * 101 正常 102 下架 100 删除 */ @@ -179,6 +189,22 @@ public class BsIntegralRebate implements Serializable { this.endTime = endTime; } + public BigDecimal getFirstDistribution() { + return firstDistribution; + } + + public void setFirstDistribution(BigDecimal firstDistribution) { + this.firstDistribution = firstDistribution; + } + + public BigDecimal getSecondDistribution() { + return secondDistribution; + } + + public void setSecondDistribution(BigDecimal secondDistribution) { + this.secondDistribution = secondDistribution; + } + public Integer getStatus() { return status; } @@ -234,6 +260,8 @@ public class BsIntegralRebate implements Serializable { && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getFirstDistribution() == null ? other.getFirstDistribution() == null : this.getFirstDistribution().equals(other.getFirstDistribution())) + && (this.getSecondDistribution() == null ? other.getSecondDistribution() == null : this.getSecondDistribution().equals(other.getSecondDistribution())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) @@ -255,6 +283,8 @@ public class BsIntegralRebate implements Serializable { result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getFirstDistribution() == null) ? 0 : getFirstDistribution().hashCode()); + result = prime * result + ((getSecondDistribution() == null) ? 0 : getSecondDistribution().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); @@ -279,6 +309,8 @@ public class BsIntegralRebate implements Serializable { sb.append(", updateTime=").append(updateTime); sb.append(", startTime=").append(startTime); sb.append(", endTime=").append(endTime); + sb.append(", firstDistribution=").append(firstDistribution); + sb.append(", secondDistribution=").append(secondDistribution); sb.append(", status=").append(status); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); diff --git a/hai-service/src/main/java/com/hai/entity/BsIntegralRebateExample.java b/hai-service/src/main/java/com/hai/entity/BsIntegralRebateExample.java index 59c928de..d96a4987 100644 --- a/hai-service/src/main/java/com/hai/entity/BsIntegralRebateExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsIntegralRebateExample.java @@ -796,6 +796,126 @@ public class BsIntegralRebateExample { return (Criteria) this; } + public Criteria andFirstDistributionIsNull() { + addCriterion("first_distribution is null"); + return (Criteria) this; + } + + public Criteria andFirstDistributionIsNotNull() { + addCriterion("first_distribution is not null"); + return (Criteria) this; + } + + public Criteria andFirstDistributionEqualTo(BigDecimal value) { + addCriterion("first_distribution =", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionNotEqualTo(BigDecimal value) { + addCriterion("first_distribution <>", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionGreaterThan(BigDecimal value) { + addCriterion("first_distribution >", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("first_distribution >=", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionLessThan(BigDecimal value) { + addCriterion("first_distribution <", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionLessThanOrEqualTo(BigDecimal value) { + addCriterion("first_distribution <=", value, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionIn(List values) { + addCriterion("first_distribution in", values, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionNotIn(List values) { + addCriterion("first_distribution not in", values, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("first_distribution between", value1, value2, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andFirstDistributionNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("first_distribution not between", value1, value2, "firstDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionIsNull() { + addCriterion("second_distribution is null"); + return (Criteria) this; + } + + public Criteria andSecondDistributionIsNotNull() { + addCriterion("second_distribution is not null"); + return (Criteria) this; + } + + public Criteria andSecondDistributionEqualTo(BigDecimal value) { + addCriterion("second_distribution =", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionNotEqualTo(BigDecimal value) { + addCriterion("second_distribution <>", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionGreaterThan(BigDecimal value) { + addCriterion("second_distribution >", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("second_distribution >=", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionLessThan(BigDecimal value) { + addCriterion("second_distribution <", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionLessThanOrEqualTo(BigDecimal value) { + addCriterion("second_distribution <=", value, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionIn(List values) { + addCriterion("second_distribution in", values, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionNotIn(List values) { + addCriterion("second_distribution not in", values, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("second_distribution between", value1, value2, "secondDistribution"); + return (Criteria) this; + } + + public Criteria andSecondDistributionNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("second_distribution not between", value1, value2, "secondDistribution"); + return (Criteria) this; + } + public Criteria andStatusIsNull() { addCriterion("`status` is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighUser.java b/hai-service/src/main/java/com/hai/entity/HighUser.java index 4703c460..319dc82e 100644 --- a/hai-service/src/main/java/com/hai/entity/HighUser.java +++ b/hai-service/src/main/java/com/hai/entity/HighUser.java @@ -1,7 +1,5 @@ package com.hai.entity; -import com.hai.model.UserModel; - import java.io.Serializable; import java.util.Date; @@ -14,7 +12,7 @@ import java.util.Date; * 代码由工具生成 * **/ -public class HighUser extends UserModel implements Serializable { +public class HighUser implements Serializable { /** * 用户编号 */ @@ -84,6 +82,11 @@ public class HighUser extends UserModel implements Serializable { */ private String unionUnionId; + /** + * 是否代理商 + */ + private Boolean isAgent; + /** * 用户信息完整状态 0:完整 @@ -222,6 +225,14 @@ public class HighUser extends UserModel implements Serializable { this.unionUnionId = unionUnionId; } + public Boolean getIsAgent() { + return isAgent; + } + + public void setIsAgent(Boolean isAgent) { + this.isAgent = isAgent; + } + public Integer getInfoCompleteStatus() { return infoCompleteStatus; } @@ -289,6 +300,7 @@ public class HighUser extends UserModel implements Serializable { && (this.getUnionId() == null ? other.getUnionId() == null : this.getUnionId().equals(other.getUnionId())) && (this.getUnionOpenId() == null ? other.getUnionOpenId() == null : this.getUnionOpenId().equals(other.getUnionOpenId())) && (this.getUnionUnionId() == null ? other.getUnionUnionId() == null : this.getUnionUnionId().equals(other.getUnionUnionId())) + && (this.getIsAgent() == null ? other.getIsAgent() == null : this.getIsAgent().equals(other.getIsAgent())) && (this.getInfoCompleteStatus() == null ? other.getInfoCompleteStatus() == null : this.getInfoCompleteStatus().equals(other.getInfoCompleteStatus())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) @@ -315,6 +327,7 @@ public class HighUser extends UserModel implements Serializable { result = prime * result + ((getUnionId() == null) ? 0 : getUnionId().hashCode()); result = prime * result + ((getUnionOpenId() == null) ? 0 : getUnionOpenId().hashCode()); result = prime * result + ((getUnionUnionId() == null) ? 0 : getUnionUnionId().hashCode()); + result = prime * result + ((getIsAgent() == null) ? 0 : getIsAgent().hashCode()); result = prime * result + ((getInfoCompleteStatus() == null) ? 0 : getInfoCompleteStatus().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); @@ -344,6 +357,7 @@ public class HighUser extends UserModel implements Serializable { sb.append(", unionId=").append(unionId); sb.append(", unionOpenId=").append(unionOpenId); sb.append(", unionUnionId=").append(unionUnionId); + sb.append(", isAgent=").append(isAgent); sb.append(", infoCompleteStatus=").append(infoCompleteStatus); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); @@ -353,4 +367,4 @@ public class HighUser extends UserModel implements Serializable { sb.append("]"); return sb.toString(); } -} +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighUserExample.java b/hai-service/src/main/java/com/hai/entity/HighUserExample.java index 62383012..70498e7c 100644 --- a/hai-service/src/main/java/com/hai/entity/HighUserExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighUserExample.java @@ -1152,6 +1152,66 @@ public class HighUserExample { return (Criteria) this; } + public Criteria andIsAgentIsNull() { + addCriterion("is_agent is null"); + return (Criteria) this; + } + + public Criteria andIsAgentIsNotNull() { + addCriterion("is_agent is not null"); + return (Criteria) this; + } + + public Criteria andIsAgentEqualTo(Boolean value) { + addCriterion("is_agent =", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentNotEqualTo(Boolean value) { + addCriterion("is_agent <>", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentGreaterThan(Boolean value) { + addCriterion("is_agent >", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_agent >=", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentLessThan(Boolean value) { + addCriterion("is_agent <", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentLessThanOrEqualTo(Boolean value) { + addCriterion("is_agent <=", value, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentIn(List values) { + addCriterion("is_agent in", values, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentNotIn(List values) { + addCriterion("is_agent not in", values, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentBetween(Boolean value1, Boolean value2) { + addCriterion("is_agent between", value1, value2, "isAgent"); + return (Criteria) this; + } + + public Criteria andIsAgentNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_agent not between", value1, value2, "isAgent"); + return (Criteria) this; + } + public Criteria andInfoCompleteStatusIsNull() { addCriterion("info_complete_status is null"); return (Criteria) this; 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 4/5] 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; From d5d286f0744c09913be0541960d995bb8228f0f4 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 15 Aug 2022 15:47:41 +0800 Subject: [PATCH 5/5] 1 --- .../hai/dao/BsDistributionRebateMapper.java | 23 ++-- .../dao/BsDistributionRebateSqlProvider.java | 28 ++-- .../com/hai/entity/BsDistributionRebate.java | 32 ++--- .../entity/BsDistributionRebateExample.java | 120 +++++++++--------- 4 files changed, 101 insertions(+), 102 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 fe27b432..b23a592e 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java @@ -39,16 +39,16 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx int deleteByPrimaryKey(Long id); @Insert({ - "insert into bs_distribution_rebate (title, order_no, ", - "agent_id, popularize_user_id, ", - "second_popularize_user_id, user_id, ", + "insert into bs_distribution_rebate (title, `type`, ", + "order_no, agent_id, ", + "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}, ", - "#{secondPopularizeUserId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", + "values (#{title,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, ", + "#{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}, ", @@ -65,10 +65,10 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @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), @@ -83,19 +83,18 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Select({ "select", - "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", + "id, title, `type`, order_no, agent_id, 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}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @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), @@ -120,10 +119,10 @@ public interface BsDistributionRebateMapper extends BsDistributionRebateMapperEx @Update({ "update bs_distribution_rebate", "set title = #{title,jdbcType=VARCHAR},", + "`type` = #{type,jdbcType=INTEGER},", "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 384b9717..df96acf4 100644 --- a/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java @@ -32,6 +32,10 @@ public class BsDistributionRebateSqlProvider { sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); } + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + if (record.getOrderNo() != null) { sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); } @@ -44,10 +48,6 @@ 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}"); } @@ -95,10 +95,10 @@ public class BsDistributionRebateSqlProvider { sql.SELECT("id"); } sql.SELECT("title"); + sql.SELECT("`type`"); 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"); @@ -133,6 +133,10 @@ public class BsDistributionRebateSqlProvider { sql.SET("title = #{record.title,jdbcType=VARCHAR}"); } + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + if (record.getOrderNo() != null) { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); } @@ -145,10 +149,6 @@ 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}"); } @@ -195,10 +195,10 @@ public class BsDistributionRebateSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); 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}"); @@ -222,6 +222,10 @@ public class BsDistributionRebateSqlProvider { sql.SET("title = #{title,jdbcType=VARCHAR}"); } + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + if (record.getOrderNo() != null) { sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); } @@ -234,10 +238,6 @@ 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 66f5bc49..4024cdcd 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java @@ -24,6 +24,11 @@ public class BsDistributionRebate implements Serializable { */ private String title; + /** + * 类型 1:上级推广人 2:顶级推广人 + */ + private Integer type; + /** * 订单号 */ @@ -39,11 +44,6 @@ public class BsDistributionRebate implements Serializable { */ private Long popularizeUserId; - /** - * 二级推广人员 - */ - private Long secondPopularizeUserId; - /** * 人员ID */ @@ -107,6 +107,14 @@ public class BsDistributionRebate implements Serializable { this.title = title; } + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + public String getOrderNo() { return orderNo; } @@ -131,14 +139,6 @@ 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; } @@ -225,10 +225,10 @@ public class BsDistributionRebate implements Serializable { BsDistributionRebate other = (BsDistributionRebate) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (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())) @@ -246,10 +246,10 @@ public class BsDistributionRebate implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); 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()); @@ -270,10 +270,10 @@ public class BsDistributionRebate implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", title=").append(title); + sb.append(", type=").append(type); 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 1cb597e4..40d29d03 100644 --- a/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java +++ b/hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java @@ -256,6 +256,66 @@ public class BsDistributionRebateExample { return (Criteria) this; } + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + public Criteria andOrderNoIsNull() { addCriterion("order_no is null"); return (Criteria) this; @@ -446,66 +506,6 @@ 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;