| @@ -193,7 +193,7 @@ public class OrderExpiringSchedule { | |||||
| } | } | ||||
| public boolean wxPaySuccess(WxOrder order) { | |||||
| public boolean wxPaySuccess(WxOrder order,boolean autoReHandle) { | |||||
| WxPayOrder payOrderq = new WxPayOrder(); | WxPayOrder payOrderq = new WxPayOrder(); | ||||
| payOrderq.setOrderId(order.getId()); | payOrderq.setOrderId(order.getId()); | ||||
| List<WxPayOrder> payorderlist = wxPayOrderMapper.findList(payOrderq); | List<WxPayOrder> payorderlist = wxPayOrderMapper.findList(payOrderq); | ||||
| @@ -221,9 +221,11 @@ public class OrderExpiringSchedule { | |||||
| } | } | ||||
| Map<String, String> retMap = WxPayOrderServiceHelper.wxOrderPayStatusMap(wxpayOrder, order, appInfo, payAccount); | Map<String, String> retMap = WxPayOrderServiceHelper.wxOrderPayStatusMap(wxpayOrder, order, appInfo, payAccount); | ||||
| int status = WxPayOrderServiceHelper.getPayStatusFromMap(retMap, wxpayOrder.getPayOrderNo()); | int status = WxPayOrderServiceHelper.getPayStatusFromMap(retMap, wxpayOrder.getPayOrderNo()); | ||||
| //如果是支付成功,则更新信息 | |||||
| //如果是支付成功,并且需要重试成功流程, | |||||
| if (EnumPayStatus.PAY_STATUS_SUCCESS.getCode() == status) { | if (EnumPayStatus.PAY_STATUS_SUCCESS.getCode() == status) { | ||||
| wxPayOrderService.handleSuccessOrder(wxpayOrder, order, retMap,true); | |||||
| if (autoReHandle) { | |||||
| wxPayOrderService.handleSuccessOrder(wxpayOrder, order, retMap,true); | |||||
| } | |||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| @@ -233,7 +235,7 @@ public class OrderExpiringSchedule { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void orderExpired(WxOrder order,boolean checkRealPay) { | public void orderExpired(WxOrder order,boolean checkRealPay) { | ||||
| if (checkRealPay) { | if (checkRealPay) { | ||||
| if (wxPaySuccess(order)) { | |||||
| if (wxPaySuccess(order,true)) { | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| @@ -256,7 +258,7 @@ public class OrderExpiringSchedule { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void orderPressExpired(WxOrder order, boolean payExpired,boolean checkRealPay) { | public void orderPressExpired(WxOrder order, boolean payExpired,boolean checkRealPay) { | ||||
| if (checkRealPay) { | if (checkRealPay) { | ||||
| if (wxPaySuccess(order)) { | |||||
| if (wxPaySuccess(order,true)) { | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| @@ -282,7 +284,7 @@ public class OrderExpiringSchedule { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void orderGroupExpired(WxOrder order,boolean checkRealPay) { | public void orderGroupExpired(WxOrder order,boolean checkRealPay) { | ||||
| if (checkRealPay) { | if (checkRealPay) { | ||||
| if (wxPaySuccess(order)) { | |||||
| if (wxPaySuccess(order,true)) { | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| @@ -305,7 +307,7 @@ public class OrderExpiringSchedule { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void returnMoney(WxOrder order) { | public void returnMoney(WxOrder order) { | ||||
| //支付成功的才退款 | //支付成功的才退款 | ||||
| if (!wxPaySuccess(order)) { | |||||
| if (!wxPaySuccess(order,false)) { | |||||
| return; | return; | ||||
| } | } | ||||
| //获取APP信息 | //获取APP信息 | ||||