袁野 4 months ago committed by yuanye
parent 198b89db40
commit 1100bb7cec
  1. 27
      service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java
  2. 14
      service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java
  3. 16
      service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java
  4. 60
      service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java

@ -39,18 +39,18 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into coupon_discount_user_rel (discount_id, discount_name, ", "insert into coupon_discount_user_rel (platform, discount_id, ",
"discount_img, discount_type, ", "discount_name, discount_img, ",
"discount_condition, discount_price, ", "discount_type, discount_condition, ",
"discount_percentage, user_id, ", "discount_price, discount_percentage, ",
"`status`, use_time, ", "user_id, `status`, use_time, ",
"create_time, use_end_time, ", "create_time, use_end_time, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", "values (#{platform,jdbcType=INTEGER}, #{discountId,jdbcType=BIGINT}, ",
"#{discountImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ",
"#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", "#{discountType,jdbcType=INTEGER}, #{discountCondition,jdbcType=DECIMAL}, ",
"#{discountPercentage,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT}, ", "#{discountPrice,jdbcType=DECIMAL}, #{discountPercentage,jdbcType=DECIMAL}, ",
"#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", "#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@ -64,6 +64,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper
@SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="selectByExample") @SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER),
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT),
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR),
@ -84,7 +85,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper
@Select({ @Select({
"select", "select",
"id, discount_id, discount_name, discount_img, discount_type, discount_condition, ", "id, platform, discount_id, discount_name, discount_img, discount_type, discount_condition, ",
"discount_price, discount_percentage, user_id, `status`, use_time, create_time, ", "discount_price, discount_percentage, user_id, `status`, use_time, create_time, ",
"use_end_time, ext_1, ext_2, ext_3", "use_end_time, ext_1, ext_2, ext_3",
"from coupon_discount_user_rel", "from coupon_discount_user_rel",
@ -92,6 +93,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER),
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT),
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR),
@ -121,7 +123,8 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper
@Update({ @Update({
"update coupon_discount_user_rel", "update coupon_discount_user_rel",
"set discount_id = #{discountId,jdbcType=BIGINT},", "set platform = #{platform,jdbcType=INTEGER},",
"discount_id = #{discountId,jdbcType=BIGINT},",
"discount_name = #{discountName,jdbcType=VARCHAR},", "discount_name = #{discountName,jdbcType=VARCHAR},",
"discount_img = #{discountImg,jdbcType=VARCHAR},", "discount_img = #{discountImg,jdbcType=VARCHAR},",
"discount_type = #{discountType,jdbcType=INTEGER},", "discount_type = #{discountType,jdbcType=INTEGER},",

@ -28,6 +28,10 @@ public class CouponDiscountUserRelSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("coupon_discount_user_rel"); sql.INSERT_INTO("coupon_discount_user_rel");
if (record.getPlatform() != null) {
sql.VALUES("platform", "#{platform,jdbcType=INTEGER}");
}
if (record.getDiscountId() != null) { if (record.getDiscountId() != null) {
sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}");
} }
@ -98,6 +102,7 @@ public class CouponDiscountUserRelSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("platform");
sql.SELECT("discount_id"); sql.SELECT("discount_id");
sql.SELECT("discount_name"); sql.SELECT("discount_name");
sql.SELECT("discount_img"); sql.SELECT("discount_img");
@ -134,6 +139,10 @@ public class CouponDiscountUserRelSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
} }
if (record.getPlatform() != null) {
sql.SET("platform = #{record.platform,jdbcType=INTEGER}");
}
if (record.getDiscountId() != null) { if (record.getDiscountId() != null) {
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}");
} }
@ -203,6 +212,7 @@ public class CouponDiscountUserRelSqlProvider {
sql.UPDATE("coupon_discount_user_rel"); sql.UPDATE("coupon_discount_user_rel");
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("platform = #{record.platform,jdbcType=INTEGER}");
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}");
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}");
sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}");
@ -228,6 +238,10 @@ public class CouponDiscountUserRelSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("coupon_discount_user_rel"); sql.UPDATE("coupon_discount_user_rel");
if (record.getPlatform() != null) {
sql.SET("platform = #{platform,jdbcType=INTEGER}");
}
if (record.getDiscountId() != null) { if (record.getDiscountId() != null) {
sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); sql.SET("discount_id = #{discountId,jdbcType=BIGINT}");
} }

@ -19,6 +19,11 @@ public class CouponDiscountUserRel implements Serializable {
*/ */
private Long id; private Long id;
/**
* 1普惠GO 2:v家园 3:省直机关
*/
private Integer platform;
/** /**
* 优惠券id * 优惠券id
*/ */
@ -95,6 +100,14 @@ public class CouponDiscountUserRel implements Serializable {
this.id = id; this.id = id;
} }
public Integer getPlatform() {
return platform;
}
public void setPlatform(Integer platform) {
this.platform = platform;
}
public Long getDiscountId() { public Long getDiscountId() {
return discountId; return discountId;
} }
@ -228,6 +241,7 @@ public class CouponDiscountUserRel implements Serializable {
} }
CouponDiscountUserRel other = (CouponDiscountUserRel) that; CouponDiscountUserRel other = (CouponDiscountUserRel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform()))
&& (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId()))
&& (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) && (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName()))
&& (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) && (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg()))
@ -250,6 +264,7 @@ public class CouponDiscountUserRel implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode());
result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode());
result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode());
result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode());
@ -275,6 +290,7 @@ public class CouponDiscountUserRel implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", platform=").append(platform);
sb.append(", discountId=").append(discountId); sb.append(", discountId=").append(discountId);
sb.append(", discountName=").append(discountName); sb.append(", discountName=").append(discountName);
sb.append(", discountImg=").append(discountImg); sb.append(", discountImg=").append(discountImg);

@ -186,6 +186,66 @@ public class CouponDiscountUserRelExample {
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 andDiscountIdIsNull() { public Criteria andDiscountIdIsNull() {
addCriterion("discount_id is null"); addCriterion("discount_id is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save