袁野 4 months ago committed by yuanye
parent 7155a285ea
commit 198b89db40
  1. 35
      service/src/main/java/com/hfkj/dao/CouponDiscountMapper.java
  2. 14
      service/src/main/java/com/hfkj/dao/CouponDiscountSqlProvider.java
  3. 16
      service/src/main/java/com/hfkj/entity/CouponDiscount.java
  4. 60
      service/src/main/java/com/hfkj/entity/CouponDiscountExample.java

@ -40,20 +40,22 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt {
@Insert({ @Insert({
"insert into coupon_discount (`name`, img, ", "insert into coupon_discount (`name`, img, ",
"`type`, `condition`, ", "`type`, platform, ",
"price, percentage, ", "`condition`, price, ",
"limit_num, effective_day, ", "percentage, limit_num, ",
"effective_num, sales_end_time, ", "effective_day, effective_num, ",
"create_time, update_time, ", "sales_end_time, create_time, ",
"op_id, op_name, `status`, ", "update_time, op_id, ",
"op_name, `status`, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{name,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ", "values (#{name,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ",
"#{type,jdbcType=INTEGER}, #{condition,jdbcType=DECIMAL}, ", "#{type,jdbcType=INTEGER}, #{platform,jdbcType=INTEGER}, ",
"#{price,jdbcType=DECIMAL}, #{percentage,jdbcType=DECIMAL}, ", "#{condition,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, ",
"#{limitNum,jdbcType=INTEGER}, #{effectiveDay,jdbcType=INTEGER}, ", "#{percentage,jdbcType=DECIMAL}, #{limitNum,jdbcType=INTEGER}, ",
"#{effectiveNum,jdbcType=INTEGER}, #{salesEndTime,jdbcType=TIMESTAMP}, ", "#{effectiveDay,jdbcType=INTEGER}, #{effectiveNum,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{salesEndTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ",
"#{opName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
@ -69,6 +71,7 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt {
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER),
@Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL), @Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL), @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
@ -89,9 +92,9 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt {
@Select({ @Select({
"select", "select",
"id, `name`, img, `type`, `condition`, price, percentage, limit_num, effective_day, ", "id, `name`, img, `type`, platform, `condition`, price, percentage, limit_num, ",
"effective_num, sales_end_time, create_time, update_time, op_id, op_name, `status`, ", "effective_day, effective_num, sales_end_time, create_time, update_time, op_id, ",
"ext_1, ext_2, ext_3", "op_name, `status`, ext_1, ext_2, ext_3",
"from coupon_discount", "from coupon_discount",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -100,6 +103,7 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt {
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER),
@Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL), @Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL), @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
@ -132,6 +136,7 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt {
"set `name` = #{name,jdbcType=VARCHAR},", "set `name` = #{name,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},", "img = #{img,jdbcType=VARCHAR},",
"`type` = #{type,jdbcType=INTEGER},", "`type` = #{type,jdbcType=INTEGER},",
"platform = #{platform,jdbcType=INTEGER},",
"`condition` = #{condition,jdbcType=DECIMAL},", "`condition` = #{condition,jdbcType=DECIMAL},",
"price = #{price,jdbcType=DECIMAL},", "price = #{price,jdbcType=DECIMAL},",
"percentage = #{percentage,jdbcType=DECIMAL},", "percentage = #{percentage,jdbcType=DECIMAL},",

@ -40,6 +40,10 @@ public class CouponDiscountSqlProvider {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
} }
if (record.getPlatform() != null) {
sql.VALUES("platform", "#{platform,jdbcType=INTEGER}");
}
if (record.getCondition() != null) { if (record.getCondition() != null) {
sql.VALUES("`condition`", "#{condition,jdbcType=DECIMAL}"); sql.VALUES("`condition`", "#{condition,jdbcType=DECIMAL}");
} }
@ -113,6 +117,7 @@ public class CouponDiscountSqlProvider {
sql.SELECT("`name`"); sql.SELECT("`name`");
sql.SELECT("img"); sql.SELECT("img");
sql.SELECT("`type`"); sql.SELECT("`type`");
sql.SELECT("platform");
sql.SELECT("`condition`"); sql.SELECT("`condition`");
sql.SELECT("price"); sql.SELECT("price");
sql.SELECT("percentage"); sql.SELECT("percentage");
@ -161,6 +166,10 @@ public class CouponDiscountSqlProvider {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
} }
if (record.getPlatform() != null) {
sql.SET("platform = #{record.platform,jdbcType=INTEGER}");
}
if (record.getCondition() != null) { if (record.getCondition() != null) {
sql.SET("`condition` = #{record.condition,jdbcType=DECIMAL}"); sql.SET("`condition` = #{record.condition,jdbcType=DECIMAL}");
} }
@ -233,6 +242,7 @@ public class CouponDiscountSqlProvider {
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}"); sql.SET("img = #{record.img,jdbcType=VARCHAR}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("platform = #{record.platform,jdbcType=INTEGER}");
sql.SET("`condition` = #{record.condition,jdbcType=DECIMAL}"); sql.SET("`condition` = #{record.condition,jdbcType=DECIMAL}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}");
sql.SET("percentage = #{record.percentage,jdbcType=DECIMAL}"); sql.SET("percentage = #{record.percentage,jdbcType=DECIMAL}");
@ -270,6 +280,10 @@ public class CouponDiscountSqlProvider {
sql.SET("`type` = #{type,jdbcType=INTEGER}"); sql.SET("`type` = #{type,jdbcType=INTEGER}");
} }
if (record.getPlatform() != null) {
sql.SET("platform = #{platform,jdbcType=INTEGER}");
}
if (record.getCondition() != null) { if (record.getCondition() != null) {
sql.SET("`condition` = #{condition,jdbcType=DECIMAL}"); sql.SET("`condition` = #{condition,jdbcType=DECIMAL}");
} }

@ -34,6 +34,11 @@ public class CouponDiscount implements Serializable {
*/ */
private Integer type; private Integer type;
/**
* 1普惠GO 2:v家园 3:省直机关
*/
private Integer platform;
/** /**
* 优惠券条件(满减价格) * 优惠券条件(满减价格)
*/ */
@ -134,6 +139,14 @@ public class CouponDiscount implements Serializable {
this.type = type; this.type = type;
} }
public Integer getPlatform() {
return platform;
}
public void setPlatform(Integer platform) {
this.platform = platform;
}
public BigDecimal getCondition() { public BigDecimal getCondition() {
return condition; return condition;
} }
@ -270,6 +283,7 @@ public class CouponDiscount implements Serializable {
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg())) && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform()))
&& (this.getCondition() == null ? other.getCondition() == null : this.getCondition().equals(other.getCondition())) && (this.getCondition() == null ? other.getCondition() == null : this.getCondition().equals(other.getCondition()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getPercentage() == null ? other.getPercentage() == null : this.getPercentage().equals(other.getPercentage())) && (this.getPercentage() == null ? other.getPercentage() == null : this.getPercentage().equals(other.getPercentage()))
@ -295,6 +309,7 @@ public class CouponDiscount implements Serializable {
result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode()); result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode());
result = prime * result + ((getCondition() == null) ? 0 : getCondition().hashCode()); result = prime * result + ((getCondition() == null) ? 0 : getCondition().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getPercentage() == null) ? 0 : getPercentage().hashCode()); result = prime * result + ((getPercentage() == null) ? 0 : getPercentage().hashCode());
@ -323,6 +338,7 @@ public class CouponDiscount implements Serializable {
sb.append(", name=").append(name); sb.append(", name=").append(name);
sb.append(", img=").append(img); sb.append(", img=").append(img);
sb.append(", type=").append(type); sb.append(", type=").append(type);
sb.append(", platform=").append(platform);
sb.append(", condition=").append(condition); sb.append(", condition=").append(condition);
sb.append(", price=").append(price); sb.append(", price=").append(price);
sb.append(", percentage=").append(percentage); sb.append(", percentage=").append(percentage);

@ -386,6 +386,66 @@ public class CouponDiscountExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPlatformIsNull() {
addCriterion("platform is null");
return (Criteria) this;
}
public Criteria andPlatformIsNotNull() {
addCriterion("platform is not null");
return (Criteria) this;
}
public Criteria andPlatformEqualTo(Integer value) {
addCriterion("platform =", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotEqualTo(Integer value) {
addCriterion("platform <>", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformGreaterThan(Integer value) {
addCriterion("platform >", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformGreaterThanOrEqualTo(Integer value) {
addCriterion("platform >=", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformLessThan(Integer value) {
addCriterion("platform <", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformLessThanOrEqualTo(Integer value) {
addCriterion("platform <=", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformIn(List<Integer> values) {
addCriterion("platform in", values, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotIn(List<Integer> values) {
addCriterion("platform not in", values, "platform");
return (Criteria) this;
}
public Criteria andPlatformBetween(Integer value1, Integer value2) {
addCriterion("platform between", value1, value2, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotBetween(Integer value1, Integer value2) {
addCriterion("platform not between", value1, value2, "platform");
return (Criteria) this;
}
public Criteria andConditionIsNull() { public Criteria andConditionIsNull() {
addCriterion("`condition` is null"); addCriterion("`condition` is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save