刘俊驰 3 days ago
parent
commit
6de83f512a

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

@@ -1086,14 +1086,18 @@ DISCOUNT("畅学卡")
 
         // 默认支付三方
         if (StringUtils.isNotEmpty(reqConfig.getPaymentVendor())
-                && !(reqConfig.getPaymentVendor().equals(userPaymentOrder.getPaymentVendor())
+                && (!reqConfig.getPaymentVendor().equals(userPaymentOrder.getPaymentVendor())
                 || !reqConfig.getPaymentChannel().equals(userPaymentOrder.getPaymentChannel()))) {
             if (EPaymentStatus.PAYING == userPaymentOrder.getStatus()) {
                 String errorMsg = "";
-                if ("ali".equals(userPaymentOrder.getPaymentChannel())) {
-                    errorMsg = "支付宝";
-                } else {
-                    errorMsg = "微信";
+                if (StringUtils.isNotBlank(userPaymentOrder.getPaymentChannel())) {
+                    if (userPaymentOrder.getPaymentChannel().startsWith("ali")) {
+                        errorMsg = "支付宝";
+                    } else if (userPaymentOrder.getPaymentChannel().startsWith("wx")) {
+                        errorMsg = "微信";
+                    } else {
+                        throw new BizException("该订单已选择支付渠道,若需修改请重新下单");
+                    }
                 }
 
                 throw new BizException("该订单已选择"+errorMsg+"支付,若需修改请重新下单");