From d12bef55c3a447ac66adf86b21c5641f41b2f637 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 27 Dec 2022 10:43:04 +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 --- .../java/com/hai/dao/HighCouponMapper.java | 17 ++++-- .../com/hai/dao/HighCouponSqlProvider.java | 14 +++++ .../main/java/com/hai/entity/HighCoupon.java | 28 ++++++--- .../com/hai/entity/HighCouponExample.java | 60 +++++++++++++++++++ 4 files changed, 106 insertions(+), 13 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java b/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java index 4cecde28..088f9a98 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java @@ -53,7 +53,8 @@ public interface HighCouponMapper extends HighCouponMapperExt { "ext_3, `status`, display_area, ", "coupon_source, distributor, ", "goods_type_id, brand_id, ", - "reserve_status, buy_points)", + "reserve_status, buy_points, ", + "where_post)", "values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ", "#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ", "#{couponPrice,jdbcType=DECIMAL}, #{couponImg,jdbcType=VARCHAR}, ", @@ -68,7 +69,8 @@ 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}, #{buyPoints,jdbcType=BIT})" + "#{reserveStatus,jdbcType=BIT}, #{buyPoints,jdbcType=BIT}, ", + "#{wherePost,jdbcType=BIT})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighCoupon record); @@ -111,7 +113,8 @@ public interface HighCouponMapper extends HighCouponMapperExt { @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="buy_points", property="buyPoints", jdbcType=JdbcType.BIT) + @Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT), + @Result(column="where_post", property="wherePost", jdbcType=JdbcType.BIT) }) List selectByExample(HighCouponExample example); @@ -122,7 +125,7 @@ public interface HighCouponMapper extends HighCouponMapperExt { "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, ", - "buy_points", + "buy_points, where_post", "from high_coupon", "where id = #{id,jdbcType=BIGINT}" }) @@ -159,7 +162,8 @@ public interface HighCouponMapper extends HighCouponMapperExt { @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="buy_points", property="buyPoints", jdbcType=JdbcType.BIT) + @Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT), + @Result(column="where_post", property="wherePost", jdbcType=JdbcType.BIT) }) HighCoupon selectByPrimaryKey(Long id); @@ -205,7 +209,8 @@ public interface HighCouponMapper extends HighCouponMapperExt { "goods_type_id = #{goodsTypeId,jdbcType=INTEGER},", "brand_id = #{brandId,jdbcType=INTEGER},", "reserve_status = #{reserveStatus,jdbcType=BIT},", - "buy_points = #{buyPoints,jdbcType=BIT}", + "buy_points = #{buyPoints,jdbcType=BIT},", + "where_post = #{wherePost,jdbcType=BIT}", "where id = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(HighCoupon record); diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java index 83d79571..64b75c2f 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java @@ -156,6 +156,10 @@ public class HighCouponSqlProvider { sql.VALUES("buy_points", "#{buyPoints,jdbcType=BIT}"); } + if (record.getWherePost() != null) { + sql.VALUES("where_post", "#{wherePost,jdbcType=BIT}"); + } + return sql.toString(); } @@ -198,6 +202,7 @@ public class HighCouponSqlProvider { sql.SELECT("brand_id"); sql.SELECT("reserve_status"); sql.SELECT("buy_points"); + sql.SELECT("where_post"); sql.FROM("high_coupon"); applyWhere(sql, example, false); @@ -347,6 +352,10 @@ public class HighCouponSqlProvider { sql.SET("buy_points = #{record.buyPoints,jdbcType=BIT}"); } + if (record.getWherePost() != null) { + sql.SET("where_post = #{record.wherePost,jdbcType=BIT}"); + } + applyWhere(sql, example, true); return sql.toString(); } @@ -388,6 +397,7 @@ public class HighCouponSqlProvider { sql.SET("brand_id = #{record.brandId,jdbcType=INTEGER}"); sql.SET("reserve_status = #{record.reserveStatus,jdbcType=BIT}"); sql.SET("buy_points = #{record.buyPoints,jdbcType=BIT}"); + sql.SET("where_post = #{record.wherePost,jdbcType=BIT}"); HighCouponExample example = (HighCouponExample) parameter.get("example"); applyWhere(sql, example, true); @@ -526,6 +536,10 @@ public class HighCouponSqlProvider { sql.SET("buy_points = #{buyPoints,jdbcType=BIT}"); } + if (record.getWherePost() != null) { + sql.SET("where_post = #{wherePost,jdbcType=BIT}"); + } + sql.WHERE("id = #{id,jdbcType=BIGINT}"); return sql.toString(); diff --git a/hai-service/src/main/java/com/hai/entity/HighCoupon.java b/hai-service/src/main/java/com/hai/entity/HighCoupon.java index d1906054..41e00dc2 100644 --- a/hai-service/src/main/java/com/hai/entity/HighCoupon.java +++ b/hai-service/src/main/java/com/hai/entity/HighCoupon.java @@ -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.金币支付 3. 银联支付 4. 汇联通支付 + * 支付类型: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. 优选商品 5. 贵州工会卡专区 + * 1.赠券专区 2.金币专区 。3 。银联专区 4. 优选商品 5.工会卡专区 */ private Integer displayArea; @@ -172,6 +170,11 @@ public class HighCoupon extends HighCouponModel implements Serializable { */ private Boolean buyPoints; + /** + * 是否邮递 + */ + private Boolean wherePost; + private static final long serialVersionUID = 1L; public Long getId() { @@ -438,6 +441,14 @@ public class HighCoupon extends HighCouponModel implements Serializable { this.buyPoints = buyPoints; } + public Boolean getWherePost() { + return wherePost; + } + + public void setWherePost(Boolean wherePost) { + this.wherePost = wherePost; + } + @Override public boolean equals(Object that) { if (this == that) { @@ -482,7 +493,8 @@ public class HighCoupon extends HighCouponModel implements Serializable { && (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.getBuyPoints() == null ? other.getBuyPoints() == null : this.getBuyPoints().equals(other.getBuyPoints())); + && (this.getBuyPoints() == null ? other.getBuyPoints() == null : this.getBuyPoints().equals(other.getBuyPoints())) + && (this.getWherePost() == null ? other.getWherePost() == null : this.getWherePost().equals(other.getWherePost())); } @Override @@ -522,6 +534,7 @@ public class HighCoupon extends HighCouponModel implements Serializable { result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode()); result = prime * result + ((getReserveStatus() == null) ? 0 : getReserveStatus().hashCode()); result = prime * result + ((getBuyPoints() == null) ? 0 : getBuyPoints().hashCode()); + result = prime * result + ((getWherePost() == null) ? 0 : getWherePost().hashCode()); return result; } @@ -564,8 +577,9 @@ public class HighCoupon extends HighCouponModel implements Serializable { sb.append(", brandId=").append(brandId); sb.append(", reserveStatus=").append(reserveStatus); sb.append(", buyPoints=").append(buyPoints); + sb.append(", wherePost=").append(wherePost); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } -} +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighCouponExample.java b/hai-service/src/main/java/com/hai/entity/HighCouponExample.java index c1faaf60..a8a0ff7f 100644 --- a/hai-service/src/main/java/com/hai/entity/HighCouponExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighCouponExample.java @@ -2195,6 +2195,66 @@ public class HighCouponExample { addCriterion("buy_points not between", value1, value2, "buyPoints"); return (Criteria) this; } + + public Criteria andWherePostIsNull() { + addCriterion("where_post is null"); + return (Criteria) this; + } + + public Criteria andWherePostIsNotNull() { + addCriterion("where_post is not null"); + return (Criteria) this; + } + + public Criteria andWherePostEqualTo(Boolean value) { + addCriterion("where_post =", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostNotEqualTo(Boolean value) { + addCriterion("where_post <>", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostGreaterThan(Boolean value) { + addCriterion("where_post >", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostGreaterThanOrEqualTo(Boolean value) { + addCriterion("where_post >=", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostLessThan(Boolean value) { + addCriterion("where_post <", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostLessThanOrEqualTo(Boolean value) { + addCriterion("where_post <=", value, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostIn(List values) { + addCriterion("where_post in", values, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostNotIn(List values) { + addCriterion("where_post not in", values, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostBetween(Boolean value1, Boolean value2) { + addCriterion("where_post between", value1, value2, "wherePost"); + return (Criteria) this; + } + + public Criteria andWherePostNotBetween(Boolean value1, Boolean value2) { + addCriterion("where_post not between", value1, value2, "wherePost"); + return (Criteria) this; + } } /**