From 9af1a877532831f194001f91b2b99376a343831b Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 29 Nov 2021 11:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/HighCouponPackageDetailsMapper.java | 25 ++++--- .../HighCouponPackageDetailsSqlProvider.java | 14 ++++ .../hai/entity/HighCouponPackageDetails.java | 16 +++++ .../HighCouponPackageDetailsExample.java | 70 +++++++++++++++++++ 4 files changed, 115 insertions(+), 10 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsMapper.java b/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsMapper.java index 4804bc0b..920af11c 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsMapper.java @@ -40,15 +40,17 @@ public interface HighCouponPackageDetailsMapper extends HighCouponPackageDetails @Insert({ "insert into high_coupon_package_details (coupon_package_id, coupon_id, ", - "num, created_user_id, ", - "created_time, updated_user_id, ", - "updated_time, `status`, ", - "ext_1, ext_2, ext_3)", + "coupon_name, num, ", + "created_user_id, created_time, ", + "updated_user_id, updated_time, ", + "`status`, ext_1, ext_2, ", + "ext_3)", "values (#{couponPackageId,jdbcType=INTEGER}, #{couponId,jdbcType=INTEGER}, ", - "#{num,jdbcType=INTEGER}, #{createdUserId,jdbcType=INTEGER}, ", - "#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=INTEGER}, ", - "#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{couponName,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, ", + "#{createdUserId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, ", + "#{updatedUserId,jdbcType=INTEGER}, #{updatedTime,jdbcType=TIMESTAMP}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighCouponPackageDetails record); @@ -62,6 +64,7 @@ public interface HighCouponPackageDetailsMapper extends HighCouponPackageDetails @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="coupon_package_id", property="couponPackageId", jdbcType=JdbcType.INTEGER), @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.INTEGER), + @Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), @@ -76,8 +79,8 @@ public interface HighCouponPackageDetailsMapper extends HighCouponPackageDetails @Select({ "select", - "id, coupon_package_id, coupon_id, num, created_user_id, created_time, updated_user_id, ", - "updated_time, `status`, ext_1, ext_2, ext_3", + "id, coupon_package_id, coupon_id, coupon_name, num, created_user_id, created_time, ", + "updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3", "from high_coupon_package_details", "where id = #{id,jdbcType=INTEGER}" }) @@ -85,6 +88,7 @@ public interface HighCouponPackageDetailsMapper extends HighCouponPackageDetails @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="coupon_package_id", property="couponPackageId", jdbcType=JdbcType.INTEGER), @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.INTEGER), + @Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), @@ -110,6 +114,7 @@ public interface HighCouponPackageDetailsMapper extends HighCouponPackageDetails "update high_coupon_package_details", "set coupon_package_id = #{couponPackageId,jdbcType=INTEGER},", "coupon_id = #{couponId,jdbcType=INTEGER},", + "coupon_name = #{couponName,jdbcType=VARCHAR},", "num = #{num,jdbcType=INTEGER},", "created_user_id = #{createdUserId,jdbcType=INTEGER},", "created_time = #{createdTime,jdbcType=TIMESTAMP},", diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsSqlProvider.java index badc9777..4c404bbd 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponPackageDetailsSqlProvider.java @@ -36,6 +36,10 @@ public class HighCouponPackageDetailsSqlProvider { sql.VALUES("coupon_id", "#{couponId,jdbcType=INTEGER}"); } + if (record.getCouponName() != null) { + sql.VALUES("coupon_name", "#{couponName,jdbcType=VARCHAR}"); + } + if (record.getNum() != null) { sql.VALUES("num", "#{num,jdbcType=INTEGER}"); } @@ -84,6 +88,7 @@ public class HighCouponPackageDetailsSqlProvider { } sql.SELECT("coupon_package_id"); sql.SELECT("coupon_id"); + sql.SELECT("coupon_name"); sql.SELECT("num"); sql.SELECT("created_user_id"); sql.SELECT("created_time"); @@ -122,6 +127,10 @@ public class HighCouponPackageDetailsSqlProvider { sql.SET("coupon_id = #{record.couponId,jdbcType=INTEGER}"); } + if (record.getCouponName() != null) { + sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}"); + } + if (record.getNum() != null) { sql.SET("num = #{record.num,jdbcType=INTEGER}"); } @@ -169,6 +178,7 @@ public class HighCouponPackageDetailsSqlProvider { sql.SET("id = #{record.id,jdbcType=INTEGER}"); sql.SET("coupon_package_id = #{record.couponPackageId,jdbcType=INTEGER}"); sql.SET("coupon_id = #{record.couponId,jdbcType=INTEGER}"); + sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}"); sql.SET("num = #{record.num,jdbcType=INTEGER}"); sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); @@ -196,6 +206,10 @@ public class HighCouponPackageDetailsSqlProvider { sql.SET("coupon_id = #{couponId,jdbcType=INTEGER}"); } + if (record.getCouponName() != null) { + sql.SET("coupon_name = #{couponName,jdbcType=VARCHAR}"); + } + if (record.getNum() != null) { sql.SET("num = #{num,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetails.java b/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetails.java index 92569733..f6b20738 100644 --- a/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetails.java +++ b/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetails.java @@ -28,6 +28,11 @@ public class HighCouponPackageDetails implements Serializable { */ private Integer couponId; + /** + * 优惠券名称 + */ + private String couponName; + /** * 数量 */ @@ -99,6 +104,14 @@ public class HighCouponPackageDetails implements Serializable { this.couponId = couponId; } + public String getCouponName() { + return couponName; + } + + public void setCouponName(String couponName) { + this.couponName = couponName; + } + public Integer getNum() { return num; } @@ -186,6 +199,7 @@ public class HighCouponPackageDetails implements Serializable { return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getCouponPackageId() == null ? other.getCouponPackageId() == null : this.getCouponPackageId().equals(other.getCouponPackageId())) && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId())) + && (this.getCouponName() == null ? other.getCouponName() == null : this.getCouponName().equals(other.getCouponName())) && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) && (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) @@ -204,6 +218,7 @@ public class HighCouponPackageDetails implements Serializable { result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getCouponPackageId() == null) ? 0 : getCouponPackageId().hashCode()); result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); + result = prime * result + ((getCouponName() == null) ? 0 : getCouponName().hashCode()); result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode()); result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); @@ -225,6 +240,7 @@ public class HighCouponPackageDetails implements Serializable { sb.append(", id=").append(id); sb.append(", couponPackageId=").append(couponPackageId); sb.append(", couponId=").append(couponId); + sb.append(", couponName=").append(couponName); sb.append(", num=").append(num); sb.append(", createdUserId=").append(createdUserId); sb.append(", createdTime=").append(createdTime); diff --git a/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetailsExample.java b/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetailsExample.java index 7a98e65c..eeca2f33 100644 --- a/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetailsExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighCouponPackageDetailsExample.java @@ -305,6 +305,76 @@ public class HighCouponPackageDetailsExample { return (Criteria) this; } + public Criteria andCouponNameIsNull() { + addCriterion("coupon_name is null"); + return (Criteria) this; + } + + public Criteria andCouponNameIsNotNull() { + addCriterion("coupon_name is not null"); + return (Criteria) this; + } + + public Criteria andCouponNameEqualTo(String value) { + addCriterion("coupon_name =", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotEqualTo(String value) { + addCriterion("coupon_name <>", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameGreaterThan(String value) { + addCriterion("coupon_name >", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameGreaterThanOrEqualTo(String value) { + addCriterion("coupon_name >=", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLessThan(String value) { + addCriterion("coupon_name <", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLessThanOrEqualTo(String value) { + addCriterion("coupon_name <=", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLike(String value) { + addCriterion("coupon_name like", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotLike(String value) { + addCriterion("coupon_name not like", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameIn(List values) { + addCriterion("coupon_name in", values, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotIn(List values) { + addCriterion("coupon_name not in", values, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameBetween(String value1, String value2) { + addCriterion("coupon_name between", value1, value2, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotBetween(String value1, String value2) { + addCriterion("coupon_name not between", value1, value2, "couponName"); + return (Criteria) this; + } + public Criteria andNumIsNull() { addCriterion("num is null"); return (Criteria) this;