Merge remote-tracking branch 'origin/dev' into dev

dev-discount
袁野 3 years ago
commit d23648dc40
  1. 19
      hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java
  3. 16
      hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java
  4. 60
      hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java

@ -39,14 +39,14 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_discount_user_rel (discount_id, agent_id, ",
"discount_agent_code_id, user_id, ",
"`status`, use_time, ",
"insert into high_discount_user_rel (discount_id, using_attribution, ",
"agent_id, discount_agent_code_id, ",
"user_id, `status`, use_time, ",
"create_time, use_end_time, ",
"ext_1, ext_2, ext_3)",
"values (#{discountId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{discountAgentCodeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ",
"#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ",
"values (#{discountId,jdbcType=BIGINT}, #{usingAttribution,jdbcType=INTEGER}, ",
"#{agentId,jdbcType=BIGINT}, #{discountAgentCodeId,jdbcType=BIGINT}, ",
"#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@ -61,6 +61,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT),
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="discount_agent_code_id", property="discountAgentCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@ -76,14 +77,15 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt
@Select({
"select",
"id, discount_id, agent_id, discount_agent_code_id, user_id, `status`, use_time, ",
"create_time, use_end_time, ext_1, ext_2, ext_3",
"id, discount_id, using_attribution, agent_id, discount_agent_code_id, user_id, ",
"`status`, use_time, create_time, use_end_time, ext_1, ext_2, ext_3",
"from high_discount_user_rel",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT),
@Result(column="using_attribution", property="usingAttribution", jdbcType=JdbcType.INTEGER),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="discount_agent_code_id", property="discountAgentCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@ -109,6 +111,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt
@Update({
"update high_discount_user_rel",
"set discount_id = #{discountId,jdbcType=BIGINT},",
"using_attribution = #{usingAttribution,jdbcType=INTEGER},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"discount_agent_code_id = #{discountAgentCodeId,jdbcType=BIGINT},",
"user_id = #{userId,jdbcType=BIGINT},",

@ -32,6 +32,10 @@ public class HighDiscountUserRelSqlProvider {
sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}");
}
if (record.getUsingAttribution() != null) {
sql.VALUES("using_attribution", "#{usingAttribution,jdbcType=INTEGER}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
@ -83,6 +87,7 @@ public class HighDiscountUserRelSqlProvider {
sql.SELECT("id");
}
sql.SELECT("discount_id");
sql.SELECT("using_attribution");
sql.SELECT("agent_id");
sql.SELECT("discount_agent_code_id");
sql.SELECT("user_id");
@ -118,6 +123,10 @@ public class HighDiscountUserRelSqlProvider {
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}");
}
if (record.getUsingAttribution() != null) {
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
@ -168,6 +177,7 @@ public class HighDiscountUserRelSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}");
sql.SET("using_attribution = #{record.usingAttribution,jdbcType=INTEGER}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("discount_agent_code_id = #{record.discountAgentCodeId,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
@ -192,6 +202,10 @@ public class HighDiscountUserRelSqlProvider {
sql.SET("discount_id = #{discountId,jdbcType=BIGINT}");
}
if (record.getUsingAttribution() != null) {
sql.SET("using_attribution = #{usingAttribution,jdbcType=INTEGER}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}

@ -25,6 +25,11 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser
*/
private Long discountId;
/**
* 使用归属
*/
private Integer usingAttribution;
/**
* 代理商id
*/
@ -84,6 +89,14 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser
this.discountId = discountId;
}
public Integer getUsingAttribution() {
return usingAttribution;
}
public void setUsingAttribution(Integer usingAttribution) {
this.usingAttribution = usingAttribution;
}
public Long getAgentId() {
return agentId;
}
@ -178,6 +191,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser
HighDiscountUserRel other = (HighDiscountUserRel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId()))
&& (this.getUsingAttribution() == null ? other.getUsingAttribution() == null : this.getUsingAttribution().equals(other.getUsingAttribution()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getDiscountAgentCodeId() == null ? other.getDiscountAgentCodeId() == null : this.getDiscountAgentCodeId().equals(other.getDiscountAgentCodeId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
@ -196,6 +210,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode());
result = prime * result + ((getUsingAttribution() == null) ? 0 : getUsingAttribution().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getDiscountAgentCodeId() == null) ? 0 : getDiscountAgentCodeId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
@ -217,6 +232,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", discountId=").append(discountId);
sb.append(", usingAttribution=").append(usingAttribution);
sb.append(", agentId=").append(agentId);
sb.append(", discountAgentCodeId=").append(discountAgentCodeId);
sb.append(", userId=").append(userId);

@ -245,6 +245,66 @@ public class HighDiscountUserRelExample {
return (Criteria) this;
}
public Criteria andUsingAttributionIsNull() {
addCriterion("using_attribution is null");
return (Criteria) this;
}
public Criteria andUsingAttributionIsNotNull() {
addCriterion("using_attribution is not null");
return (Criteria) this;
}
public Criteria andUsingAttributionEqualTo(Integer value) {
addCriterion("using_attribution =", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionNotEqualTo(Integer value) {
addCriterion("using_attribution <>", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionGreaterThan(Integer value) {
addCriterion("using_attribution >", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionGreaterThanOrEqualTo(Integer value) {
addCriterion("using_attribution >=", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionLessThan(Integer value) {
addCriterion("using_attribution <", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionLessThanOrEqualTo(Integer value) {
addCriterion("using_attribution <=", value, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionIn(List<Integer> values) {
addCriterion("using_attribution in", values, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionNotIn(List<Integer> values) {
addCriterion("using_attribution not in", values, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionBetween(Integer value1, Integer value2) {
addCriterion("using_attribution between", value1, value2, "usingAttribution");
return (Criteria) this;
}
public Criteria andUsingAttributionNotBetween(Integer value1, Integer value2) {
addCriterion("using_attribution not between", value1, value2, "usingAttribution");
return (Criteria) this;
}
public Criteria andAgentIdIsNull() {
addCriterion("agent_id is null");
return (Criteria) this;

Loading…
Cancel
Save