|
@@ -496,19 +496,20 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|
|
if (cancelOrder != null && (cancelOrder.getStatus() == 0 || cancelOrder.getStatus() == 6)) {
|
|
|
UserOrderPayment userOrderPayment = userOrderPaymentService.getByOrderNoAndStatusPaying(
|
|
|
cancelOrder.getOrderSn());
|
|
|
-
|
|
|
- HttpResponseResult<OrderCancelModel> responseResult = webFeignService.cancelOrder(userOrderPayment.getAdapayNo());
|
|
|
- if (!responseResult.getStatus()) {
|
|
|
- throw new BizException("远程取消失败");
|
|
|
- }
|
|
|
- OrderCancelModel data = responseResult.getData();
|
|
|
- if (!data.getSuccess()) {
|
|
|
- throw new BizException("远程取消失败");
|
|
|
- }
|
|
|
- if (data.getStatus()) {
|
|
|
- LOG.info("订单支付成功,修改订单状态");
|
|
|
- orderSuccess(cancelOrder,cancelOrder.getPayAmount(),data.getPayChannel());
|
|
|
- return;
|
|
|
+ if (userOrderPayment != null) {
|
|
|
+ HttpResponseResult<OrderCancelModel> responseResult = webFeignService.cancelOrder(userOrderPayment.getAdapayNo());
|
|
|
+ if (!responseResult.getStatus()) {
|
|
|
+ throw new BizException("远程取消失败");
|
|
|
+ }
|
|
|
+ OrderCancelModel data = responseResult.getData();
|
|
|
+ if (!data.getSuccess()) {
|
|
|
+ throw new BizException("远程取消失败");
|
|
|
+ }
|
|
|
+ if (data.getStatus()) {
|
|
|
+ LOG.info("订单支付成功,修改订单状态");
|
|
|
+ orderSuccess(cancelOrder, cancelOrder.getPayAmount(), data.getPayChannel());
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//修改订单状态为取消
|