提交代码

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. 32
      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 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, ",
"create_time, consume_time, ",
"use_end_time, qr_code_img, ",
@ -48,7 +49,8 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
"source_id, ext_1, ext_2, ",
"ext_3, ext_4)",
"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}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{consumeTime,jdbcType=TIMESTAMP}, ",
"#{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="coupon_id", property="couponId", 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="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@ -89,7 +92,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@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`, ",
"source_id, ext_1, ext_2, ext_3, ext_4",
"from high_user_coupon",
@ -100,6 +103,7 @@ public interface HighUserCouponMapper extends HighUserCouponMapperExt {
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", 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="child_order_id", property="childOrderId", 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},",
"coupon_id = #{couponId,jdbcType=BIGINT},",
"user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"order_id = #{orderId,jdbcType=BIGINT},",
"child_order_id = #{childOrderId,jdbcType=BIGINT},",
"coupon_code_id = #{couponCodeId,jdbcType=BIGINT},",

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

@ -1,7 +1,5 @@
package com.hai.entity;
import com.hai.model.HighCouponModel;
import java.io.Serializable;
import java.util.Date;
@ -35,6 +33,11 @@ public class HighUserCoupon implements Serializable {
*/
private Long userId;
/**
* 用户手机号
*/
private String userPhone;
/**
* 交易id
*/
@ -81,7 +84,7 @@ public class HighUserCoupon implements Serializable {
private Integer status;
/**
* 来源 1购买 2活动
* 来源 1购买 2活动 3接口
*/
private Integer source;
@ -98,16 +101,6 @@ public class HighUserCoupon implements Serializable {
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;
public Long getId() {
@ -142,6 +135,14 @@ public class HighUserCoupon implements Serializable {
this.userId = userId;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public Long getOrderId() {
return orderId;
}
@ -278,6 +279,7 @@ public class HighUserCoupon implements Serializable {
&& (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
&& (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
&& (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.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId()))
&& (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 + ((getCouponId() == null) ? 0 : getCouponId().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 + ((getChildOrderId() == null) ? 0 : getChildOrderId().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(", couponId=").append(couponId);
sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", orderId=").append(orderId);
sb.append(", childOrderId=").append(childOrderId);
sb.append(", couponCodeId=").append(couponCodeId);
@ -350,4 +354,4 @@ public class HighUserCoupon implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -365,6 +365,76 @@ public class HighUserCouponExample {
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() {
addCriterion("order_id is null");
return (Criteria) this;

Loading…
Cancel
Save