diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java index 1fde72f..eee9de5 100644 --- a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java @@ -39,18 +39,18 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper int deleteByPrimaryKey(Long id); @Insert({ - "insert into coupon_discount_user_rel (discount_id, discount_name, ", - "discount_img, discount_type, ", - "discount_condition, discount_price, ", - "discount_percentage, user_id, ", - "`status`, use_time, ", + "insert into coupon_discount_user_rel (platform, discount_id, ", + "discount_name, discount_img, ", + "discount_type, discount_condition, ", + "discount_price, discount_percentage, ", + "user_id, `status`, use_time, ", "create_time, use_end_time, ", "ext_1, ext_2, ext_3)", - "values (#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", - "#{discountImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", - "#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", - "#{discountPercentage,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", + "values (#{platform,jdbcType=INTEGER}, #{discountId,jdbcType=BIGINT}, ", + "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ", + "#{discountType,jdbcType=INTEGER}, #{discountCondition,jdbcType=DECIMAL}, ", + "#{discountPrice,jdbcType=DECIMAL}, #{discountPercentage,jdbcType=DECIMAL}, ", + "#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -64,6 +64,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper @SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="selectByExample") @Results({ @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_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -84,7 +85,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper @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, ", "use_end_time, ext_1, ext_2, ext_3", "from coupon_discount_user_rel", @@ -92,6 +93,7 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper }) @Results({ @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_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -121,7 +123,8 @@ public interface CouponDiscountUserRelMapper extends CouponDiscountUserRelMapper @Update({ "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_img = #{discountImg,jdbcType=VARCHAR},", "discount_type = #{discountType,jdbcType=INTEGER},", diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java index ddb65f0..96d9102 100644 --- a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java @@ -28,6 +28,10 @@ public class CouponDiscountUserRelSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("coupon_discount_user_rel"); + if (record.getPlatform() != null) { + sql.VALUES("platform", "#{platform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); } @@ -98,6 +102,7 @@ public class CouponDiscountUserRelSqlProvider { } else { sql.SELECT("id"); } + sql.SELECT("platform"); sql.SELECT("discount_id"); sql.SELECT("discount_name"); sql.SELECT("discount_img"); @@ -134,6 +139,10 @@ public class CouponDiscountUserRelSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{record.platform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); } @@ -203,6 +212,7 @@ public class CouponDiscountUserRelSqlProvider { sql.UPDATE("coupon_discount_user_rel"); 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_name = #{record.discountName,jdbcType=VARCHAR}"); sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); @@ -228,6 +238,10 @@ public class CouponDiscountUserRelSqlProvider { SQL sql = new SQL(); sql.UPDATE("coupon_discount_user_rel"); + if (record.getPlatform() != null) { + sql.SET("platform = #{platform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); } diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java index a47f8a9..502f44a 100644 --- a/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java @@ -19,6 +19,11 @@ public class CouponDiscountUserRel implements Serializable { */ private Long id; + /** + * 1:普惠GO 2:v家园 3:省直机关 + */ + private Integer platform; + /** * 优惠券id */ @@ -95,6 +100,14 @@ public class CouponDiscountUserRel implements Serializable { this.id = id; } + public Integer getPlatform() { + return platform; + } + + public void setPlatform(Integer platform) { + this.platform = platform; + } + public Long getDiscountId() { return discountId; } @@ -228,6 +241,7 @@ public class CouponDiscountUserRel implements Serializable { } CouponDiscountUserRel other = (CouponDiscountUserRel) that; 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.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) && (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) @@ -250,6 +264,7 @@ public class CouponDiscountUserRel implements Serializable { final int prime = 31; int result = 1; 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 + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); @@ -275,6 +290,7 @@ public class CouponDiscountUserRel implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", platform=").append(platform); sb.append(", discountId=").append(discountId); sb.append(", discountName=").append(discountName); sb.append(", discountImg=").append(discountImg); diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java index ce91cd0..cf1b4da 100644 --- a/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java @@ -186,6 +186,66 @@ public class CouponDiscountUserRelExample { 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 values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List 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() { addCriterion("discount_id is null"); return (Criteria) this;