dev-discount
胡锐 2 years ago
commit 533bcb5484
  1. 12
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java
  2. 138
      hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapper.java
  3. 7
      hai-service/src/main/java/com/hai/dao/BsDistributionRebateMapperExt.java
  4. 374
      hai-service/src/main/java/com/hai/dao/BsDistributionRebateSqlProvider.java
  5. 130
      hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper.java
  6. 7
      hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapperExt.java
  7. 346
      hai-service/src/main/java/com/hai/dao/BsDistributionUserRelSqlProvider.java
  8. 11
      hai-service/src/main/java/com/hai/dao/BsIntegralRebateMapper.java
  9. 28
      hai-service/src/main/java/com/hai/dao/BsIntegralRebateSqlProvider.java
  10. 15
      hai-service/src/main/java/com/hai/dao/HighUserMapper.java
  11. 14
      hai-service/src/main/java/com/hai/dao/HighUserSqlProvider.java
  12. 290
      hai-service/src/main/java/com/hai/entity/BsDistributionRebate.java
  13. 1184
      hai-service/src/main/java/com/hai/entity/BsDistributionRebateExample.java
  14. 257
      hai-service/src/main/java/com/hai/entity/BsDistributionUserRel.java
  15. 1063
      hai-service/src/main/java/com/hai/entity/BsDistributionUserRelExample.java
  16. 32
      hai-service/src/main/java/com/hai/entity/BsIntegralRebate.java
  17. 120
      hai-service/src/main/java/com/hai/entity/BsIntegralRebateExample.java
  18. 20
      hai-service/src/main/java/com/hai/entity/HighUser.java
  19. 60
      hai-service/src/main/java/com/hai/entity/HighUserExample.java
  20. 47
      hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java
  21. 73
      hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java
  22. 3
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  23. 2
      hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.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, "");

@ -0,0 +1,138 @@
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, `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}, #{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}, ",
"#{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="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="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<BsDistributionRebate> selectByExample(BsDistributionRebateExample example);
@Select({
"select",
"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="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},",
"`type` = #{type,jdbcType=INTEGER},",
"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);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface BsDistributionRebateMapperExt {
}

@ -0,0 +1,374 @@
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.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
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("`type`");
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<String, Object> 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.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
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<String, Object> 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("`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("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.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
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<Criteria> 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<Criterion> 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());
}
}
}

@ -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<BsDistributionUserRel> 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);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface BsDistributionUserRelMapperExt {
}

@ -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<String, Object> 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<String, Object> 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<Criteria> 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<Criterion> 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());
}
}
}

@ -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},",

@ -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}");
}

@ -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},",

@ -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}");
}

@ -0,0 +1,290 @@
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;
/**
* 类型 1:上级推广人 2:顶级推广人
*/
private Integer type;
/**
* 订单号
*/
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 Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
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.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.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 + ((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 + ((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(", type=").append(type);
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();
}
}

@ -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();
}
}

@ -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);

@ -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<BigDecimal> values) {
addCriterion("first_distribution in", values, "firstDistribution");
return (Criteria) this;
}
public Criteria andFirstDistributionNotIn(List<BigDecimal> 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<BigDecimal> values) {
addCriterion("second_distribution in", values, "secondDistribution");
return (Criteria) this;
}
public Criteria andSecondDistributionNotIn(List<BigDecimal> 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;

@ -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);

@ -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<Boolean> values) {
addCriterion("is_agent in", values, "isAgent");
return (Criteria) this;
}
public Criteria andIsAgentNotIn(List<Boolean> 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;

@ -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<java.lang.String,java.lang.Object>]
* @return java.util.List<com.hai.entity.BsDistributionRebate>
*/
List<BsDistributionUserRel> getDistributionUserRelList(Map<String, Object> map);
/**
* @Author Sum1Dream
* @name findDistributionUserRel.java
* @Description // 查询关联关系详情
* @Date 18:00 2022/8/11
* @Param [java.util.Map<java.lang.String,java.lang.Object>]
* @return com.hai.entity.BsDistributionUserRel
*/
BsDistributionUserRel findDistributionUserRel(Map<String, Object> map);
}

@ -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<String, Object> 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<BsDistributionUserRel> getDistributionUserRelList(Map<String, Object> map) {
return null;
}
@Override
public BsDistributionUserRel findDistributionUserRel(Map<String, Object> map) {
BsDistributionUserRelExample example = new BsDistributionUserRelExample();
BsDistributionUserRelExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map , "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map , "userId"));
}
List<BsDistributionUserRel> list = bsDistributionUserRelMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -111,6 +111,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
order.setWhetherRebate(true);
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);
}

@ -121,7 +121,7 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService {
map.put("salesType", 2);
map.put("status", 1);
// 查询话费专属优惠券包
// 查询专属优惠券包
List<HighDiscountPackage> highDiscountPackages = highDiscountPackageService.getDiscountPackageList(map);
if (highDiscountPackages.size() == 0) {

Loading…
Cancel
Save