Authored by tanling

订单号

@@ -2,10 +2,10 @@ package com.yohoufo.order.controller; @@ -2,10 +2,10 @@ package com.yohoufo.order.controller;
2 2
3 import com.yoho.core.dal.datasource.annotation.Database; 3 import com.yoho.core.dal.datasource.annotation.Database;
4 import com.yoho.error.event.PaymentEvent; 4 import com.yoho.error.event.PaymentEvent;
5 -import com.yoho.service.model.order.payment.NotifyResponse;  
6 -import com.yoho.service.model.order.payment.PaymentData;  
7 import com.yohoufo.common.ApiResponse; 5 import com.yohoufo.common.ApiResponse;
8 import com.yohoufo.order.common.Payment; 6 import com.yohoufo.order.common.Payment;
  7 +import com.yohoufo.order.model.NotifyResponse;
  8 +import com.yohoufo.order.model.PaymentData;
9 import com.yohoufo.order.request.PaymentRequest; 9 import com.yohoufo.order.request.PaymentRequest;
10 import com.yohoufo.order.response.PaymentConfirmRsp; 10 import com.yohoufo.order.response.PaymentConfirmRsp;
11 import com.yohoufo.order.response.PrepayResponse; 11 import com.yohoufo.order.response.PrepayResponse;
  1 +package com.yohoufo.order.model;
  2 +
  3 +public class NotifyResponse {
  4 + /**
  5 + * 支付回调处理结果
  6 + * 0:处理成功;1:处理失败;2:校验失败
  7 + */
  8 + public static final int PAYMENT_NOTIFY_RESULT_IGNORE = -1;
  9 + public static final int PAYMENT_NOTIFY_RESULT_SUCCESS = 0;
  10 + public static final int PAYMENT_NOTIFY_RESULT_FAILED = 1;
  11 + public static final int PAYMENT_NOTIFY_RESULT_VERFAIL = 2;
  12 +
  13 + //支付回调处理结果
  14 + private int notifyResult = PAYMENT_NOTIFY_RESULT_FAILED;
  15 + //支付数据
  16 + private PaymentData paymentData;
  17 +
  18 + public int getNotifyResult() {
  19 + return notifyResult;
  20 + }
  21 + public void setNotifyResult(int notifyResult) {
  22 + this.notifyResult = notifyResult;
  23 + }
  24 + public PaymentData getPaymentData() {
  25 + return paymentData;
  26 + }
  27 + public void setPaymentData(PaymentData paymentData) {
  28 + this.paymentData = paymentData;
  29 + }
  30 +
  31 +}
1 package com.yohoufo.order.model; 1 package com.yohoufo.order.model;
2 2
3 -import com.yoho.service.model.order.payment.PayDiscount;  
4 import org.apache.commons.lang3.StringUtils; 3 import org.apache.commons.lang3.StringUtils;
5 4
6 public class PaymentData { 5 public class PaymentData {
@@ -92,9 +91,7 @@ public class PaymentData { @@ -92,9 +91,7 @@ public class PaymentData {
92 */ 91 */
93 private String mchId; 92 private String mchId;
94 93
95 - //支付折扣  
96 - private PayDiscount payDiscount;  
97 - 94 +
98 //微信支付的appId 95 //微信支付的appId
99 private String appId; 96 private String appId;
100 97
@@ -217,13 +214,6 @@ public class PaymentData { @@ -217,13 +214,6 @@ public class PaymentData {
217 this.mchId = mchId; 214 this.mchId = mchId;
218 } 215 }
219 216
220 - public PayDiscount getPayDiscount() {  
221 - return payDiscount;  
222 - }  
223 -  
224 - public void setPayDiscount(PayDiscount payDiscount) {  
225 - this.payDiscount = payDiscount;  
226 - }  
227 217
228 public String getOutTradeNo() { 218 public String getOutTradeNo() {
229 return StringUtils.isEmpty(outTradeNo) ? this.payOrderCode : outTradeNo; 219 return StringUtils.isEmpty(outTradeNo) ? this.payOrderCode : outTradeNo;
1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 -import com.yoho.service.model.order.payment.PaymentData;  
4 import com.yohoufo.order.request.PaymentRequest; 3 import com.yohoufo.order.request.PaymentRequest;
5 import com.yohoufo.order.response.PaymentConfirmRsp; 4 import com.yohoufo.order.response.PaymentConfirmRsp;
6 import com.yohoufo.order.response.PrepayResponse; 5 import com.yohoufo.order.response.PrepayResponse;
@@ -3,7 +3,6 @@ package com.yohoufo.order.service.pay.alipay; @@ -3,7 +3,6 @@ package com.yohoufo.order.service.pay.alipay;
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.yoho.error.ServiceError; 4 import com.yoho.error.ServiceError;
5 import com.yoho.error.exception.ServiceException; 5 import com.yoho.error.exception.ServiceException;
6 -import com.yoho.service.model.order.payment.PaymentData;  
7 import com.yohoufo.common.utils.DateUtil; 6 import com.yohoufo.common.utils.DateUtil;
8 import com.yohoufo.common.utils.HttpClient; 7 import com.yohoufo.common.utils.HttpClient;
9 import com.yohoufo.common.utils.MD5Utils; 8 import com.yohoufo.common.utils.MD5Utils;
@@ -11,10 +10,7 @@ import com.yohoufo.common.utils.RSAUtils; @@ -11,10 +10,7 @@ import com.yohoufo.common.utils.RSAUtils;
11 import com.yohoufo.order.common.Payment; 10 import com.yohoufo.order.common.Payment;
12 import com.yohoufo.order.config.AlipayConfig; 11 import com.yohoufo.order.config.AlipayConfig;
13 import com.yohoufo.order.constants.RefundContant; 12 import com.yohoufo.order.constants.RefundContant;
14 -import com.yohoufo.order.model.AlipayTradeVO;  
15 -import com.yohoufo.order.model.OrderInfo;  
16 -import com.yohoufo.order.model.PayQueryBo;  
17 -import com.yohoufo.order.model.PayRefundBo; 13 +import com.yohoufo.order.model.*;
18 import com.yohoufo.order.service.pay.AbstractPayService; 14 import com.yohoufo.order.service.pay.AbstractPayService;
19 import com.yohoufo.order.utils.AlipayUtils; 15 import com.yohoufo.order.utils.AlipayUtils;
20 import org.apache.commons.lang3.StringUtils; 16 import org.apache.commons.lang3.StringUtils;
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
4 import com.yoho.core.common.utils.YHMath; 4 import com.yoho.core.common.utils.YHMath;
5 import com.yoho.error.ServiceError; 5 import com.yoho.error.ServiceError;
6 import com.yoho.error.exception.ServiceException; 6 import com.yoho.error.exception.ServiceException;
7 -import com.yoho.service.model.order.payment.PaymentData;  
8 import com.yohoufo.common.utils.HttpClient; 7 import com.yohoufo.common.utils.HttpClient;
9 import com.yohoufo.common.utils.TimeUtils; 8 import com.yohoufo.common.utils.TimeUtils;
10 import com.yohoufo.common.utils.WXUtils; 9 import com.yohoufo.common.utils.WXUtils;
@@ -12,6 +11,7 @@ import com.yohoufo.order.common.Payment; @@ -12,6 +11,7 @@ import com.yohoufo.order.common.Payment;
12 import com.yohoufo.order.config.WeixinPayConfig; 11 import com.yohoufo.order.config.WeixinPayConfig;
13 import com.yohoufo.order.model.OrderInfo; 12 import com.yohoufo.order.model.OrderInfo;
14 import com.yohoufo.order.model.PayQueryBo; 13 import com.yohoufo.order.model.PayQueryBo;
  14 +import com.yohoufo.order.model.PaymentData;
15 import com.yohoufo.order.service.pay.AbstractPayService; 15 import com.yohoufo.order.service.pay.AbstractPayService;
16 import org.apache.commons.lang3.StringUtils; 16 import org.apache.commons.lang3.StringUtils;
17 import org.slf4j.Logger; 17 import org.slf4j.Logger;