Explorar o código

Merge remote-tracking branch 'origin/feature/0721-tenant' into feature/0721-tenant

yuanliang hai 1 ano
pai
achega
8ec2424d92

+ 6 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserPaymentCoreServiceImpl.java

@@ -8,7 +8,6 @@ import com.google.common.collect.Maps;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.microsvc.toolkit.common.spring.SpringContextHolder;
 import com.microsvc.toolkit.common.tools.ThreadPool;
-import com.microsvc.toolkit.common.webportal.exception.BizException;
 import com.microsvc.toolkit.config.jwt.utils.JwtUserInfo;
 import com.microsvc.toolkit.middleware.payment.common.api.BasePaymentService;
 import com.microsvc.toolkit.middleware.payment.common.api.PaymentServiceContext;
@@ -26,6 +25,7 @@ import com.yonge.cooleshow.common.enums.*;
 import com.yonge.cooleshow.common.enums.payment.EPaymentChannel;
 import com.yonge.cooleshow.common.enums.payment.EPaymentStatus;
 import com.yonge.cooleshow.common.enums.payment.EPaymentType;
+import com.yonge.toolset.base.exception.BizException;
 import com.yonge.toolset.payment.base.enums.TradeStatusEnum;
 import com.yonge.toolset.payment.util.DistributedLock;
 import lombok.extern.slf4j.Slf4j;
@@ -434,6 +434,9 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
 
                                 // 更新订单退款异常信息
                                 userPaymentOrderService.updateById(order);
+
+                                // 订单关闭后的数据处理流程
+                                userOrderService.payCancel(userOrderService.detail(order.getId()));
                             });
                             throw new BizException("查询交易中,请耐心等待!");
                         }
@@ -783,7 +786,7 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
 
                     // 订单关闭后的数据处理流程
                     userOrderService.payCancel(userOrderService.detail(reqConfig.getMerOrderNo(),null));
-                    throw BizException.from("支付超时");
+                    throw  new BizException("支付超时");
                 }
 
                 // 返回支付配置信息
@@ -809,7 +812,7 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
             PaymentOrder paymentOrder = JSON.parseObject(config.jsonString(), PaymentOrder.class);
             PaymentReq paymentReq = paymentServiceContext.getPaymentService(userPaymentOrder.getPaymentVendor()).pay(paymentOrder);
             if (Objects.isNull(paymentReq)) {
-                throw BizException.from("生成支付参数异常");
+                throw new BizException("生成支付参数异常");
             }
 
             // 更新订单流水号