提交代码

dev-discount
胡锐 3 years ago
parent 3c31106ddd
commit 921b1996eb
  1. 406
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 15
      hai-service/src/main/java/com/hai/dao/HighCouponMapper.java
  3. 14
      hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java
  4. 20
      hai-service/src/main/java/com/hai/entity/HighCoupon.java
  5. 60
      hai-service/src/main/java/com/hai/entity/HighCouponExample.java

File diff suppressed because one or more lines are too long

@ -51,7 +51,7 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"operator_id, operator_name, ",
"pay_type, ext_1, ext_2, ",
"ext_3, `status`, display_area, ",
"coupon_source)",
"coupon_source, distributor)",
"values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ",
"#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ",
"#{couponPrice,jdbcType=DECIMAL}, #{couponImg,jdbcType=VARCHAR}, ",
@ -64,7 +64,7 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{payType,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{displayArea,jdbcType=INTEGER}, ",
"#{couponSource,jdbcType=INTEGER})"
"#{couponSource,jdbcType=INTEGER}, #{distributor,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighCoupon record);
@ -102,7 +102,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="display_area", property="displayArea", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER)
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER),
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER)
})
List<HighCoupon> selectByExample(HighCouponExample example);
@ -112,7 +113,7 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"coupon_carousel_img, coupon_desc, coupon_type, sales_end_time, recycle_day, ",
"limit_number, sales_price, discount_price, sales_count, is_present, create_time, ",
"update_time, operator_id, operator_name, pay_type, ext_1, ext_2, ext_3, `status`, ",
"display_area, coupon_source",
"display_area, coupon_source, distributor",
"from high_coupon",
"where id = #{id,jdbcType=BIGINT}"
})
@ -144,7 +145,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="display_area", property="displayArea", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER)
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER),
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER)
})
HighCoupon selectByPrimaryKey(Long id);
@ -185,7 +187,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"display_area = #{displayArea,jdbcType=INTEGER},",
"coupon_source = #{couponSource,jdbcType=INTEGER}",
"coupon_source = #{couponSource,jdbcType=INTEGER},",
"distributor = #{distributor,jdbcType=INTEGER}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighCoupon record);

@ -136,6 +136,10 @@ public class HighCouponSqlProvider {
sql.VALUES("coupon_source", "#{couponSource,jdbcType=INTEGER}");
}
if (record.getDistributor() != null) {
sql.VALUES("distributor", "#{distributor,jdbcType=INTEGER}");
}
return sql.toString();
}
@ -173,6 +177,7 @@ public class HighCouponSqlProvider {
sql.SELECT("`status`");
sql.SELECT("display_area");
sql.SELECT("coupon_source");
sql.SELECT("distributor");
sql.FROM("high_coupon");
applyWhere(sql, example, false);
@ -302,6 +307,10 @@ public class HighCouponSqlProvider {
sql.SET("coupon_source = #{record.couponSource,jdbcType=INTEGER}");
}
if (record.getDistributor() != null) {
sql.SET("distributor = #{record.distributor,jdbcType=INTEGER}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -338,6 +347,7 @@ public class HighCouponSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("display_area = #{record.displayArea,jdbcType=INTEGER}");
sql.SET("coupon_source = #{record.couponSource,jdbcType=INTEGER}");
sql.SET("distributor = #{record.distributor,jdbcType=INTEGER}");
HighCouponExample example = (HighCouponExample) parameter.get("example");
applyWhere(sql, example, true);
@ -456,6 +466,10 @@ public class HighCouponSqlProvider {
sql.SET("coupon_source = #{couponSource,jdbcType=INTEGER}");
}
if (record.getDistributor() != null) {
sql.SET("distributor = #{distributor,jdbcType=INTEGER}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -143,10 +143,15 @@ public class HighCoupon extends HighCouponModel implements Serializable {
private Integer displayArea;
/**
* 卡券来源1.中石化
* 卡券来源1.中石化 2.消费券 3.其他 4贵州中石化
*/
private Integer couponSource;
/**
* 渠道商 1主营渠道 2银联渠道
*/
private Integer distributor;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -373,6 +378,14 @@ public class HighCoupon extends HighCouponModel implements Serializable {
this.couponSource = couponSource;
}
public Integer getDistributor() {
return distributor;
}
public void setDistributor(Integer distributor) {
this.distributor = distributor;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -412,7 +425,8 @@ public class HighCoupon extends HighCouponModel implements Serializable {
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getDisplayArea() == null ? other.getDisplayArea() == null : this.getDisplayArea().equals(other.getDisplayArea()))
&& (this.getCouponSource() == null ? other.getCouponSource() == null : this.getCouponSource().equals(other.getCouponSource()));
&& (this.getCouponSource() == null ? other.getCouponSource() == null : this.getCouponSource().equals(other.getCouponSource()))
&& (this.getDistributor() == null ? other.getDistributor() == null : this.getDistributor().equals(other.getDistributor()));
}
@Override
@ -447,6 +461,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getDisplayArea() == null) ? 0 : getDisplayArea().hashCode());
result = prime * result + ((getCouponSource() == null) ? 0 : getCouponSource().hashCode());
result = prime * result + ((getDistributor() == null) ? 0 : getDistributor().hashCode());
return result;
}
@ -484,6 +499,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
sb.append(", status=").append(status);
sb.append(", displayArea=").append(displayArea);
sb.append(", couponSource=").append(couponSource);
sb.append(", distributor=").append(distributor);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -1895,6 +1895,66 @@ public class HighCouponExample {
addCriterion("coupon_source not between", value1, value2, "couponSource");
return (Criteria) this;
}
public Criteria andDistributorIsNull() {
addCriterion("distributor is null");
return (Criteria) this;
}
public Criteria andDistributorIsNotNull() {
addCriterion("distributor is not null");
return (Criteria) this;
}
public Criteria andDistributorEqualTo(Integer value) {
addCriterion("distributor =", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorNotEqualTo(Integer value) {
addCriterion("distributor <>", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorGreaterThan(Integer value) {
addCriterion("distributor >", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorGreaterThanOrEqualTo(Integer value) {
addCriterion("distributor >=", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorLessThan(Integer value) {
addCriterion("distributor <", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorLessThanOrEqualTo(Integer value) {
addCriterion("distributor <=", value, "distributor");
return (Criteria) this;
}
public Criteria andDistributorIn(List<Integer> values) {
addCriterion("distributor in", values, "distributor");
return (Criteria) this;
}
public Criteria andDistributorNotIn(List<Integer> values) {
addCriterion("distributor not in", values, "distributor");
return (Criteria) this;
}
public Criteria andDistributorBetween(Integer value1, Integer value2) {
addCriterion("distributor between", value1, value2, "distributor");
return (Criteria) this;
}
public Criteria andDistributorNotBetween(Integer value1, Integer value2) {
addCriterion("distributor not between", value1, value2, "distributor");
return (Criteria) this;
}
}
/**

Loading…
Cancel
Save