dev-discount
袁野 6 years ago
parent 161e272ee9
commit f26f3a28c4
  1. 16
      hai-service/src/main/java/com/hai/dao/HighCouponMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java
  3. 28
      hai-service/src/main/java/com/hai/entity/HighCoupon.java
  4. 60
      hai-service/src/main/java/com/hai/entity/HighCouponExample.java

@ -53,7 +53,7 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"ext_3, `status`, display_area, ",
"coupon_source, distributor, ",
"goods_type_id, brand_id, ",
"reserve_status)",
"reserve_status, buy_points)",
"values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ",
"#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ",
"#{couponPrice,jdbcType=DECIMAL}, #{couponImg,jdbcType=VARCHAR}, ",
@ -68,7 +68,7 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"#{ext3,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{displayArea,jdbcType=INTEGER}, ",
"#{couponSource,jdbcType=INTEGER}, #{distributor,jdbcType=INTEGER}, ",
"#{goodsTypeId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER}, ",
"#{reserveStatus,jdbcType=BIT})"
"#{reserveStatus,jdbcType=BIT}, #{buyPoints,jdbcType=BIT})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighCoupon record);
@ -110,7 +110,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER),
@Result(column="goods_type_id", property="goodsTypeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT)
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT),
@Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT)
})
List<HighCoupon> selectByExample(HighCouponExample example);
@ -120,7 +121,8 @@ 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, distributor, goods_type_id, brand_id, reserve_status",
"display_area, coupon_source, distributor, goods_type_id, brand_id, reserve_status, ",
"buy_points",
"from high_coupon",
"where id = #{id,jdbcType=BIGINT}"
})
@ -156,7 +158,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER),
@Result(column="goods_type_id", property="goodsTypeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT)
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT),
@Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT)
})
HighCoupon selectByPrimaryKey(Long id);
@ -201,7 +204,8 @@ public interface HighCouponMapper extends HighCouponMapperExt {
"distributor = #{distributor,jdbcType=INTEGER},",
"goods_type_id = #{goodsTypeId,jdbcType=INTEGER},",
"brand_id = #{brandId,jdbcType=INTEGER},",
"reserve_status = #{reserveStatus,jdbcType=BIT}",
"reserve_status = #{reserveStatus,jdbcType=BIT},",
"buy_points = #{buyPoints,jdbcType=BIT}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighCoupon record);

@ -152,6 +152,10 @@ public class HighCouponSqlProvider {
sql.VALUES("reserve_status", "#{reserveStatus,jdbcType=BIT}");
}
if (record.getBuyPoints() != null) {
sql.VALUES("buy_points", "#{buyPoints,jdbcType=BIT}");
}
return sql.toString();
}
@ -193,6 +197,7 @@ public class HighCouponSqlProvider {
sql.SELECT("goods_type_id");
sql.SELECT("brand_id");
sql.SELECT("reserve_status");
sql.SELECT("buy_points");
sql.FROM("high_coupon");
applyWhere(sql, example, false);
@ -338,6 +343,10 @@ public class HighCouponSqlProvider {
sql.SET("reserve_status = #{record.reserveStatus,jdbcType=BIT}");
}
if (record.getBuyPoints() != null) {
sql.SET("buy_points = #{record.buyPoints,jdbcType=BIT}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -378,6 +387,7 @@ public class HighCouponSqlProvider {
sql.SET("goods_type_id = #{record.goodsTypeId,jdbcType=INTEGER}");
sql.SET("brand_id = #{record.brandId,jdbcType=INTEGER}");
sql.SET("reserve_status = #{record.reserveStatus,jdbcType=BIT}");
sql.SET("buy_points = #{record.buyPoints,jdbcType=BIT}");
HighCouponExample example = (HighCouponExample) parameter.get("example");
applyWhere(sql, example, true);
@ -512,6 +522,10 @@ public class HighCouponSqlProvider {
sql.SET("reserve_status = #{reserveStatus,jdbcType=BIT}");
}
if (record.getBuyPoints() != null) {
sql.SET("buy_points = #{buyPoints,jdbcType=BIT}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -1,7 +1,5 @@
package com.hai.entity;
import com.hai.model.HighCouponModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -15,7 +13,7 @@ import java.util.Date;
* 代码由工具生成
*
**/
public class HighCoupon extends HighCouponModel implements Serializable {
public class HighCoupon implements Serializable {
/**
* 主键
*/
@ -122,7 +120,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
private String operatorName;
/**
* 支付类型1.微信支付 2.金币支付
* 支付类型1.微信支付 2.金币支付 3. 银联支付 4. 汇联通支付
*/
private Integer payType;
@ -138,7 +136,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
private Integer status;
/**
* 1.赠券专区 2.金币专区 3 银联专区 4. 优选商品
* 1.赠券专区 2.金币专区 3. 银联专区 4. 优选商品 5. 贵州工会卡专区
*/
private Integer displayArea;
@ -163,10 +161,15 @@ public class HighCoupon extends HighCouponModel implements Serializable {
private Integer brandId;
/**
* 是否预约产品 0 1
* 是否需要预约 0 1
*/
private Boolean reserveStatus;
/**
* 是否自动充值积分 0 1
*/
private Boolean buyPoints;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -425,6 +428,14 @@ public class HighCoupon extends HighCouponModel implements Serializable {
this.reserveStatus = reserveStatus;
}
public Boolean getBuyPoints() {
return buyPoints;
}
public void setBuyPoints(Boolean buyPoints) {
this.buyPoints = buyPoints;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -468,7 +479,8 @@ public class HighCoupon extends HighCouponModel implements Serializable {
&& (this.getDistributor() == null ? other.getDistributor() == null : this.getDistributor().equals(other.getDistributor()))
&& (this.getGoodsTypeId() == null ? other.getGoodsTypeId() == null : this.getGoodsTypeId().equals(other.getGoodsTypeId()))
&& (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
&& (this.getReserveStatus() == null ? other.getReserveStatus() == null : this.getReserveStatus().equals(other.getReserveStatus()));
&& (this.getReserveStatus() == null ? other.getReserveStatus() == null : this.getReserveStatus().equals(other.getReserveStatus()))
&& (this.getBuyPoints() == null ? other.getBuyPoints() == null : this.getBuyPoints().equals(other.getBuyPoints()));
}
@Override
@ -507,6 +519,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
result = prime * result + ((getGoodsTypeId() == null) ? 0 : getGoodsTypeId().hashCode());
result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
result = prime * result + ((getReserveStatus() == null) ? 0 : getReserveStatus().hashCode());
result = prime * result + ((getBuyPoints() == null) ? 0 : getBuyPoints().hashCode());
return result;
}
@ -548,6 +561,7 @@ public class HighCoupon extends HighCouponModel implements Serializable {
sb.append(", goodsTypeId=").append(goodsTypeId);
sb.append(", brandId=").append(brandId);
sb.append(", reserveStatus=").append(reserveStatus);
sb.append(", buyPoints=").append(buyPoints);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -2135,6 +2135,66 @@ public class HighCouponExample {
addCriterion("reserve_status not between", value1, value2, "reserveStatus");
return (Criteria) this;
}
public Criteria andBuyPointsIsNull() {
addCriterion("buy_points is null");
return (Criteria) this;
}
public Criteria andBuyPointsIsNotNull() {
addCriterion("buy_points is not null");
return (Criteria) this;
}
public Criteria andBuyPointsEqualTo(Boolean value) {
addCriterion("buy_points =", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsNotEqualTo(Boolean value) {
addCriterion("buy_points <>", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsGreaterThan(Boolean value) {
addCriterion("buy_points >", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsGreaterThanOrEqualTo(Boolean value) {
addCriterion("buy_points >=", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsLessThan(Boolean value) {
addCriterion("buy_points <", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsLessThanOrEqualTo(Boolean value) {
addCriterion("buy_points <=", value, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsIn(List<Boolean> values) {
addCriterion("buy_points in", values, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsNotIn(List<Boolean> values) {
addCriterion("buy_points not in", values, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsBetween(Boolean value1, Boolean value2) {
addCriterion("buy_points between", value1, value2, "buyPoints");
return (Criteria) this;
}
public Criteria andBuyPointsNotBetween(Boolean value1, Boolean value2) {
addCriterion("buy_points not between", value1, value2, "buyPoints");
return (Criteria) this;
}
}
/**

Loading…
Cancel
Save