浏览代码

去掉单独配置config

fcw 2 天之前
父节点
当前提交
fa2143163b

+ 11 - 11
alien-store/src/main/java/shop/alien/store/strategy/merchantPayment/impl/MerchantAlipayPaymentStrategyImpl.java

@@ -98,16 +98,16 @@ public class MerchantAlipayPaymentStrategyImpl implements MerchantPaymentStrateg
         if (StringUtils.isBlank(subject)) {
             return R.fail("订单描述不能为空");
         }
-        StorePaymentConfig config = storePaymentConfigService.getByStoreId(storeId);
-        if (config == null) {
-            return R.fail("该门店未配置支付参数");
-        }
-        if (StringUtils.isBlank(config.getAppSecretCert())
-                || config.getAppPublicCert() == null || config.getAppPublicCert().length == 0
-                || config.getAlipayPublicCert() == null || config.getAlipayPublicCert().length == 0
-                || config.getAlipayRootCert() == null || config.getAlipayRootCert().length == 0) {
-            return R.fail("门店支付配置不完整(缺少应用私钥或证书)");
-        }
+//        StorePaymentConfig config = storePaymentConfigService.getByStoreId(storeId);
+//        if (config == null) {
+//            return R.fail("该门店未配置支付参数");
+//        }
+//        if (StringUtils.isBlank(config.getAppSecretCert())
+//                || config.getAppPublicCert() == null || config.getAppPublicCert().length == 0
+//                || config.getAlipayPublicCert() == null || config.getAlipayPublicCert().length == 0
+//                || config.getAlipayRootCert() == null || config.getAlipayRootCert().length == 0) {
+//            return R.fail("门店支付配置不完整(缺少应用私钥或证书)");
+//        }
         UserReservationOrder order = userReservationOrderService.getById(orderId);
         if (order == null) {
             return R.fail("预订订单不存在");
@@ -235,7 +235,7 @@ public class MerchantAlipayPaymentStrategyImpl implements MerchantPaymentStrateg
             data.put("orderId", order.getId());
             data.put("paymentNo", paymentOrder.getPaymentNo());
             stringRedisTemplate.opsForValue().set(redisKey, JSON.toJSONString(data), REDIS_PREPAY_EXPIRE_SECONDS, TimeUnit.SECONDS);
-            log.info("商户预订订单预支付成功并写入缓存,storeId={}, orderSn={}, outTradeNo={}, appId={}, aliPayHost={}", storeId, order.getOrderSn(), outTradeNo, config.getAppId(), aliPayHost);
+//            log.info("商户预订订单预支付成功并写入缓存,storeId={}, orderSn={}, outTradeNo={}, appId={}, aliPayHost={}", storeId, order.getOrderSn(), outTradeNo, config.getAppId(), aliPayHost);
             return R.data(data);
         } catch (AlipayApiException e) {
             log.error("商户预订订单预支付异常,storeId={}, orderId={}", storeId, orderId, e);