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/7] 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/7] 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 a6ed9cff81e7d96fde2c5af23561cdd23fa8ec76 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 12 Aug 2022 17:28:10 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/HighGasController.java | 2 +- .../controller/HighMerAmountController.java | 64 +- .../HighMerchantAccountRecordController.java | 95 + .../cweb/controller/HighOrderController.java | 10 +- .../cweb/controller/pay/OrderController.java | 10 +- .../com/hai/config/ShellGroupService.java | 6 +- .../com/hai/dao/HighChildOrderMapper.java | 18 +- .../hai/dao/HighChildOrderSqlProvider.java | 28 + .../hai/dao/HighMerchantAccountMapperExt.java | 2 +- .../HighMerchantAccountMarketingMapper.java | 125 ++ ...HighMerchantAccountMarketingMapperExt.java | 7 + ...ghMerchantAccountMarketingSqlProvider.java | 332 ++++ .../dao/HighMerchantAccountRecordMapper.java | 170 ++ .../HighMerchantAccountRecordMapperExt.java | 7 + .../HighMerchantAccountRecordSqlProvider.java | 486 +++++ .../java/com/hai/entity/HighChildOrder.java | 32 + .../com/hai/entity/HighChildOrderExample.java | 120 ++ .../entity/HighMerchantAccountMarketing.java | 230 +++ .../HighMerchantAccountMarketingExample.java | 984 ++++++++++ .../hai/entity/HighMerchantAccountRecord.java | 406 ++++ .../HighMerchantAccountRecordExample.java | 1664 +++++++++++++++++ .../enum_type/MerAccountMarketingType.java | 36 + .../enum_type/MerAmountSourceTypeEnum.java | 37 + .../com/hai/enum_type/MerAmountTypeEnum.java | 36 + .../HighMerchantAccountMarketingService.java | 34 + .../HighMerchantAccountRecordService.java | 25 + .../service/HighMerchantAccountService.java | 4 +- ...ghMerchantAccountMarketingServiceImpl.java | 59 + .../HighMerchantAccountRecordServiceImpl.java | 52 + .../impl/HighMerchantAccountServiceImpl.java | 81 +- 30 files changed, 5130 insertions(+), 32 deletions(-) create mode 100644 hai-bweb/src/main/java/com/bweb/controller/HighMerchantAccountRecordController.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketing.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketingExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecord.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecordExample.java create mode 100644 hai-service/src/main/java/com/hai/enum_type/MerAccountMarketingType.java create mode 100644 hai-service/src/main/java/com/hai/enum_type/MerAmountSourceTypeEnum.java create mode 100644 hai-service/src/main/java/com/hai/enum_type/MerAmountTypeEnum.java create mode 100644 hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java create mode 100644 hai-service/src/main/java/com/hai/service/HighMerchantAccountRecordService.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountRecordServiceImpl.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index acc0bf4e..5f342889 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -86,7 +86,7 @@ public class HighGasController { BigDecimal account = new BigDecimal("0"); // 查询商户余额 - HighMerchantAccount merchantAccount = merchantAccountService.getStoreAccountDetail(userInfoModel.getMerchant().getId()); + HighMerchantAccount merchantAccount = merchantAccountService.getMerAccountDetail(userInfoModel.getMerchant().getId()); if (merchantAccount != null) { account = merchantAccount.getAmounts(); } diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerAmountController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerAmountController.java index 34a4231a..88e2f516 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerAmountController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerAmountController.java @@ -8,14 +8,12 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighMerchantAccount; import com.hai.entity.HighMerchantStoreAccount; import com.hai.enum_type.MerStoreAmountSourceTypeEnum; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; -import com.hai.service.HighCompanyTwoPwdService; -import com.hai.service.HighMerchantAccountService; -import com.hai.service.HighMerchantStoreAccountRecordService; -import com.hai.service.HighMerchantStoreAccountService; +import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; @@ -39,6 +37,9 @@ public class HighMerAmountController { @Resource private HighMerchantAccountService merchantAccountService; + @Resource + private HighMerchantAccountMarketingService accountMarketingService; + @Resource private UserCenter userCenter; @@ -54,18 +55,30 @@ public class HighMerAmountController { if (userInfoModel.getBsCompany() == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); } - if (body.getLong("merId") == null || body.getBigDecimal("amount") == null) { + if (body.getLong("merId") == null || body.getBigDecimal("amount") == null || body.getBoolean("marketingStatus") == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } if (body.getBigDecimal("amount").compareTo(new BigDecimal("0")) == -1) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "充值金额不能小于0"); } + if (body.getBoolean("marketingStatus").equals(true) + && body.getInteger("marketingType") == null + && body.getBigDecimal("marketingPrice") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + Map map = new HashMap<>(); map.put("sourceType", MerStoreAmountSourceTypeEnum.type1.getType()); map.put("sourceContent", "充值额度:" + body.getBigDecimal("amount") + " 元"); map.put("opUserId", userInfoModel.getSecUser().getId()); map.put("opUserName", userInfoModel.getSecUser().getUserName()); - merchantAccountService.recharge(body.getLong("merId"), body.getBigDecimal("amount"), map); + + Map marketingParam = new HashMap<>(); + marketingParam.put("marketingStatus", body.getBoolean("marketingStatus")); + marketingParam.put("marketingType", body.getInteger("marketingType")); + marketingParam.put("marketingPrice", body.getBigDecimal("marketingPrice")); + marketingParam.put("marketingOilNoData", body.getJSONArray("marketingOilNoData")); + merchantAccountService.recharge(body.getLong("merId"), body.getBigDecimal("amount"), marketingParam, map); return ResponseMsgUtil.success("操作成功"); @@ -79,4 +92,43 @@ public class HighMerAmountController { } } + @RequestMapping(value = "/getMerAccount", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询商户账户") + public ResponseData getMerAccount(@RequestParam(name = "merId", required = true) Long merId) { + try { + + BigDecimal account = new BigDecimal("0"); + // 查询商户余额 + HighMerchantAccount merchantAccount = merchantAccountService.getMerAccountDetail(merId); + if (merchantAccount != null) { + account = merchantAccount.getAmounts(); + } + Map param = new HashMap<>(); + param.put("amount", account.subtract(merchantAccountService.countMerGasOilAmount(merId))); + param.put("oilNoReliefPrice", accountMarketingService.getDetailByMerAndType(merId, 3)); + + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("HighCompanyAmountController --> recharge() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getMerAccountMarketing", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询商户账户营销信息") + public ResponseData getMerAccountMarketing(@RequestParam(name = "merId", required = true) Long merId, + @RequestParam(name = "type", required = true) Integer type) { + try { + + return ResponseMsgUtil.success(accountMarketingService.getDetailByMerAndType(merId, type)); + + } catch (Exception e) { + log.error("HighCompanyAmountController --> getMerAccountMarketing() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantAccountRecordController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantAccountRecordController.java new file mode 100644 index 00000000..357d297b --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantAccountRecordController.java @@ -0,0 +1,95 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighMerchant; +import com.hai.enum_type.MerStoreAmountSourceTypeEnum; +import com.hai.enum_type.UserObjectTypeEnum; +import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; +import com.hai.service.HighMerchantAccountRecordService; +import com.hai.service.HighMerchantService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.dao.DeadlockLoserDataAccessException; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Controller +@RequestMapping(value = "/merAccountRecord") +@Api(value = "商户门店接口") +public class HighMerchantAccountRecordController { + + private static Logger log = LoggerFactory.getLogger(HighMerchantAccountRecordController.class); + + @Resource + private HighMerchantAccountRecordService merchantAccountRecordService; + + @Resource + private HighMerchantService merchantService; + + @Resource + private UserCenter userCenter; + + @RequestMapping(value = "/getRecordList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询记录列表") + public synchronized ResponseData getRecordList(@RequestParam(name = "merId", required = false) Long merId, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + + Map param = new HashMap<>(); + if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { + param.put("merId", merId); + + } else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { + + if (merId == null) { + Map merMap = new HashMap<>(); + merMap.put("companyId", userInfoModel.getBsCompany().getId()); + List merchantList = merchantService.getMerchantList(merMap); + + List merIdList = new ArrayList<>(); + for (HighMerchant merchant : merchantList) { + merIdList.add(merchant.getId()); + } + param.put("merIdList", merIdList); + } else { + param.put("merId", merId); + } + + } else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type2.getType())) { + param.put("merId", userInfoModel.getMerchant().getId()); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOT_AUTHORIZED, ""); + } + param.put("type", 1); + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(merchantAccountRecordService.getRecordList(param))); + + } catch (Exception e) { + log.error("HighCompanyAmountController --> recharge() error!", e); + return ResponseMsgUtil.exception(e); + } + } +} diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index e90bb844..aba846eb 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -71,6 +71,9 @@ public class HighOrderController { @Resource private HighMerchantStoreService highMerchantStoreService; + @Resource + private HighMerchantAccountMarketingService merchantAccountMarketingService; + @Resource private HighCouponCodeService highCouponCodeService; @@ -318,6 +321,9 @@ public class HighOrderController { } } + // 营销减免的金额 + BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), 1, Integer.valueOf(childOrder.getGasOilNo())); + // 计算价格 GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(childOrder.getGoodsPrice(), childOrder.getGoodsId(), childOrder.getGasOilNo(), highOrder.getIsTyAgent()); @@ -336,7 +342,7 @@ public class HighOrderController { childOrder.setGasOilSubsidy(new BigDecimal("0")); childOrder.setGasLitersPreferences(new BigDecimal("0")); childOrder.setGasPricePreferences(priceModel.getPriceGun()); - } else { + } else { // 支付价格 childOrder.setGoodsActualPrice(priceModel.getPayPrice()); // 油价信息 @@ -360,6 +366,8 @@ public class HighOrderController { childOrder.setGoodsImg(store.getStoreLogo()); } + childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); + childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN)); childOrder.setGoodsName(store.getStoreName()); childOrder.setGoodsSpecName("默认"); childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java index 583037c1..a3901fa0 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java @@ -196,7 +196,7 @@ public class OrderController { if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { BigDecimal account = new BigDecimal("0"); // 查询账号余额 - HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId()); + HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId()); if (merAccount != null) { account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId())); } @@ -424,7 +424,7 @@ public class OrderController { || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) { BigDecimal account = new BigDecimal("0"); // 查询账号余额 - HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId()); + HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId()); if (merAccount != null) { account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId())); } @@ -551,7 +551,7 @@ public class OrderController { if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { BigDecimal account = new BigDecimal("0"); // 查询账号余额 - HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId()); + HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId()); if (merAccount != null) { account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId())); } @@ -677,7 +677,7 @@ public class OrderController { if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { BigDecimal account = new BigDecimal("0"); // 查询账号余额 - HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId()); + HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId()); if (merAccount != null) { account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId())); } @@ -783,7 +783,7 @@ public class OrderController { if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { BigDecimal account = new BigDecimal("0"); // 查询账号余额 - HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId()); + HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId()); if (merAccount != null) { account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId())); } diff --git a/hai-service/src/main/java/com/hai/config/ShellGroupService.java b/hai-service/src/main/java/com/hai/config/ShellGroupService.java index 7244a04e..11dc8354 100644 --- a/hai-service/src/main/java/com/hai/config/ShellGroupService.java +++ b/hai-service/src/main/java/com/hai/config/ShellGroupService.java @@ -69,7 +69,7 @@ public class ShellGroupService { * @param oilCode 油品编码 * @param oilGun 油枪 * @param settlementAmount 支付金额 - * @param favourAmount 优惠金额 + * @param channelFavourAmount 优惠金额 * @return */ public JSONObject gasSyncPayment(String orderNo, @@ -79,20 +79,20 @@ public class ShellGroupService { String oilCode, String oilGun, BigDecimal settlementAmount, - BigDecimal favourAmount) { + BigDecimal channelFavourAmount) { try { Map param = new HashMap<>(); param.put("platMerchantId", CommonSysConst.getSysConfig().getShellPlatMerchantId()); param.put("stationCode", stationCode); param.put("orderType", "OIL"); param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); + param.put("channelFavourAmount", channelFavourAmount); Map tradeOilOrder = new HashMap<>(); tradeOilOrder.put("amount", oilPrice); tradeOilOrder.put("code", oilCode); tradeOilOrder.put("oilGun", oilGun); tradeOilOrder.put("channelSettlementAmount", settlementAmount); - tradeOilOrder.put("channelFavourAmount", favourAmount); param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder)); return request(orderNo.replace("HF",""), "gas_sync_payment_notify", param); } catch (Exception e) { diff --git a/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java b/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java index 72349bcd..2f0c68d2 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java @@ -52,6 +52,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "gas_oil_type, gas_order_no, ", "gas_price_platform, gas_price_gun, ", "gas_price_vip, gas_price_official, ", + "gas_price_cost, gas_price_cost_total, ", "gas_price_channel_pay, gas_oil_liters, ", "gas_discount, gas_oil_subsidy, ", "gas_liters_preferences, gas_price_preferences, ", @@ -76,6 +77,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "#{gasOilType,jdbcType=INTEGER}, #{gasOrderNo,jdbcType=VARCHAR}, ", "#{gasPricePlatform,jdbcType=DECIMAL}, #{gasPriceGun,jdbcType=DECIMAL}, ", "#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ", + "#{gasPriceCost,jdbcType=DECIMAL}, #{gasPriceCostTotal,jdbcType=DECIMAL}, ", "#{gasPriceChannelPay,jdbcType=DECIMAL}, #{gasOilLiters,jdbcType=DECIMAL}, ", "#{gasDiscount,jdbcType=DECIMAL}, #{gasOilSubsidy,jdbcType=DECIMAL}, ", "#{gasLitersPreferences,jdbcType=DECIMAL}, #{gasPricePreferences,jdbcType=DECIMAL}, ", @@ -124,6 +126,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_cost_total", property="gasPriceCostTotal", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL), @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL), @@ -156,11 +160,11 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "goods_name, goods_desc, goods_img, goods_spec_name, goods_price, goods_actual_price, ", "sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ", "gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ", - "gas_price_official, gas_price_channel_pay, gas_oil_liters, gas_discount, gas_oil_subsidy, ", - "gas_liters_preferences, gas_price_preferences, gas_class_group_id, gas_class_group_name, ", - "gas_class_group_task_id, gas_staff_id, gas_staff_name, gas_salesman_id, gas_salesman_name, ", - "gas_agent_id, gas_agent_name, gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ", - "ext_4, ext_5, ext_6", + "gas_price_official, gas_price_cost, gas_price_cost_total, gas_price_channel_pay, ", + "gas_oil_liters, gas_discount, gas_oil_subsidy, gas_liters_preferences, gas_price_preferences, ", + "gas_class_group_id, gas_class_group_name, gas_class_group_task_id, gas_staff_id, ", + "gas_staff_name, gas_salesman_id, gas_salesman_name, gas_agent_id, gas_agent_name, ", + "gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", "from high_child_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -192,6 +196,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_cost_total", property="gasPriceCostTotal", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL), @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL), @@ -255,6 +261,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},", "gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},", "gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL},", + "gas_price_cost = #{gasPriceCost,jdbcType=DECIMAL},", + "gas_price_cost_total = #{gasPriceCostTotal,jdbcType=DECIMAL},", "gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL},", "gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL},", "gas_discount = #{gasDiscount,jdbcType=DECIMAL},", diff --git a/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java index 2159353f..cf0c0d2b 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java @@ -132,6 +132,14 @@ public class HighChildOrderSqlProvider { sql.VALUES("gas_price_official", "#{gasPriceOfficial,jdbcType=DECIMAL}"); } + if (record.getGasPriceCost() != null) { + sql.VALUES("gas_price_cost", "#{gasPriceCost,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceCostTotal() != null) { + sql.VALUES("gas_price_cost_total", "#{gasPriceCostTotal,jdbcType=DECIMAL}"); + } + if (record.getGasPriceChannelPay() != null) { sql.VALUES("gas_price_channel_pay", "#{gasPriceChannelPay,jdbcType=DECIMAL}"); } @@ -260,6 +268,8 @@ public class HighChildOrderSqlProvider { sql.SELECT("gas_price_gun"); sql.SELECT("gas_price_vip"); sql.SELECT("gas_price_official"); + sql.SELECT("gas_price_cost"); + sql.SELECT("gas_price_cost_total"); sql.SELECT("gas_price_channel_pay"); sql.SELECT("gas_oil_liters"); sql.SELECT("gas_discount"); @@ -408,6 +418,14 @@ public class HighChildOrderSqlProvider { sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}"); } + if (record.getGasPriceCost() != null) { + sql.SET("gas_price_cost = #{record.gasPriceCost,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceCostTotal() != null) { + sql.SET("gas_price_cost_total = #{record.gasPriceCostTotal,jdbcType=DECIMAL}"); + } + if (record.getGasPriceChannelPay() != null) { sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}"); } @@ -535,6 +553,8 @@ public class HighChildOrderSqlProvider { sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}"); sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}"); sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}"); + sql.SET("gas_price_cost = #{record.gasPriceCost,jdbcType=DECIMAL}"); + sql.SET("gas_price_cost_total = #{record.gasPriceCostTotal,jdbcType=DECIMAL}"); sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}"); sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}"); sql.SET("gas_discount = #{record.gasDiscount,jdbcType=DECIMAL}"); @@ -672,6 +692,14 @@ public class HighChildOrderSqlProvider { sql.SET("gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL}"); } + if (record.getGasPriceCost() != null) { + sql.SET("gas_price_cost = #{gasPriceCost,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceCostTotal() != null) { + sql.SET("gas_price_cost_total = #{gasPriceCostTotal,jdbcType=DECIMAL}"); + } + if (record.getGasPriceChannelPay() != null) { sql.SET("gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java index 5eda9554..a805c217 100644 --- a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java @@ -14,7 +14,7 @@ public interface HighMerchantAccountMapperExt { @Select({"select " + - " case when sum(b.total_price) is not null then sum(b.total_price) ELSE 0 end " + + " case when sum(a.gas_price_cost_total) is not null then sum(a.gas_price_cost_total) ELSE 0 end " + " from high_child_order a, high_order b" + " where goods_type = 3 " + " and a.order_id = b.id" + diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapper.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapper.java new file mode 100644 index 00000000..e140161b --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapper.java @@ -0,0 +1,125 @@ +package com.hai.dao; + +import com.hai.entity.HighMerchantAccountMarketing; +import com.hai.entity.HighMerchantAccountMarketingExample; +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 HighMerchantAccountMarketingMapper extends HighMerchantAccountMarketingMapperExt { + @SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="countByExample") + long countByExample(HighMerchantAccountMarketingExample example); + + @DeleteProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="deleteByExample") + int deleteByExample(HighMerchantAccountMarketingExample example); + + @Delete({ + "delete from high_merchant_account_marketing", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_merchant_account_marketing (`type`, mer_id, ", + "mer_account_id, price, ", + "oil_no_relief_price, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{type,jdbcType=INTEGER}, #{merId,jdbcType=BIGINT}, ", + "#{merAccountId,jdbcType=BIGINT}, #{price,jdbcType=DECIMAL}, ", + "#{oilNoReliefPrice,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighMerchantAccountMarketing record); + + @InsertProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighMerchantAccountMarketing record); + + @SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT), + @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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(HighMerchantAccountMarketingExample example); + + @Select({ + "select", + "id, `type`, mer_id, mer_account_id, price, oil_no_relief_price, `status`, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from high_merchant_account_marketing", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT), + @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + HighMerchantAccountMarketing selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example); + + @UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example); + + @UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighMerchantAccountMarketing record); + + @Update({ + "update high_merchant_account_marketing", + "set `type` = #{type,jdbcType=INTEGER},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_account_id = #{merAccountId,jdbcType=BIGINT},", + "price = #{price,jdbcType=DECIMAL},", + "oil_no_relief_price = #{oilNoReliefPrice,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighMerchantAccountMarketing record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapperExt.java new file mode 100644 index 00000000..fac6b080 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighMerchantAccountMarketingMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingSqlProvider.java new file mode 100644 index 00000000..80df0b56 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingSqlProvider.java @@ -0,0 +1,332 @@ +package com.hai.dao; + +import com.hai.entity.HighMerchantAccountMarketing; +import com.hai.entity.HighMerchantAccountMarketingExample.Criteria; +import com.hai.entity.HighMerchantAccountMarketingExample.Criterion; +import com.hai.entity.HighMerchantAccountMarketingExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighMerchantAccountMarketingSqlProvider { + + public String countByExample(HighMerchantAccountMarketingExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_merchant_account_marketing"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighMerchantAccountMarketingExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_merchant_account_marketing"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighMerchantAccountMarketing record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_merchant_account_marketing"); + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerAccountId() != null) { + sql.VALUES("mer_account_id", "#{merAccountId,jdbcType=BIGINT}"); + } + + if (record.getPrice() != null) { + sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); + } + + if (record.getOilNoReliefPrice() != null) { + sql.VALUES("oil_no_relief_price", "#{oilNoReliefPrice,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + 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(HighMerchantAccountMarketingExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("`type`"); + sql.SELECT("mer_id"); + sql.SELECT("mer_account_id"); + sql.SELECT("price"); + sql.SELECT("oil_no_relief_price"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_merchant_account_marketing"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighMerchantAccountMarketing record = (HighMerchantAccountMarketing) parameter.get("record"); + HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_merchant_account_marketing"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerAccountId() != null) { + sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}"); + } + + if (record.getPrice() != null) { + sql.SET("price = #{record.price,jdbcType=DECIMAL}"); + } + + if (record.getOilNoReliefPrice() != null) { + sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + 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.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("high_merchant_account_marketing"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}"); + sql.SET("price = #{record.price,jdbcType=DECIMAL}"); + sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighMerchantAccountMarketing record) { + SQL sql = new SQL(); + sql.UPDATE("high_merchant_account_marketing"); + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerAccountId() != null) { + sql.SET("mer_account_id = #{merAccountId,jdbcType=BIGINT}"); + } + + if (record.getPrice() != null) { + sql.SET("price = #{price,jdbcType=DECIMAL}"); + } + + if (record.getOilNoReliefPrice() != null) { + sql.SET("oil_no_relief_price = #{oilNoReliefPrice,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + 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, HighMerchantAccountMarketingExample 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/HighMerchantAccountRecordMapper.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapper.java new file mode 100644 index 00000000..bdb65464 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapper.java @@ -0,0 +1,170 @@ +package com.hai.dao; + +import com.hai.entity.HighMerchantAccountRecord; +import com.hai.entity.HighMerchantAccountRecordExample; +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 HighMerchantAccountRecordMapper extends HighMerchantAccountRecordMapperExt { + @SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="countByExample") + long countByExample(HighMerchantAccountRecordExample example); + + @DeleteProvider(type=HighMerchantAccountRecordSqlProvider.class, method="deleteByExample") + int deleteByExample(HighMerchantAccountRecordExample example); + + @Delete({ + "delete from high_merchant_account_record", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_merchant_account_record (mer_amount_id, mer_id, ", + "mer_name, `type`, amount, ", + "marketing_status, marketing_type, ", + "marketing_price, marketing_trade_price, ", + "trade_price, before_amount, ", + "after_amount, source_type, ", + "source_id, source_content, ", + "`status`, create_time, ", + "op_user_id, op_user_name, ", + "ext_1, ext_2, ext_3)", + "values (#{merAmountId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ", + "#{merName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, ", + "#{marketingStatus,jdbcType=BIT}, #{marketingType,jdbcType=INTEGER}, ", + "#{marketingPrice,jdbcType=DECIMAL}, #{marketingTradePrice,jdbcType=DECIMAL}, ", + "#{tradePrice,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ", + "#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ", + "#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighMerchantAccountRecord record); + + @InsertProvider(type=HighMerchantAccountRecordSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighMerchantAccountRecord record); + + @SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT), + @Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER), + @Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), + @Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), + @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(HighMerchantAccountRecordExample example); + + @Select({ + "select", + "id, mer_amount_id, mer_id, mer_name, `type`, amount, marketing_status, marketing_type, ", + "marketing_price, marketing_trade_price, trade_price, before_amount, after_amount, ", + "source_type, source_id, source_content, `status`, create_time, op_user_id, op_user_name, ", + "ext_1, ext_2, ext_3", + "from high_merchant_account_record", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT), + @Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER), + @Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), + @Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), + @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) + }) + HighMerchantAccountRecord selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example); + + @UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example); + + @UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighMerchantAccountRecord record); + + @Update({ + "update high_merchant_account_record", + "set mer_amount_id = #{merAmountId,jdbcType=BIGINT},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "`type` = #{type,jdbcType=INTEGER},", + "amount = #{amount,jdbcType=DECIMAL},", + "marketing_status = #{marketingStatus,jdbcType=BIT},", + "marketing_type = #{marketingType,jdbcType=INTEGER},", + "marketing_price = #{marketingPrice,jdbcType=DECIMAL},", + "marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL},", + "trade_price = #{tradePrice,jdbcType=DECIMAL},", + "before_amount = #{beforeAmount,jdbcType=DECIMAL},", + "after_amount = #{afterAmount,jdbcType=DECIMAL},", + "source_type = #{sourceType,jdbcType=INTEGER},", + "source_id = #{sourceId,jdbcType=BIGINT},", + "source_content = #{sourceContent,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighMerchantAccountRecord record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapperExt.java new file mode 100644 index 00000000..8429ba66 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighMerchantAccountRecordMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordSqlProvider.java new file mode 100644 index 00000000..4cfba3c5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordSqlProvider.java @@ -0,0 +1,486 @@ +package com.hai.dao; + +import com.hai.entity.HighMerchantAccountRecord; +import com.hai.entity.HighMerchantAccountRecordExample.Criteria; +import com.hai.entity.HighMerchantAccountRecordExample.Criterion; +import com.hai.entity.HighMerchantAccountRecordExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighMerchantAccountRecordSqlProvider { + + public String countByExample(HighMerchantAccountRecordExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_merchant_account_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighMerchantAccountRecordExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_merchant_account_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighMerchantAccountRecord record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_merchant_account_record"); + + if (record.getMerAmountId() != null) { + sql.VALUES("mer_amount_id", "#{merAmountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getAmount() != null) { + sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); + } + + if (record.getMarketingStatus() != null) { + sql.VALUES("marketing_status", "#{marketingStatus,jdbcType=BIT}"); + } + + if (record.getMarketingType() != null) { + sql.VALUES("marketing_type", "#{marketingType,jdbcType=INTEGER}"); + } + + if (record.getMarketingPrice() != null) { + sql.VALUES("marketing_price", "#{marketingPrice,jdbcType=DECIMAL}"); + } + + if (record.getMarketingTradePrice() != null) { + sql.VALUES("marketing_trade_price", "#{marketingTradePrice,jdbcType=DECIMAL}"); + } + + if (record.getTradePrice() != null) { + sql.VALUES("trade_price", "#{tradePrice,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceContent() != null) { + sql.VALUES("source_content", "#{sourceContent,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,jdbcType=VARCHAR}"); + } + + 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(HighMerchantAccountRecordExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_amount_id"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("`type`"); + sql.SELECT("amount"); + sql.SELECT("marketing_status"); + sql.SELECT("marketing_type"); + sql.SELECT("marketing_price"); + sql.SELECT("marketing_trade_price"); + sql.SELECT("trade_price"); + sql.SELECT("before_amount"); + sql.SELECT("after_amount"); + sql.SELECT("source_type"); + sql.SELECT("source_id"); + sql.SELECT("source_content"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_merchant_account_record"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighMerchantAccountRecord record = (HighMerchantAccountRecord) parameter.get("record"); + HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_merchant_account_record"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerAmountId() != null) { + sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + } + + if (record.getMarketingStatus() != null) { + sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}"); + } + + if (record.getMarketingType() != null) { + sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}"); + } + + if (record.getMarketingPrice() != null) { + sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}"); + } + + if (record.getMarketingTradePrice() != null) { + sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}"); + } + + if (record.getTradePrice() != null) { + sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceContent() != null) { + sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpUserId() != null) { + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); + } + + 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("high_merchant_account_record"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}"); + sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}"); + sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}"); + sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}"); + sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}"); + sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); + sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); + sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighMerchantAccountRecord record) { + SQL sql = new SQL(); + sql.UPDATE("high_merchant_account_record"); + + if (record.getMerAmountId() != null) { + sql.SET("mer_amount_id = #{merAmountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{amount,jdbcType=DECIMAL}"); + } + + if (record.getMarketingStatus() != null) { + sql.SET("marketing_status = #{marketingStatus,jdbcType=BIT}"); + } + + if (record.getMarketingType() != null) { + sql.SET("marketing_type = #{marketingType,jdbcType=INTEGER}"); + } + + if (record.getMarketingPrice() != null) { + sql.SET("marketing_price = #{marketingPrice,jdbcType=DECIMAL}"); + } + + if (record.getMarketingTradePrice() != null) { + sql.SET("marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL}"); + } + + if (record.getTradePrice() != null) { + sql.SET("trade_price = #{tradePrice,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceContent() != null) { + sql.SET("source_content = #{sourceContent,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,jdbcType=VARCHAR}"); + } + + 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, HighMerchantAccountRecordExample 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/HighChildOrder.java b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java index 9ed597a1..0d6c074b 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java @@ -148,6 +148,16 @@ public class HighChildOrder implements Serializable { */ private BigDecimal gasPriceOfficial; + /** + * 【加油站】成本单价 + */ + private BigDecimal gasPriceCost; + + /** + * 【加油站】成本总价 + */ + private BigDecimal gasPriceCostTotal; + /** * 【加油站】渠道支付金额 */ @@ -463,6 +473,22 @@ public class HighChildOrder implements Serializable { this.gasPriceOfficial = gasPriceOfficial; } + public BigDecimal getGasPriceCost() { + return gasPriceCost; + } + + public void setGasPriceCost(BigDecimal gasPriceCost) { + this.gasPriceCost = gasPriceCost; + } + + public BigDecimal getGasPriceCostTotal() { + return gasPriceCostTotal; + } + + public void setGasPriceCostTotal(BigDecimal gasPriceCostTotal) { + this.gasPriceCostTotal = gasPriceCostTotal; + } + public BigDecimal getGasPriceChannelPay() { return gasPriceChannelPay; } @@ -686,6 +712,8 @@ public class HighChildOrder implements Serializable { && (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun())) && (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip())) && (this.getGasPriceOfficial() == null ? other.getGasPriceOfficial() == null : this.getGasPriceOfficial().equals(other.getGasPriceOfficial())) + && (this.getGasPriceCost() == null ? other.getGasPriceCost() == null : this.getGasPriceCost().equals(other.getGasPriceCost())) + && (this.getGasPriceCostTotal() == null ? other.getGasPriceCostTotal() == null : this.getGasPriceCostTotal().equals(other.getGasPriceCostTotal())) && (this.getGasPriceChannelPay() == null ? other.getGasPriceChannelPay() == null : this.getGasPriceChannelPay().equals(other.getGasPriceChannelPay())) && (this.getGasOilLiters() == null ? other.getGasOilLiters() == null : this.getGasOilLiters().equals(other.getGasOilLiters())) && (this.getGasDiscount() == null ? other.getGasDiscount() == null : this.getGasDiscount().equals(other.getGasDiscount())) @@ -742,6 +770,8 @@ public class HighChildOrder implements Serializable { result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode()); result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode()); result = prime * result + ((getGasPriceOfficial() == null) ? 0 : getGasPriceOfficial().hashCode()); + result = prime * result + ((getGasPriceCost() == null) ? 0 : getGasPriceCost().hashCode()); + result = prime * result + ((getGasPriceCostTotal() == null) ? 0 : getGasPriceCostTotal().hashCode()); result = prime * result + ((getGasPriceChannelPay() == null) ? 0 : getGasPriceChannelPay().hashCode()); result = prime * result + ((getGasOilLiters() == null) ? 0 : getGasOilLiters().hashCode()); result = prime * result + ((getGasDiscount() == null) ? 0 : getGasDiscount().hashCode()); @@ -801,6 +831,8 @@ public class HighChildOrder implements Serializable { sb.append(", gasPriceGun=").append(gasPriceGun); sb.append(", gasPriceVip=").append(gasPriceVip); sb.append(", gasPriceOfficial=").append(gasPriceOfficial); + sb.append(", gasPriceCost=").append(gasPriceCost); + sb.append(", gasPriceCostTotal=").append(gasPriceCostTotal); sb.append(", gasPriceChannelPay=").append(gasPriceChannelPay); sb.append(", gasOilLiters=").append(gasOilLiters); sb.append(", gasDiscount=").append(gasDiscount); diff --git a/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java b/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java index 124e94bf..994e49f2 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java @@ -1835,6 +1835,126 @@ public class HighChildOrderExample { return (Criteria) this; } + public Criteria andGasPriceCostIsNull() { + addCriterion("gas_price_cost is null"); + return (Criteria) this; + } + + public Criteria andGasPriceCostIsNotNull() { + addCriterion("gas_price_cost is not null"); + return (Criteria) this; + } + + public Criteria andGasPriceCostEqualTo(BigDecimal value) { + addCriterion("gas_price_cost =", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostNotEqualTo(BigDecimal value) { + addCriterion("gas_price_cost <>", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostGreaterThan(BigDecimal value) { + addCriterion("gas_price_cost >", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_cost >=", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostLessThan(BigDecimal value) { + addCriterion("gas_price_cost <", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostLessThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_cost <=", value, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostIn(List values) { + addCriterion("gas_price_cost in", values, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostNotIn(List values) { + addCriterion("gas_price_cost not in", values, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_cost between", value1, value2, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_cost not between", value1, value2, "gasPriceCost"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalIsNull() { + addCriterion("gas_price_cost_total is null"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalIsNotNull() { + addCriterion("gas_price_cost_total is not null"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalEqualTo(BigDecimal value) { + addCriterion("gas_price_cost_total =", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalNotEqualTo(BigDecimal value) { + addCriterion("gas_price_cost_total <>", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalGreaterThan(BigDecimal value) { + addCriterion("gas_price_cost_total >", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_cost_total >=", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalLessThan(BigDecimal value) { + addCriterion("gas_price_cost_total <", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalLessThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_cost_total <=", value, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalIn(List values) { + addCriterion("gas_price_cost_total in", values, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalNotIn(List values) { + addCriterion("gas_price_cost_total not in", values, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_cost_total between", value1, value2, "gasPriceCostTotal"); + return (Criteria) this; + } + + public Criteria andGasPriceCostTotalNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_cost_total not between", value1, value2, "gasPriceCostTotal"); + return (Criteria) this; + } + public Criteria andGasPriceChannelPayIsNull() { addCriterion("gas_price_channel_pay is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketing.java b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketing.java new file mode 100644 index 00000000..ce70bf7e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketing.java @@ -0,0 +1,230 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * high_merchant_account_marketing + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighMerchantAccountMarketing implements Serializable { + private Long id; + + /** + * 类型 1. 充值赠送 2. 充值返点 3. 加油减免 + */ + private Integer type; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户账户id + */ + private Long merAccountId; + + /** + * 金额 类型为 1,2才会使用此字段 + */ + private BigDecimal price; + + /** + * 油品金额减免,JSON数据。类型为3才会使用此字段 + */ + private String oilNoReliefPrice; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public Long getMerAccountId() { + return merAccountId; + } + + public void setMerAccountId(Long merAccountId) { + this.merAccountId = merAccountId; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public String getOilNoReliefPrice() { + return oilNoReliefPrice; + } + + public void setOilNoReliefPrice(String oilNoReliefPrice) { + this.oilNoReliefPrice = oilNoReliefPrice; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + 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 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; + } + HighMerchantAccountMarketing other = (HighMerchantAccountMarketing) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerAccountId() == null ? other.getMerAccountId() == null : this.getMerAccountId().equals(other.getMerAccountId())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getOilNoReliefPrice() == null ? other.getOilNoReliefPrice() == null : this.getOilNoReliefPrice().equals(other.getOilNoReliefPrice())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerAccountId() == null) ? 0 : getMerAccountId().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getOilNoReliefPrice() == null) ? 0 : getOilNoReliefPrice().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", type=").append(type); + sb.append(", merId=").append(merId); + sb.append(", merAccountId=").append(merAccountId); + sb.append(", price=").append(price); + sb.append(", oilNoReliefPrice=").append(oilNoReliefPrice); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketingExample.java b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketingExample.java new file mode 100644 index 00000000..ff3ce2ef --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketingExample.java @@ -0,0 +1,984 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighMerchantAccountMarketingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighMerchantAccountMarketingExample() { + 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 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 andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdIsNull() { + addCriterion("mer_account_id is null"); + return (Criteria) this; + } + + public Criteria andMerAccountIdIsNotNull() { + addCriterion("mer_account_id is not null"); + return (Criteria) this; + } + + public Criteria andMerAccountIdEqualTo(Long value) { + addCriterion("mer_account_id =", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdNotEqualTo(Long value) { + addCriterion("mer_account_id <>", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdGreaterThan(Long value) { + addCriterion("mer_account_id >", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_account_id >=", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdLessThan(Long value) { + addCriterion("mer_account_id <", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdLessThanOrEqualTo(Long value) { + addCriterion("mer_account_id <=", value, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdIn(List values) { + addCriterion("mer_account_id in", values, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdNotIn(List values) { + addCriterion("mer_account_id not in", values, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdBetween(Long value1, Long value2) { + addCriterion("mer_account_id between", value1, value2, "merAccountId"); + return (Criteria) this; + } + + public Criteria andMerAccountIdNotBetween(Long value1, Long value2) { + addCriterion("mer_account_id not between", value1, value2, "merAccountId"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(BigDecimal value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(BigDecimal value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(BigDecimal value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(BigDecimal value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceIsNull() { + addCriterion("oil_no_relief_price is null"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceIsNotNull() { + addCriterion("oil_no_relief_price is not null"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceEqualTo(String value) { + addCriterion("oil_no_relief_price =", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceNotEqualTo(String value) { + addCriterion("oil_no_relief_price <>", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceGreaterThan(String value) { + addCriterion("oil_no_relief_price >", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceGreaterThanOrEqualTo(String value) { + addCriterion("oil_no_relief_price >=", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceLessThan(String value) { + addCriterion("oil_no_relief_price <", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceLessThanOrEqualTo(String value) { + addCriterion("oil_no_relief_price <=", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceLike(String value) { + addCriterion("oil_no_relief_price like", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceNotLike(String value) { + addCriterion("oil_no_relief_price not like", value, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceIn(List values) { + addCriterion("oil_no_relief_price in", values, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceNotIn(List values) { + addCriterion("oil_no_relief_price not in", values, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceBetween(String value1, String value2) { + addCriterion("oil_no_relief_price between", value1, value2, "oilNoReliefPrice"); + return (Criteria) this; + } + + public Criteria andOilNoReliefPriceNotBetween(String value1, String value2) { + addCriterion("oil_no_relief_price not between", value1, value2, "oilNoReliefPrice"); + 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 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 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/HighMerchantAccountRecord.java b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecord.java new file mode 100644 index 00000000..a3c2fcb1 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecord.java @@ -0,0 +1,406 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * high_merchant_account_record + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighMerchantAccountRecord implements Serializable { + private Long id; + + /** + * 商户账户表id + */ + private Long merAmountId; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 类型 1:进账 2:出账 + */ + private Integer type; + + /** + * 账户金额 + */ + private BigDecimal amount; + + /** + * 参与营销 0:否 1:是 + */ + private Boolean marketingStatus; + + /** + * 营销类型 1:赠送金额 2:充值返点 + */ + private Integer marketingType; + + /** + * 营销金额 + */ + private BigDecimal marketingPrice; + + /** + * 营销交易金额 + */ + private BigDecimal marketingTradePrice; + + /** + * 交易金额 + */ + private BigDecimal tradePrice; + + /** + * 变更前金额 + */ + private BigDecimal beforeAmount; + + /** + * 变更后金额 + */ + private BigDecimal afterAmount; + + /** + * 来源类型 1.金额充值 2. 订单消费 3.订单退款 + */ + private Integer sourceType; + + /** + * 来源id + */ + private Long sourceId; + + /** + * 来源内容 + */ + private String sourceContent; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerAmountId() { + return merAmountId; + } + + public void setMerAmountId(Long merAmountId) { + this.merAmountId = merAmountId; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public Boolean getMarketingStatus() { + return marketingStatus; + } + + public void setMarketingStatus(Boolean marketingStatus) { + this.marketingStatus = marketingStatus; + } + + public Integer getMarketingType() { + return marketingType; + } + + public void setMarketingType(Integer marketingType) { + this.marketingType = marketingType; + } + + public BigDecimal getMarketingPrice() { + return marketingPrice; + } + + public void setMarketingPrice(BigDecimal marketingPrice) { + this.marketingPrice = marketingPrice; + } + + public BigDecimal getMarketingTradePrice() { + return marketingTradePrice; + } + + public void setMarketingTradePrice(BigDecimal marketingTradePrice) { + this.marketingTradePrice = marketingTradePrice; + } + + public BigDecimal getTradePrice() { + return tradePrice; + } + + public void setTradePrice(BigDecimal tradePrice) { + this.tradePrice = tradePrice; + } + + public BigDecimal getBeforeAmount() { + return beforeAmount; + } + + public void setBeforeAmount(BigDecimal beforeAmount) { + this.beforeAmount = beforeAmount; + } + + public BigDecimal getAfterAmount() { + return afterAmount; + } + + public void setAfterAmount(BigDecimal afterAmount) { + this.afterAmount = afterAmount; + } + + public Integer getSourceType() { + return sourceType; + } + + public void setSourceType(Integer sourceType) { + this.sourceType = sourceType; + } + + public Long getSourceId() { + return sourceId; + } + + public void setSourceId(Long sourceId) { + this.sourceId = sourceId; + } + + public String getSourceContent() { + return sourceContent; + } + + public void setSourceContent(String sourceContent) { + this.sourceContent = sourceContent; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Long getOpUserId() { + return opUserId; + } + + public void setOpUserId(Long opUserId) { + this.opUserId = opUserId; + } + + public String getOpUserName() { + return opUserName; + } + + public void setOpUserName(String opUserName) { + this.opUserName = opUserName; + } + + 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; + } + HighMerchantAccountRecord other = (HighMerchantAccountRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerAmountId() == null ? other.getMerAmountId() == null : this.getMerAmountId().equals(other.getMerAmountId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getMarketingStatus() == null ? other.getMarketingStatus() == null : this.getMarketingStatus().equals(other.getMarketingStatus())) + && (this.getMarketingType() == null ? other.getMarketingType() == null : this.getMarketingType().equals(other.getMarketingType())) + && (this.getMarketingPrice() == null ? other.getMarketingPrice() == null : this.getMarketingPrice().equals(other.getMarketingPrice())) + && (this.getMarketingTradePrice() == null ? other.getMarketingTradePrice() == null : this.getMarketingTradePrice().equals(other.getMarketingTradePrice())) + && (this.getTradePrice() == null ? other.getTradePrice() == null : this.getTradePrice().equals(other.getTradePrice())) + && (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) + && (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount())) + && (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) + && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) + && (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getMerAmountId() == null) ? 0 : getMerAmountId().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getMarketingStatus() == null) ? 0 : getMarketingStatus().hashCode()); + result = prime * result + ((getMarketingType() == null) ? 0 : getMarketingType().hashCode()); + result = prime * result + ((getMarketingPrice() == null) ? 0 : getMarketingPrice().hashCode()); + result = prime * result + ((getMarketingTradePrice() == null) ? 0 : getMarketingTradePrice().hashCode()); + result = prime * result + ((getTradePrice() == null) ? 0 : getTradePrice().hashCode()); + result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); + result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode()); + result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); + result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); + result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", merAmountId=").append(merAmountId); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", type=").append(type); + sb.append(", amount=").append(amount); + sb.append(", marketingStatus=").append(marketingStatus); + sb.append(", marketingType=").append(marketingType); + sb.append(", marketingPrice=").append(marketingPrice); + sb.append(", marketingTradePrice=").append(marketingTradePrice); + sb.append(", tradePrice=").append(tradePrice); + sb.append(", beforeAmount=").append(beforeAmount); + sb.append(", afterAmount=").append(afterAmount); + sb.append(", sourceType=").append(sourceType); + sb.append(", sourceId=").append(sourceId); + sb.append(", sourceContent=").append(sourceContent); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/HighMerchantAccountRecordExample.java b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecordExample.java new file mode 100644 index 00000000..756b3202 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecordExample.java @@ -0,0 +1,1664 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighMerchantAccountRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighMerchantAccountRecordExample() { + 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 andMerAmountIdIsNull() { + addCriterion("mer_amount_id is null"); + return (Criteria) this; + } + + public Criteria andMerAmountIdIsNotNull() { + addCriterion("mer_amount_id is not null"); + return (Criteria) this; + } + + public Criteria andMerAmountIdEqualTo(Long value) { + addCriterion("mer_amount_id =", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdNotEqualTo(Long value) { + addCriterion("mer_amount_id <>", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdGreaterThan(Long value) { + addCriterion("mer_amount_id >", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_amount_id >=", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdLessThan(Long value) { + addCriterion("mer_amount_id <", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdLessThanOrEqualTo(Long value) { + addCriterion("mer_amount_id <=", value, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdIn(List values) { + addCriterion("mer_amount_id in", values, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdNotIn(List values) { + addCriterion("mer_amount_id not in", values, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdBetween(Long value1, Long value2) { + addCriterion("mer_amount_id between", value1, value2, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerAmountIdNotBetween(Long value1, Long value2) { + addCriterion("mer_amount_id not between", value1, value2, "merAmountId"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + 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 andAmountIsNull() { + addCriterion("amount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("amount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(BigDecimal value) { + addCriterion("amount =", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(BigDecimal value) { + addCriterion("amount <>", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(BigDecimal value) { + addCriterion("amount >", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("amount >=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(BigDecimal value) { + addCriterion("amount <", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("amount <=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("amount in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("amount not in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount not between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andMarketingStatusIsNull() { + addCriterion("marketing_status is null"); + return (Criteria) this; + } + + public Criteria andMarketingStatusIsNotNull() { + addCriterion("marketing_status is not null"); + return (Criteria) this; + } + + public Criteria andMarketingStatusEqualTo(Boolean value) { + addCriterion("marketing_status =", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusNotEqualTo(Boolean value) { + addCriterion("marketing_status <>", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusGreaterThan(Boolean value) { + addCriterion("marketing_status >", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusGreaterThanOrEqualTo(Boolean value) { + addCriterion("marketing_status >=", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusLessThan(Boolean value) { + addCriterion("marketing_status <", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusLessThanOrEqualTo(Boolean value) { + addCriterion("marketing_status <=", value, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusIn(List values) { + addCriterion("marketing_status in", values, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusNotIn(List values) { + addCriterion("marketing_status not in", values, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusBetween(Boolean value1, Boolean value2) { + addCriterion("marketing_status between", value1, value2, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingStatusNotBetween(Boolean value1, Boolean value2) { + addCriterion("marketing_status not between", value1, value2, "marketingStatus"); + return (Criteria) this; + } + + public Criteria andMarketingTypeIsNull() { + addCriterion("marketing_type is null"); + return (Criteria) this; + } + + public Criteria andMarketingTypeIsNotNull() { + addCriterion("marketing_type is not null"); + return (Criteria) this; + } + + public Criteria andMarketingTypeEqualTo(Integer value) { + addCriterion("marketing_type =", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeNotEqualTo(Integer value) { + addCriterion("marketing_type <>", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeGreaterThan(Integer value) { + addCriterion("marketing_type >", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("marketing_type >=", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeLessThan(Integer value) { + addCriterion("marketing_type <", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeLessThanOrEqualTo(Integer value) { + addCriterion("marketing_type <=", value, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeIn(List values) { + addCriterion("marketing_type in", values, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeNotIn(List values) { + addCriterion("marketing_type not in", values, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeBetween(Integer value1, Integer value2) { + addCriterion("marketing_type between", value1, value2, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingTypeNotBetween(Integer value1, Integer value2) { + addCriterion("marketing_type not between", value1, value2, "marketingType"); + return (Criteria) this; + } + + public Criteria andMarketingPriceIsNull() { + addCriterion("marketing_price is null"); + return (Criteria) this; + } + + public Criteria andMarketingPriceIsNotNull() { + addCriterion("marketing_price is not null"); + return (Criteria) this; + } + + public Criteria andMarketingPriceEqualTo(BigDecimal value) { + addCriterion("marketing_price =", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceNotEqualTo(BigDecimal value) { + addCriterion("marketing_price <>", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceGreaterThan(BigDecimal value) { + addCriterion("marketing_price >", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("marketing_price >=", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceLessThan(BigDecimal value) { + addCriterion("marketing_price <", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("marketing_price <=", value, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceIn(List values) { + addCriterion("marketing_price in", values, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceNotIn(List values) { + addCriterion("marketing_price not in", values, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("marketing_price between", value1, value2, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("marketing_price not between", value1, value2, "marketingPrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceIsNull() { + addCriterion("marketing_trade_price is null"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceIsNotNull() { + addCriterion("marketing_trade_price is not null"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceEqualTo(BigDecimal value) { + addCriterion("marketing_trade_price =", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceNotEqualTo(BigDecimal value) { + addCriterion("marketing_trade_price <>", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceGreaterThan(BigDecimal value) { + addCriterion("marketing_trade_price >", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("marketing_trade_price >=", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceLessThan(BigDecimal value) { + addCriterion("marketing_trade_price <", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("marketing_trade_price <=", value, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceIn(List values) { + addCriterion("marketing_trade_price in", values, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceNotIn(List values) { + addCriterion("marketing_trade_price not in", values, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("marketing_trade_price between", value1, value2, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andMarketingTradePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("marketing_trade_price not between", value1, value2, "marketingTradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceIsNull() { + addCriterion("trade_price is null"); + return (Criteria) this; + } + + public Criteria andTradePriceIsNotNull() { + addCriterion("trade_price is not null"); + return (Criteria) this; + } + + public Criteria andTradePriceEqualTo(BigDecimal value) { + addCriterion("trade_price =", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceNotEqualTo(BigDecimal value) { + addCriterion("trade_price <>", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceGreaterThan(BigDecimal value) { + addCriterion("trade_price >", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("trade_price >=", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceLessThan(BigDecimal value) { + addCriterion("trade_price <", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("trade_price <=", value, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceIn(List values) { + addCriterion("trade_price in", values, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceNotIn(List values) { + addCriterion("trade_price not in", values, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_price between", value1, value2, "tradePrice"); + return (Criteria) this; + } + + public Criteria andTradePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_price not between", value1, value2, "tradePrice"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIsNull() { + addCriterion("before_amount is null"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIsNotNull() { + addCriterion("before_amount is not null"); + return (Criteria) this; + } + + public Criteria andBeforeAmountEqualTo(BigDecimal value) { + addCriterion("before_amount =", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotEqualTo(BigDecimal value) { + addCriterion("before_amount <>", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountGreaterThan(BigDecimal value) { + addCriterion("before_amount >", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("before_amount >=", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountLessThan(BigDecimal value) { + addCriterion("before_amount <", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("before_amount <=", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIn(List values) { + addCriterion("before_amount in", values, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotIn(List values) { + addCriterion("before_amount not in", values, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("before_amount between", value1, value2, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("before_amount not between", value1, value2, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountIsNull() { + addCriterion("after_amount is null"); + return (Criteria) this; + } + + public Criteria andAfterAmountIsNotNull() { + addCriterion("after_amount is not null"); + return (Criteria) this; + } + + public Criteria andAfterAmountEqualTo(BigDecimal value) { + addCriterion("after_amount =", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotEqualTo(BigDecimal value) { + addCriterion("after_amount <>", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountGreaterThan(BigDecimal value) { + addCriterion("after_amount >", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("after_amount >=", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountLessThan(BigDecimal value) { + addCriterion("after_amount <", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("after_amount <=", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountIn(List values) { + addCriterion("after_amount in", values, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotIn(List values) { + addCriterion("after_amount not in", values, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("after_amount between", value1, value2, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("after_amount not between", value1, value2, "afterAmount"); + return (Criteria) this; + } + + public Criteria andSourceTypeIsNull() { + addCriterion("source_type is null"); + return (Criteria) this; + } + + public Criteria andSourceTypeIsNotNull() { + addCriterion("source_type is not null"); + return (Criteria) this; + } + + public Criteria andSourceTypeEqualTo(Integer value) { + addCriterion("source_type =", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotEqualTo(Integer value) { + addCriterion("source_type <>", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThan(Integer value) { + addCriterion("source_type >", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("source_type >=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThan(Integer value) { + addCriterion("source_type <", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThanOrEqualTo(Integer value) { + addCriterion("source_type <=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeIn(List values) { + addCriterion("source_type in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotIn(List values) { + addCriterion("source_type not in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeBetween(Integer value1, Integer value2) { + addCriterion("source_type between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) { + addCriterion("source_type not between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(Long value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(Long value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(Long value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(Long value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(Long value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(Long value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(Long value1, Long value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(Long value1, Long value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceContentIsNull() { + addCriterion("source_content is null"); + return (Criteria) this; + } + + public Criteria andSourceContentIsNotNull() { + addCriterion("source_content is not null"); + return (Criteria) this; + } + + public Criteria andSourceContentEqualTo(String value) { + addCriterion("source_content =", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotEqualTo(String value) { + addCriterion("source_content <>", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentGreaterThan(String value) { + addCriterion("source_content >", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentGreaterThanOrEqualTo(String value) { + addCriterion("source_content >=", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLessThan(String value) { + addCriterion("source_content <", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLessThanOrEqualTo(String value) { + addCriterion("source_content <=", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLike(String value) { + addCriterion("source_content like", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotLike(String value) { + addCriterion("source_content not like", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentIn(List values) { + addCriterion("source_content in", values, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotIn(List values) { + addCriterion("source_content not in", values, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentBetween(String value1, String value2) { + addCriterion("source_content between", value1, value2, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotBetween(String value1, String value2) { + addCriterion("source_content not between", value1, value2, "sourceContent"); + 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 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 andOpUserIdIsNull() { + addCriterion("op_user_id is null"); + return (Criteria) this; + } + + public Criteria andOpUserIdIsNotNull() { + addCriterion("op_user_id is not null"); + return (Criteria) this; + } + + public Criteria andOpUserIdEqualTo(Long value) { + addCriterion("op_user_id =", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotEqualTo(Long value) { + addCriterion("op_user_id <>", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdGreaterThan(Long value) { + addCriterion("op_user_id >", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_user_id >=", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdLessThan(Long value) { + addCriterion("op_user_id <", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdLessThanOrEqualTo(Long value) { + addCriterion("op_user_id <=", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdIn(List values) { + addCriterion("op_user_id in", values, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotIn(List values) { + addCriterion("op_user_id not in", values, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdBetween(Long value1, Long value2) { + addCriterion("op_user_id between", value1, value2, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotBetween(Long value1, Long value2) { + addCriterion("op_user_id not between", value1, value2, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserNameIsNull() { + addCriterion("op_user_name is null"); + return (Criteria) this; + } + + public Criteria andOpUserNameIsNotNull() { + addCriterion("op_user_name is not null"); + return (Criteria) this; + } + + public Criteria andOpUserNameEqualTo(String value) { + addCriterion("op_user_name =", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotEqualTo(String value) { + addCriterion("op_user_name <>", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameGreaterThan(String value) { + addCriterion("op_user_name >", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameGreaterThanOrEqualTo(String value) { + addCriterion("op_user_name >=", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLessThan(String value) { + addCriterion("op_user_name <", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLessThanOrEqualTo(String value) { + addCriterion("op_user_name <=", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLike(String value) { + addCriterion("op_user_name like", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotLike(String value) { + addCriterion("op_user_name not like", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameIn(List values) { + addCriterion("op_user_name in", values, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotIn(List values) { + addCriterion("op_user_name not in", values, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameBetween(String value1, String value2) { + addCriterion("op_user_name between", value1, value2, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotBetween(String value1, String value2) { + addCriterion("op_user_name not between", value1, value2, "opUserName"); + 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/enum_type/MerAccountMarketingType.java b/hai-service/src/main/java/com/hai/enum_type/MerAccountMarketingType.java new file mode 100644 index 00000000..9a48780c --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/MerAccountMarketingType.java @@ -0,0 +1,36 @@ +package com.hai.enum_type; + +/** + * 商户账户营销类型 + * @author hurui + */ +public enum MerAccountMarketingType { + type1(1 , "充值赠送"), + type2(2 , "充值返点"), + type3(3 , "加油减免"), + ; + + private Integer type; + private String name; + + MerAccountMarketingType(int type , String name) { + this.type = type; + this.name = name; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hai-service/src/main/java/com/hai/enum_type/MerAmountSourceTypeEnum.java b/hai-service/src/main/java/com/hai/enum_type/MerAmountSourceTypeEnum.java new file mode 100644 index 00000000..09059ea7 --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/MerAmountSourceTypeEnum.java @@ -0,0 +1,37 @@ +package com.hai.enum_type; + +/** + * 商户账户记录来源 + * @author hurui + */ +public enum MerAmountSourceTypeEnum { + type1(1, "金额充值"), + type2(2, "订单消费"), + type3(3, "订单退款"), + ; + + private Integer type; + + private String name; + + MerAmountSourceTypeEnum(int type, String name) { + this.type = type; + this.name = name; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hai-service/src/main/java/com/hai/enum_type/MerAmountTypeEnum.java b/hai-service/src/main/java/com/hai/enum_type/MerAmountTypeEnum.java new file mode 100644 index 00000000..8b2c1405 --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/MerAmountTypeEnum.java @@ -0,0 +1,36 @@ +package com.hai.enum_type; + +/** + * 商户账户记录类型 + * @author hurui + */ +public enum MerAmountTypeEnum { + type1(1, "进账"), + type2(2, "出账") + ; + + private Integer type; + + private String name; + + MerAmountTypeEnum(int type, String name) { + this.type = type; + this.name = name; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java b/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java new file mode 100644 index 00000000..f4b6c708 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java @@ -0,0 +1,34 @@ +package com.hai.service; + +import com.hai.entity.HighMerchantAccountMarketing; + +import java.math.BigDecimal; + +/** + * 商户账户营销配置 + */ +public interface HighMerchantAccountMarketingService { + + /** + * 增加 + * @param merchantAccountMarketing + */ + void insert(HighMerchantAccountMarketing merchantAccountMarketing); + + /** + * 查询详情 + * @param merId + * @param type + * @return + */ + HighMerchantAccountMarketing getDetailByMerAndType(Long merId,Integer type); + + /** + * 查询价格 + * @param merId + * @param type + * @param oilNo + * @return + */ + BigDecimal getPrice(Long merId,Integer type,Integer oilNo); +} diff --git a/hai-service/src/main/java/com/hai/service/HighMerchantAccountRecordService.java b/hai-service/src/main/java/com/hai/service/HighMerchantAccountRecordService.java new file mode 100644 index 00000000..ece2d780 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighMerchantAccountRecordService.java @@ -0,0 +1,25 @@ +package com.hai.service; + +import com.hai.entity.HighMerchantAccountRecord; + +import java.util.List; +import java.util.Map; + +/** + * 商户账户变更记录 + */ +public interface HighMerchantAccountRecordService { + + /** + * 增加记录 + * @param record + */ + void insert(HighMerchantAccountRecord record); + + /** + * 查询记录列表 + * @param param + * @return + */ + List getRecordList(Map param); +} diff --git a/hai-service/src/main/java/com/hai/service/HighMerchantAccountService.java b/hai-service/src/main/java/com/hai/service/HighMerchantAccountService.java index 00a5af15..72cedf83 100644 --- a/hai-service/src/main/java/com/hai/service/HighMerchantAccountService.java +++ b/hai-service/src/main/java/com/hai/service/HighMerchantAccountService.java @@ -20,14 +20,14 @@ public interface HighMerchantAccountService { * @param amount * @param otherParam */ - void recharge(Long merId, BigDecimal amount, Map otherParam); + void recharge(Long merId, BigDecimal amount, Map marketingParam, Map otherParam); /** * 查询商户账户 * @param merId * @return */ - HighMerchantAccount getStoreAccountDetail(Long merId); + HighMerchantAccount getMerAccountDetail(Long merId); /** * 统计商户加油金额 diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java new file mode 100644 index 00000000..81d77eca --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java @@ -0,0 +1,59 @@ +package com.hai.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hai.dao.HighMerchantAccountMarketingMapper; +import com.hai.entity.HighMerchantAccountMarketing; +import com.hai.entity.HighMerchantAccountMarketingExample; +import com.hai.enum_type.MerAccountMarketingType; +import com.hai.service.HighMerchantAccountMarketingService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Service("merchantAccountMarketingService") +public class HighMerchantAccountMarketingServiceImpl implements HighMerchantAccountMarketingService { + + @Resource + private HighMerchantAccountMarketingMapper marketingMapper; + + @Override + public void insert(HighMerchantAccountMarketing merchantAccountMarketing) { + merchantAccountMarketing.setStatus(1); + merchantAccountMarketing.setCreateTime(new Date()); + merchantAccountMarketing.setUpdateTime(new Date()); + marketingMapper.insert(merchantAccountMarketing); + } + + @Override + public HighMerchantAccountMarketing getDetailByMerAndType(Long merId, Integer type) { + HighMerchantAccountMarketingExample example = new HighMerchantAccountMarketingExample(); + example.createCriteria().andMerIdEqualTo(merId).andTypeEqualTo(type).andStatusNotEqualTo(0); + List list = marketingMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } + + @Override + public BigDecimal getPrice(Long merId, Integer type, Integer oilNo) { + HighMerchantAccountMarketing marketing = getDetailByMerAndType(merId, type); + if (marketing == null) { + return new BigDecimal("0"); + } + if (type.equals(MerAccountMarketingType.type3.getType())) { + JSONArray oilNoArray = JSONArray.parseArray(marketing.getOilNoReliefPrice()); + for (Object obj : oilNoArray) { + JSONObject oilNoData = (JSONObject) obj; + if (oilNo.equals(oilNoData.getInteger("oilNo"))) { + return oilNoData.getBigDecimal("price"); + } + } + } + return new BigDecimal("0"); + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountRecordServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountRecordServiceImpl.java new file mode 100644 index 00000000..0872bbed --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountRecordServiceImpl.java @@ -0,0 +1,52 @@ +package com.hai.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hai.dao.HighMerchantAccountRecordMapper; +import com.hai.entity.HighMerchantAccountRecord; +import com.hai.entity.HighMerchantAccountRecordExample; +import com.hai.service.HighMerchantAccountRecordService; +import org.apache.commons.collections4.MapUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Service("merchantAccountRecordService") +public class HighMerchantAccountRecordServiceImpl implements HighMerchantAccountRecordService { + + @Resource + private HighMerchantAccountRecordMapper merchantAccountRecordMapper; + + @Override + public void insert(HighMerchantAccountRecord record) { + record.setCreateTime(new Date()); + record.setStatus(1); + merchantAccountRecordMapper.insert(record); + } + + @Override + public List getRecordList(Map param) { + HighMerchantAccountRecordExample example = new HighMerchantAccountRecordExample(); + HighMerchantAccountRecordExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "merId") != null) { + criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); + } + + if (MapUtils.getObject(param, "merIdList") != null) { + JSONObject.toJSONString(MapUtils.getObject(param, "merIdList")); + List merList = (List) MapUtils.getObject(param, "merIdList"); + criteria.andMerIdIn(merList); + } + + if (MapUtils.getInteger(param, "type") != null) { + criteria.andTypeEqualTo(MapUtils.getInteger(param, "type")); + } + + example.setOrderByClause("create_time desc"); + return merchantAccountRecordMapper.selectByExample(example); + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java index 0e05a400..3b38af5f 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java @@ -1,18 +1,25 @@ package com.hai.service.impl; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; +import com.hai.common.security.UserCenter; import com.hai.common.utils.BankNumberUtil; import com.hai.dao.HighMerchantAccountMapper; -import com.hai.entity.HighMerchant; -import com.hai.entity.HighMerchantAccount; -import com.hai.entity.HighMerchantAccountExample; -import com.hai.entity.HighMerchantStoreAccount; +import com.hai.entity.*; +import com.hai.enum_type.MerAccountMarketingType; +import com.hai.enum_type.MerAmountSourceTypeEnum; +import com.hai.enum_type.MerAmountTypeEnum; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; +import com.hai.model.UserInfoModel; +import com.hai.service.HighMerchantAccountMarketingService; +import com.hai.service.HighMerchantAccountRecordService; import com.hai.service.HighMerchantAccountService; import com.hai.service.HighMerchantService; +import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -32,6 +39,15 @@ public class HighMerchantAccountServiceImpl implements HighMerchantAccountServic @Resource private HighMerchantService merchantService; + @Resource + private HighMerchantAccountRecordService merchantAccountRecordService; + + @Resource + private HighMerchantAccountMarketingService marketingService; + + @Resource + private UserCenter userCenter; + @Override public void editMerchantAccount(HighMerchantAccount merchantAccount) { if (merchantAccount.getId() == null) { @@ -48,30 +64,79 @@ public class HighMerchantAccountServiceImpl implements HighMerchantAccountServic @Override @Transactional(propagation= Propagation.REQUIRES_NEW) - public void recharge(Long merId, BigDecimal amount, Map otherParam) { + public void recharge(Long merId, BigDecimal amount, Map marketingParam, Map otherParam) { + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + // 查询商户 HighMerchant merchant = merchantService.getDetailById(merId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); } // 是否开通了账户 - HighMerchantAccount account = getStoreAccountDetail(merId); + HighMerchantAccount account = getMerAccountDetail(merId); if (account == null) { account = new HighMerchantAccount(); account.setMerId(merId); account.setAmounts(new BigDecimal("0")); } + + // 本次交易金额 + BigDecimal tradePrice = amount; + + HighMerchantAccountRecord accountRecord = new HighMerchantAccountRecord(); + accountRecord.setMarketingStatus(MapUtils.getBoolean(marketingParam, "marketingStatus")); + + // 营销活动 + if (MapUtils.getBoolean(marketingParam, "marketingStatus") == true) { + if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type1.getType())) { + accountRecord.setMarketingType(MerAccountMarketingType.type1.getType()); + accountRecord.setMarketingPrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice"))); + accountRecord.setMarketingTradePrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice"))); + tradePrice = tradePrice.add(accountRecord.getMarketingTradePrice()); + } + + if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type2.getType())) { + accountRecord.setMarketingType(MerAccountMarketingType.type2.getType()); + accountRecord.setMarketingPrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice"))); + accountRecord.setMarketingTradePrice(amount.multiply(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice")).setScale(BigDecimal.ROUND_HALF_DOWN))); + tradePrice = tradePrice.add(accountRecord.getMarketingTradePrice()); + } + + if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type3.getType())) { + HighMerchantAccountMarketing accountMarketing = new HighMerchantAccountMarketing(); + accountMarketing.setType(MerAccountMarketingType.type3.getType()); + accountMarketing.setMerId(merId); + accountMarketing.setMerAccountId(account.getId()); + JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData"); + accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString()); + marketingService.insert(accountMarketing); + } + } + // 变更前金额 BigDecimal beforeAmount = account.getAmounts(); // 计算金额 - account.setAmounts(account.getAmounts().add(amount)); + account.setAmounts(account.getAmounts().add(tradePrice)); // 变更后金额 BigDecimal afterAmount = account.getAmounts(); editMerchantAccount(account); + + accountRecord.setMerAmountId(account.getId()); + accountRecord.setMerId(merchant.getId()); + accountRecord.setMerName(merchant.getMerchantName()); + accountRecord.setType(MerAmountTypeEnum.type1.getType()); + accountRecord.setAmount(amount); + accountRecord.setTradePrice(tradePrice); + accountRecord.setBeforeAmount(beforeAmount); + accountRecord.setAfterAmount(afterAmount); + accountRecord.setSourceType(MerAmountSourceTypeEnum.type1.getType()); + accountRecord.setOpUserId(userInfoModel.getSecUser().getId()); + accountRecord.setOpUserName(userInfoModel.getSecUser().getUserName()); + merchantAccountRecordService.insert(accountRecord); } @Override - public HighMerchantAccount getStoreAccountDetail(Long merId) { + public HighMerchantAccount getMerAccountDetail(Long merId) { HighMerchantAccountExample example = new HighMerchantAccountExample(); example.createCriteria().andStatusEqualTo(1).andMerIdEqualTo(merId); List list = merchantAccountMapper.selectByExample(example); 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 4/7] 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 5/7] 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 aeba88b7b758a2ab8d5a636e6786c6b620c3dd16 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 15 Aug 2022 11:27:18 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cweb/controller/HighOrderController.java | 13 +++++++++--- .../HighMerchantAccountMarketingService.java | 6 ++++++ ...ghMerchantAccountMarketingServiceImpl.java | 6 ++++++ .../impl/HighMerchantAccountServiceImpl.java | 21 ++++++++++++------- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index aba846eb..27984cd4 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -20,6 +20,7 @@ import com.hai.config.TuanYouConfig; import com.hai.entity.*; import com.hai.enum_type.DiscountUseScope; import com.hai.enum_type.GasClassGroupTaskStatus; +import com.hai.enum_type.MerAccountMarketingType; import com.hai.enum_type.OrderChildGoodsTypeEnum; import com.hai.model.GasPayPriceModel; import com.hai.model.HighMerchantStoreModel; @@ -322,7 +323,7 @@ public class HighOrderController { } // 营销减免的金额 - BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), 1, Integer.valueOf(childOrder.getGasOilNo())); + BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), MerAccountMarketingType.type3.getType(), Integer.valueOf(childOrder.getGasOilNo())); // 计算价格 GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(childOrder.getGoodsPrice(), childOrder.getGoodsId(), childOrder.getGasOilNo(), highOrder.getIsTyAgent()); @@ -366,11 +367,17 @@ public class HighOrderController { childOrder.setGoodsImg(store.getStoreLogo()); } - childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); - childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN)); childOrder.setGoodsName(store.getStoreName()); childOrder.setGoodsSpecName("默认"); childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); + + // 成本价 油站价 减 营销策略价 + childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); + if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) { + childOrder.setGasPriceCostTotal(childOrder.getTotalPrice()); + } else { + childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN)); + } } if (childOrder.getGoodsType() == 7) { diff --git a/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java b/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java index f4b6c708..5145d13a 100644 --- a/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java +++ b/hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java @@ -15,6 +15,12 @@ public interface HighMerchantAccountMarketingService { */ void insert(HighMerchantAccountMarketing merchantAccountMarketing); + /** + * 修改 + * @param merchantAccountMarketing + */ + void update(HighMerchantAccountMarketing merchantAccountMarketing); + /** * 查询详情 * @param merId diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java index 81d77eca..90fc1e52 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java @@ -28,6 +28,12 @@ public class HighMerchantAccountMarketingServiceImpl implements HighMerchantAcco marketingMapper.insert(merchantAccountMarketing); } + @Override + public void update(HighMerchantAccountMarketing merchantAccountMarketing) { + merchantAccountMarketing.setUpdateTime(new Date()); + marketingMapper.updateByPrimaryKeySelective(merchantAccountMarketing); + } + @Override public HighMerchantAccountMarketing getDetailByMerAndType(Long merId, Integer type) { HighMerchantAccountMarketingExample example = new HighMerchantAccountMarketingExample(); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java index 3b38af5f..8f94b9ba 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java @@ -103,13 +103,20 @@ public class HighMerchantAccountServiceImpl implements HighMerchantAccountServic } if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type3.getType())) { - HighMerchantAccountMarketing accountMarketing = new HighMerchantAccountMarketing(); - accountMarketing.setType(MerAccountMarketingType.type3.getType()); - accountMarketing.setMerId(merId); - accountMarketing.setMerAccountId(account.getId()); - JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData"); - accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString()); - marketingService.insert(accountMarketing); + HighMerchantAccountMarketing accountMarketing = marketingService.getDetailByMerAndType(merId, MerAccountMarketingType.type3.getType()); + if (accountMarketing == null) { + accountMarketing = new HighMerchantAccountMarketing(); + accountMarketing.setType(MerAccountMarketingType.type3.getType()); + accountMarketing.setMerId(merId); + accountMarketing.setMerAccountId(account.getId()); + JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData"); + accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString()); + marketingService.insert(accountMarketing); + } else { + JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData"); + accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString()); + marketingService.update(accountMarketing); + } } } 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 7/7] 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;