提交代码

new-dev
胡锐 1 year ago
parent c189b4f70f
commit 3a55528375
  1. 11
      hai-service/src/main/java/com/hai/dao/HighUserCouponMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/HighUserCouponSqlProvider.java
  3. 30
      hai-service/src/main/java/com/hai/entity/HighUserCoupon.java
  4. 70
      hai-service/src/main/java/com/hai/entity/HighUserCouponExample.java

@ -40,7 +40,8 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@Insert({ @Insert({
"insert into high_user_coupon (merchant_id, coupon_id, ", "insert into high_user_coupon (merchant_id, coupon_id, ",
"user_id, order_id, child_order_id, ", "user_id, user_phone, ",
"order_id, child_order_id, ",
"coupon_code_id, store_id, ", "coupon_code_id, store_id, ",
"create_time, consume_time, ", "create_time, consume_time, ",
"use_end_time, qr_code_img, ", "use_end_time, qr_code_img, ",
@ -48,7 +49,8 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
"source_id, ext_1, ext_2, ", "source_id, ext_1, ext_2, ",
"ext_3, ext_4)", "ext_3, ext_4)",
"values (#{merchantId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, ", "values (#{merchantId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, ",
"#{userId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ", "#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ",
"#{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ",
"#{couponCodeId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, ", "#{couponCodeId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{consumeTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{consumeTime,jdbcType=TIMESTAMP}, ",
"#{useEndTime,jdbcType=TIMESTAMP}, #{qrCodeImg,jdbcType=VARCHAR}, ", "#{useEndTime,jdbcType=TIMESTAMP}, #{qrCodeImg,jdbcType=VARCHAR}, ",
@ -69,6 +71,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), @Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT), @Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@ -89,7 +92,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@Select({ @Select({
"select", "select",
"id, merchant_id, coupon_id, user_id, order_id, child_order_id, coupon_code_id, ", "id, merchant_id, coupon_id, user_id, user_phone, order_id, child_order_id, coupon_code_id, ",
"store_id, create_time, consume_time, use_end_time, qr_code_img, `status`, `source`, ", "store_id, create_time, consume_time, use_end_time, qr_code_img, `status`, `source`, ",
"source_id, ext_1, ext_2, ext_3, ext_4", "source_id, ext_1, ext_2, ext_3, ext_4",
"from high_user_coupon", "from high_user_coupon",
@ -100,6 +103,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), @Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT), @Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@ -132,6 +136,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
"set merchant_id = #{merchantId,jdbcType=BIGINT},", "set merchant_id = #{merchantId,jdbcType=BIGINT},",
"coupon_id = #{couponId,jdbcType=BIGINT},", "coupon_id = #{couponId,jdbcType=BIGINT},",
"user_id = #{userId,jdbcType=BIGINT},", "user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"order_id = #{orderId,jdbcType=BIGINT},", "order_id = #{orderId,jdbcType=BIGINT},",
"child_order_id = #{childOrderId,jdbcType=BIGINT},", "child_order_id = #{childOrderId,jdbcType=BIGINT},",
"coupon_code_id = #{couponCodeId,jdbcType=BIGINT},", "coupon_code_id = #{couponCodeId,jdbcType=BIGINT},",

@ -40,6 +40,10 @@ public class HighUserCouponSqlProvider {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
} }
if (record.getUserPhone() != null) {
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) { if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
} }
@ -113,6 +117,7 @@ public class HighUserCouponSqlProvider {
sql.SELECT("merchant_id"); sql.SELECT("merchant_id");
sql.SELECT("coupon_id"); sql.SELECT("coupon_id");
sql.SELECT("user_id"); sql.SELECT("user_id");
sql.SELECT("user_phone");
sql.SELECT("order_id"); sql.SELECT("order_id");
sql.SELECT("child_order_id"); sql.SELECT("child_order_id");
sql.SELECT("coupon_code_id"); sql.SELECT("coupon_code_id");
@ -161,6 +166,10 @@ public class HighUserCouponSqlProvider {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
} }
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) { if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
} }
@ -233,6 +242,7 @@ public class HighUserCouponSqlProvider {
sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}"); sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}");
sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}"); sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}");
sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}"); sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}");
@ -270,6 +280,10 @@ public class HighUserCouponSqlProvider {
sql.SET("user_id = #{userId,jdbcType=BIGINT}"); sql.SET("user_id = #{userId,jdbcType=BIGINT}");
} }
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) { if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}"); sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
} }

@ -1,7 +1,5 @@
package com.hai.entity; package com.hai.entity;
import com.hai.model.HighCouponModel;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -35,6 +33,11 @@ public class HighUserCoupon implements Serializable {
*/ */
private Long userId; private Long userId;
/**
* 用户手机号
*/
private String userPhone;
/** /**
* 交易id * 交易id
*/ */
@ -81,7 +84,7 @@ public class HighUserCoupon implements Serializable {
private Integer status; private Integer status;
/** /**
* 来源 1购买 2活动 * 来源 1购买 2活动 3接口
*/ */
private Integer source; private Integer source;
@ -98,16 +101,6 @@ public class HighUserCoupon implements Serializable {
private String ext4; private String ext4;
private HighCouponModel highCouponModel;
public HighCouponModel getHighCouponModel() {
return highCouponModel;
}
public void setHighCouponModel(HighCouponModel highCouponModel) {
this.highCouponModel = highCouponModel;
}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -142,6 +135,14 @@ public class HighUserCoupon implements Serializable {
this.userId = userId; this.userId = userId;
} }
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public Long getOrderId() { public Long getOrderId() {
return orderId; return orderId;
} }
@ -278,6 +279,7 @@ public class HighUserCoupon implements Serializable {
&& (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId())) && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
&& (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId())) && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId()))
&& (this.getCouponCodeId() == null ? other.getCouponCodeId() == null : this.getCouponCodeId().equals(other.getCouponCodeId())) && (this.getCouponCodeId() == null ? other.getCouponCodeId() == null : this.getCouponCodeId().equals(other.getCouponCodeId()))
@ -303,6 +305,7 @@ public class HighUserCoupon implements Serializable {
result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode()); result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode());
result = prime * result + ((getCouponCodeId() == null) ? 0 : getCouponCodeId().hashCode()); result = prime * result + ((getCouponCodeId() == null) ? 0 : getCouponCodeId().hashCode());
@ -331,6 +334,7 @@ public class HighUserCoupon implements Serializable {
sb.append(", merchantId=").append(merchantId); sb.append(", merchantId=").append(merchantId);
sb.append(", couponId=").append(couponId); sb.append(", couponId=").append(couponId);
sb.append(", userId=").append(userId); sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", orderId=").append(orderId); sb.append(", orderId=").append(orderId);
sb.append(", childOrderId=").append(childOrderId); sb.append(", childOrderId=").append(childOrderId);
sb.append(", couponCodeId=").append(couponCodeId); sb.append(", couponCodeId=").append(couponCodeId);

@ -365,6 +365,76 @@ public class HighUserCouponExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserPhoneIsNull() {
addCriterion("user_phone is null");
return (Criteria) this;
}
public Criteria andUserPhoneIsNotNull() {
addCriterion("user_phone is not null");
return (Criteria) this;
}
public Criteria andUserPhoneEqualTo(String value) {
addCriterion("user_phone =", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotEqualTo(String value) {
addCriterion("user_phone <>", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThan(String value) {
addCriterion("user_phone >", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThanOrEqualTo(String value) {
addCriterion("user_phone >=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThan(String value) {
addCriterion("user_phone <", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThanOrEqualTo(String value) {
addCriterion("user_phone <=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLike(String value) {
addCriterion("user_phone like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotLike(String value) {
addCriterion("user_phone not like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneIn(List<String> values) {
addCriterion("user_phone in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotIn(List<String> values) {
addCriterion("user_phone not in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneBetween(String value1, String value2) {
addCriterion("user_phone between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotBetween(String value1, String value2) {
addCriterion("user_phone not between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andOrderIdIsNull() { public Criteria andOrderIdIsNull() {
addCriterion("order_id is null"); addCriterion("order_id is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save