diff --git a/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java index d602131..5e0d76a 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderMeituanMapper.java @@ -40,8 +40,9 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Insert({ "insert into bs_order_meituan (order_no, child_order_no, ", - "trade_no, sqt_biz_order_id, ", - "mer_id, mer_name, user_id, ", + "trade_no, third_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, ", @@ -63,8 +64,9 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "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}, ", + "#{tradeNo,jdbcType=VARCHAR}, #{thirdTradeNo,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}, ", @@ -99,6 +101,7 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="trade_no", property="tradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="third_trade_no", property="thirdTradeNo", jdbcType=JdbcType.VARCHAR), @Result(column="sqt_biz_order_id", property="sqtBizOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -148,15 +151,15 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Select({ "select", - "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, notify_url, return_url, pay_real_price, ", - "ent_pay_amount, trade_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", + "id, order_no, child_order_no, trade_no, third_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, notify_url, return_url, ", + "pay_real_price, ent_pay_amount, trade_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}" }) @@ -165,6 +168,7 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="trade_no", property="tradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="third_trade_no", property="thirdTradeNo", jdbcType=JdbcType.VARCHAR), @Result(column="sqt_biz_order_id", property="sqtBizOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -226,6 +230,7 @@ public interface BsOrderMeituanMapper extends BsOrderMeituanMapperExt { "set order_no = #{orderNo,jdbcType=VARCHAR},", "child_order_no = #{childOrderNo,jdbcType=VARCHAR},", "trade_no = #{tradeNo,jdbcType=VARCHAR},", + "third_trade_no = #{thirdTradeNo,jdbcType=VARCHAR},", "sqt_biz_order_id = #{sqtBizOrderId,jdbcType=VARCHAR},", "mer_id = #{merId,jdbcType=BIGINT},", "mer_name = #{merName,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java index 5ff8fa9..f7a8fda 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderMeituanSqlProvider.java @@ -40,6 +40,10 @@ public class BsOrderMeituanSqlProvider { sql.VALUES("trade_no", "#{tradeNo,jdbcType=VARCHAR}"); } + if (record.getThirdTradeNo() != null) { + sql.VALUES("third_trade_no", "#{thirdTradeNo,jdbcType=VARCHAR}"); + } + if (record.getSqtBizOrderId() != null) { sql.VALUES("sqt_biz_order_id", "#{sqtBizOrderId,jdbcType=VARCHAR}"); } @@ -229,6 +233,7 @@ public class BsOrderMeituanSqlProvider { sql.SELECT("order_no"); sql.SELECT("child_order_no"); sql.SELECT("trade_no"); + sql.SELECT("third_trade_no"); sql.SELECT("sqt_biz_order_id"); sql.SELECT("mer_id"); sql.SELECT("mer_name"); @@ -306,6 +311,10 @@ public class BsOrderMeituanSqlProvider { sql.SET("trade_no = #{record.tradeNo,jdbcType=VARCHAR}"); } + if (record.getThirdTradeNo() != null) { + sql.SET("third_trade_no = #{record.thirdTradeNo,jdbcType=VARCHAR}"); + } + if (record.getSqtBizOrderId() != null) { sql.SET("sqt_biz_order_id = #{record.sqtBizOrderId,jdbcType=VARCHAR}"); } @@ -494,6 +503,7 @@ public class BsOrderMeituanSqlProvider { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}"); sql.SET("trade_no = #{record.tradeNo,jdbcType=VARCHAR}"); + sql.SET("third_trade_no = #{record.thirdTradeNo,jdbcType=VARCHAR}"); sql.SET("sqt_biz_order_id = #{record.sqtBizOrderId,jdbcType=VARCHAR}"); sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); @@ -560,6 +570,10 @@ public class BsOrderMeituanSqlProvider { sql.SET("trade_no = #{tradeNo,jdbcType=VARCHAR}"); } + if (record.getThirdTradeNo() != null) { + sql.SET("third_trade_no = #{thirdTradeNo,jdbcType=VARCHAR}"); + } + if (record.getSqtBizOrderId() != null) { sql.SET("sqt_biz_order_id = #{sqtBizOrderId,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java b/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java index a2ef03c..87e526d 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderMeituan.java @@ -34,6 +34,11 @@ public class BsOrderMeituan implements Serializable { */ private String tradeNo; + /** + * 业务交易号,每笔支付的唯一标识,需要以此字段做幂等处理 + */ + private String thirdTradeNo; + /** * 美团企业版订单号 */ @@ -175,7 +180,13 @@ public class BsOrderMeituan implements Serializable { private Integer payType; /** - * 1:待发货 2:已发货 3:配送中 4:已送达 5:已取消 6:退货中 7:已退货 8:待支付 0:删除 + * 订单状态: +1. 待支付 +2. 已支付 +3. 已完成 +4. 已退款 +5. 已取消 +6. 退款中 */ private Integer status; @@ -283,6 +294,14 @@ public class BsOrderMeituan implements Serializable { this.tradeNo = tradeNo; } + public String getThirdTradeNo() { + return thirdTradeNo; + } + + public void setThirdTradeNo(String thirdTradeNo) { + this.thirdTradeNo = thirdTradeNo; + } + public String getSqtBizOrderId() { return sqtBizOrderId; } @@ -651,6 +670,7 @@ public class BsOrderMeituan implements Serializable { && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo())) && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo())) + && (this.getThirdTradeNo() == null ? other.getThirdTradeNo() == null : this.getThirdTradeNo().equals(other.getThirdTradeNo())) && (this.getSqtBizOrderId() == null ? other.getSqtBizOrderId() == null : this.getSqtBizOrderId().equals(other.getSqtBizOrderId())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) @@ -705,6 +725,7 @@ public class BsOrderMeituan implements Serializable { result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode()); result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode()); + result = prime * result + ((getThirdTradeNo() == null) ? 0 : getThirdTradeNo().hashCode()); result = prime * result + ((getSqtBizOrderId() == null) ? 0 : getSqtBizOrderId().hashCode()); result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); @@ -762,6 +783,7 @@ public class BsOrderMeituan implements Serializable { sb.append(", orderNo=").append(orderNo); sb.append(", childOrderNo=").append(childOrderNo); sb.append(", tradeNo=").append(tradeNo); + sb.append(", thirdTradeNo=").append(thirdTradeNo); sb.append(", sqtBizOrderId=").append(sqtBizOrderId); sb.append(", merId=").append(merId); sb.append(", merName=").append(merName); diff --git a/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java b/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java index 9ea99aa..d8f94c2 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderMeituanExample.java @@ -396,6 +396,76 @@ public class BsOrderMeituanExample { return (Criteria) this; } + public Criteria andThirdTradeNoIsNull() { + addCriterion("third_trade_no is null"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoIsNotNull() { + addCriterion("third_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoEqualTo(String value) { + addCriterion("third_trade_no =", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoNotEqualTo(String value) { + addCriterion("third_trade_no <>", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoGreaterThan(String value) { + addCriterion("third_trade_no >", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("third_trade_no >=", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoLessThan(String value) { + addCriterion("third_trade_no <", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoLessThanOrEqualTo(String value) { + addCriterion("third_trade_no <=", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoLike(String value) { + addCriterion("third_trade_no like", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoNotLike(String value) { + addCriterion("third_trade_no not like", value, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoIn(List values) { + addCriterion("third_trade_no in", values, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoNotIn(List values) { + addCriterion("third_trade_no not in", values, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoBetween(String value1, String value2) { + addCriterion("third_trade_no between", value1, value2, "thirdTradeNo"); + return (Criteria) this; + } + + public Criteria andThirdTradeNoNotBetween(String value1, String value2) { + addCriterion("third_trade_no not between", value1, value2, "thirdTradeNo"); + return (Criteria) this; + } + public Criteria andSqtBizOrderIdIsNull() { addCriterion("sqt_biz_order_id is null"); return (Criteria) this;