diff --git a/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java index dee2e0d..95feaeb 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java @@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; -import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; @@ -39,16 +38,18 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into bs_order_meituan (order_no, child_order_no, ", - "trade_no, sqt_biz_order_id, ", - "mer_id, mer_name, user_id, ", + "insert into bs_order_meituan (id, order_no, ", + "child_order_no, trade_no, ", + "sqt_biz_order_id, mer_id, ", + "mer_name, user_id, ", "user_phone, first_business_type, ", "second_business_type, ent_id, ", "img, goods_name, ", "trace_id, goods_count, ", "total_price, total_deduction_price, ", "coupon_discount_price, integral_discount_price, ", - "platform_code, pay_real_price, ", + "platform_code, notify_url, ", + "return_url, pay_real_price, ", "ent_pay_amount, business_discount_pay_amount, ", "service_fee_amount, service_price, ", "pay_channel, pay_serial_no, ", @@ -60,16 +61,18 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "finish_time, update_time, ", "exception_status, exception_msg, ", "ext_1, ext_2, ext_3)", - "values (#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ", - "#{tradeNo,jdbcType=VARCHAR}, #{sqtBizOrderId,jdbcType=VARCHAR}, ", - "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", + "values (#{id,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", + "#{childOrderNo,jdbcType=VARCHAR}, #{tradeNo,jdbcType=VARCHAR}, ", + "#{sqtBizOrderId,jdbcType=VARCHAR}, #{merId,jdbcType=BIGINT}, ", + "#{merName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", "#{userPhone,jdbcType=VARCHAR}, #{firstBusinessType,jdbcType=VARCHAR}, ", "#{secondBusinessType,jdbcType=VARCHAR}, #{entId,jdbcType=BIGINT}, ", "#{img,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, ", "#{traceId,jdbcType=VARCHAR}, #{goodsCount,jdbcType=INTEGER}, ", "#{totalPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ", "#{couponDiscountPrice,jdbcType=DECIMAL}, #{integralDiscountPrice,jdbcType=DECIMAL}, ", - "#{platformCode,jdbcType=VARCHAR}, #{payRealPrice,jdbcType=DECIMAL}, ", + "#{platformCode,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, ", + "#{returnUrl,jdbcType=VARCHAR}, #{payRealPrice,jdbcType=DECIMAL}, ", "#{entPayAmount,jdbcType=DECIMAL}, #{businessDiscountPayAmount,jdbcType=DECIMAL}, ", "#{serviceFeeAmount,jdbcType=DECIMAL}, #{servicePrice,jdbcType=DECIMAL}, ", "#{payChannel,jdbcType=INTEGER}, #{paySerialNo,jdbcType=VARCHAR}, ", @@ -82,11 +85,9 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "#{exceptionStatus,jdbcType=BIT}, #{exceptionMsg,jdbcType=VARCHAR}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) - @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsOrderMeituan record); @InsertProvider(type=BsOrderMeituanSqlProvider.class, method="insertSelective") - @Options(useGeneratedKeys=true,keyProperty="id") int insertSelective(BsOrderMeituan record); @SelectProvider(type=BsOrderMeituanSqlProvider.class, method="selectByExample") @@ -112,6 +113,8 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Result(column="coupon_discount_price", property="couponDiscountPrice", jdbcType=JdbcType.DECIMAL), @Result(column="integral_discount_price", property="integralDiscountPrice", jdbcType=JdbcType.DECIMAL), @Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), + @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="return_url", property="returnUrl", jdbcType=JdbcType.VARCHAR), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="ent_pay_amount", property="entPayAmount", jdbcType=JdbcType.DECIMAL), @Result(column="business_discount_pay_amount", property="businessDiscountPayAmount", jdbcType=JdbcType.DECIMAL), @@ -144,11 +147,11 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "id, order_no, child_order_no, trade_no, sqt_biz_order_id, mer_id, mer_name, ", "user_id, user_phone, first_business_type, second_business_type, ent_id, img, ", "goods_name, trace_id, goods_count, total_price, total_deduction_price, coupon_discount_price, ", - "integral_discount_price, platform_code, pay_real_price, ent_pay_amount, business_discount_pay_amount, ", - "service_fee_amount, service_price, pay_channel, pay_serial_no, pay_type, `status`, ", - "meituan_status, staff_info, business_info, trade_expiring_time, create_time, ", - "pay_time, cancel_time, refund_time, finish_time, update_time, exception_status, ", - "exception_msg, ext_1, ext_2, ext_3", + "integral_discount_price, platform_code, notify_url, return_url, pay_real_price, ", + "ent_pay_amount, business_discount_pay_amount, service_fee_amount, service_price, ", + "pay_channel, pay_serial_no, pay_type, `status`, meituan_status, staff_info, ", + "business_info, trade_expiring_time, create_time, pay_time, cancel_time, refund_time, ", + "finish_time, update_time, exception_status, exception_msg, ext_1, ext_2, ext_3", "from bs_order_meituan", "where id = #{id,jdbcType=BIGINT}" }) @@ -174,6 +177,8 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Result(column="coupon_discount_price", property="couponDiscountPrice", jdbcType=JdbcType.DECIMAL), @Result(column="integral_discount_price", property="integralDiscountPrice", jdbcType=JdbcType.DECIMAL), @Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), + @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="return_url", property="returnUrl", jdbcType=JdbcType.VARCHAR), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="ent_pay_amount", property="entPayAmount", jdbcType=JdbcType.DECIMAL), @Result(column="business_discount_pay_amount", property="businessDiscountPayAmount", jdbcType=JdbcType.DECIMAL), @@ -232,6 +237,8 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "coupon_discount_price = #{couponDiscountPrice,jdbcType=DECIMAL},", "integral_discount_price = #{integralDiscountPrice,jdbcType=DECIMAL},", "platform_code = #{platformCode,jdbcType=VARCHAR},", + "notify_url = #{notifyUrl,jdbcType=VARCHAR},", + "return_url = #{returnUrl,jdbcType=VARCHAR},", "pay_real_price = #{payRealPrice,jdbcType=DECIMAL},", "ent_pay_amount = #{entPayAmount,jdbcType=DECIMAL},", "business_discount_pay_amount = #{businessDiscountPayAmount,jdbcType=DECIMAL},", diff --git a/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java index c52c4dd..efc65f5 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java @@ -28,6 +28,10 @@ public class BsOrderMeituanSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("bs_order_meituan"); + if (record.getId() != null) { + sql.VALUES("id", "#{id,jdbcType=BIGINT}"); + } + if (record.getOrderNo() != null) { sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); } @@ -108,6 +112,14 @@ public class BsOrderMeituanSqlProvider { sql.VALUES("platform_code", "#{platformCode,jdbcType=VARCHAR}"); } + if (record.getNotifyUrl() != null) { + sql.VALUES("notify_url", "#{notifyUrl,jdbcType=VARCHAR}"); + } + + if (record.getReturnUrl() != null) { + sql.VALUES("return_url", "#{returnUrl,jdbcType=VARCHAR}"); + } + if (record.getPayRealPrice() != null) { sql.VALUES("pay_real_price", "#{payRealPrice,jdbcType=DECIMAL}"); } @@ -234,6 +246,8 @@ public class BsOrderMeituanSqlProvider { sql.SELECT("coupon_discount_price"); sql.SELECT("integral_discount_price"); sql.SELECT("platform_code"); + sql.SELECT("notify_url"); + sql.SELECT("return_url"); sql.SELECT("pay_real_price"); sql.SELECT("ent_pay_amount"); sql.SELECT("business_discount_pay_amount"); @@ -359,6 +373,14 @@ public class BsOrderMeituanSqlProvider { sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}"); } + if (record.getNotifyUrl() != null) { + sql.SET("notify_url = #{record.notifyUrl,jdbcType=VARCHAR}"); + } + + if (record.getReturnUrl() != null) { + sql.SET("return_url = #{record.returnUrl,jdbcType=VARCHAR}"); + } + if (record.getPayRealPrice() != null) { sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); } @@ -484,6 +506,8 @@ public class BsOrderMeituanSqlProvider { sql.SET("coupon_discount_price = #{record.couponDiscountPrice,jdbcType=DECIMAL}"); sql.SET("integral_discount_price = #{record.integralDiscountPrice,jdbcType=DECIMAL}"); sql.SET("platform_code = #{record.platformCode,jdbcType=VARCHAR}"); + sql.SET("notify_url = #{record.notifyUrl,jdbcType=VARCHAR}"); + sql.SET("return_url = #{record.returnUrl,jdbcType=VARCHAR}"); sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); sql.SET("ent_pay_amount = #{record.entPayAmount,jdbcType=DECIMAL}"); sql.SET("business_discount_pay_amount = #{record.businessDiscountPayAmount,jdbcType=DECIMAL}"); @@ -598,6 +622,14 @@ public class BsOrderMeituanSqlProvider { sql.SET("platform_code = #{platformCode,jdbcType=VARCHAR}"); } + if (record.getNotifyUrl() != null) { + sql.SET("notify_url = #{notifyUrl,jdbcType=VARCHAR}"); + } + + if (record.getReturnUrl() != null) { + sql.SET("return_url = #{returnUrl,jdbcType=VARCHAR}"); + } + if (record.getPayRealPrice() != null) { sql.SET("pay_real_price = #{payRealPrice,jdbcType=DECIMAL}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java b/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java index f896c8e..8f6594b 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java @@ -119,6 +119,16 @@ public class BsOrderMeituan implements Serializable { */ private String platformCode; + /** + * 支付成功通知地址:客户平台支付成功时,后台发 POST 请求,通知美团企业版支付成功的调用地址 + */ + private String notifyUrl; + + /** + * 支付成功跳转地址:客户平台支付成功时,前端重定向地址,通常是订单详情页 + */ + private String returnUrl; + /** * 实付金额 */ @@ -404,6 +414,22 @@ public class BsOrderMeituan implements Serializable { this.platformCode = platformCode; } + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + public String getReturnUrl() { + return returnUrl; + } + + public void setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + } + public BigDecimal getPayRealPrice() { return payRealPrice; } @@ -629,6 +655,8 @@ public class BsOrderMeituan implements Serializable { && (this.getCouponDiscountPrice() == null ? other.getCouponDiscountPrice() == null : this.getCouponDiscountPrice().equals(other.getCouponDiscountPrice())) && (this.getIntegralDiscountPrice() == null ? other.getIntegralDiscountPrice() == null : this.getIntegralDiscountPrice().equals(other.getIntegralDiscountPrice())) && (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode())) + && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) + && (this.getReturnUrl() == null ? other.getReturnUrl() == null : this.getReturnUrl().equals(other.getReturnUrl())) && (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice())) && (this.getEntPayAmount() == null ? other.getEntPayAmount() == null : this.getEntPayAmount().equals(other.getEntPayAmount())) && (this.getBusinessDiscountPayAmount() == null ? other.getBusinessDiscountPayAmount() == null : this.getBusinessDiscountPayAmount().equals(other.getBusinessDiscountPayAmount())) @@ -680,6 +708,8 @@ public class BsOrderMeituan implements Serializable { result = prime * result + ((getCouponDiscountPrice() == null) ? 0 : getCouponDiscountPrice().hashCode()); result = prime * result + ((getIntegralDiscountPrice() == null) ? 0 : getIntegralDiscountPrice().hashCode()); result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode()); + result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); + result = prime * result + ((getReturnUrl() == null) ? 0 : getReturnUrl().hashCode()); result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode()); result = prime * result + ((getEntPayAmount() == null) ? 0 : getEntPayAmount().hashCode()); result = prime * result + ((getBusinessDiscountPayAmount() == null) ? 0 : getBusinessDiscountPayAmount().hashCode()); @@ -734,6 +764,8 @@ public class BsOrderMeituan implements Serializable { sb.append(", couponDiscountPrice=").append(couponDiscountPrice); sb.append(", integralDiscountPrice=").append(integralDiscountPrice); sb.append(", platformCode=").append(platformCode); + sb.append(", notifyUrl=").append(notifyUrl); + sb.append(", returnUrl=").append(returnUrl); sb.append(", payRealPrice=").append(payRealPrice); sb.append(", entPayAmount=").append(entPayAmount); sb.append(", businessDiscountPayAmount=").append(businessDiscountPayAmount); diff --git a/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java b/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java index 3d774f0..e92cfb4 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java @@ -1506,6 +1506,146 @@ public class BsOrderMeituanExample { return (Criteria) this; } + public Criteria andNotifyUrlIsNull() { + addCriterion("notify_url is null"); + return (Criteria) this; + } + + public Criteria andNotifyUrlIsNotNull() { + addCriterion("notify_url is not null"); + return (Criteria) this; + } + + public Criteria andNotifyUrlEqualTo(String value) { + addCriterion("notify_url =", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlNotEqualTo(String value) { + addCriterion("notify_url <>", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlGreaterThan(String value) { + addCriterion("notify_url >", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlGreaterThanOrEqualTo(String value) { + addCriterion("notify_url >=", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlLessThan(String value) { + addCriterion("notify_url <", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlLessThanOrEqualTo(String value) { + addCriterion("notify_url <=", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlLike(String value) { + addCriterion("notify_url like", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlNotLike(String value) { + addCriterion("notify_url not like", value, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlIn(List values) { + addCriterion("notify_url in", values, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlNotIn(List values) { + addCriterion("notify_url not in", values, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlBetween(String value1, String value2) { + addCriterion("notify_url between", value1, value2, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andNotifyUrlNotBetween(String value1, String value2) { + addCriterion("notify_url not between", value1, value2, "notifyUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlIsNull() { + addCriterion("return_url is null"); + return (Criteria) this; + } + + public Criteria andReturnUrlIsNotNull() { + addCriterion("return_url is not null"); + return (Criteria) this; + } + + public Criteria andReturnUrlEqualTo(String value) { + addCriterion("return_url =", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlNotEqualTo(String value) { + addCriterion("return_url <>", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlGreaterThan(String value) { + addCriterion("return_url >", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlGreaterThanOrEqualTo(String value) { + addCriterion("return_url >=", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlLessThan(String value) { + addCriterion("return_url <", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlLessThanOrEqualTo(String value) { + addCriterion("return_url <=", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlLike(String value) { + addCriterion("return_url like", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlNotLike(String value) { + addCriterion("return_url not like", value, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlIn(List values) { + addCriterion("return_url in", values, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlNotIn(List values) { + addCriterion("return_url not in", values, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlBetween(String value1, String value2) { + addCriterion("return_url between", value1, value2, "returnUrl"); + return (Criteria) this; + } + + public Criteria andReturnUrlNotBetween(String value1, String value2) { + addCriterion("return_url not between", value1, value2, "returnUrl"); + return (Criteria) this; + } + public Criteria andPayRealPriceIsNull() { addCriterion("pay_real_price is null"); return (Criteria) this;