From 2c417daa3f4df1733305a7814838a334363d882c Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Thu, 15 Jan 2026 14:12:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=8F=82=E6=95=B05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CallTableServiceImpl.java | 3 +- .../order/service/impl/PayServiceImpl.java | 34 ++++++++----------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/CallTableServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/CallTableServiceImpl.java index 0ddc5e49e..6f46a4fcc 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/CallTableServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/CallTableServiceImpl.java @@ -29,6 +29,7 @@ import jakarta.annotation.Resource; import org.apache.dubbo.config.annotation.DubboReference; import org.apache.dubbo.config.annotation.DubboService; import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.stereotype.Service; import java.io.ByteArrayOutputStream; import java.util.*; @@ -41,7 +42,7 @@ import java.util.stream.Collectors; * @author zs * @since 2025-02-21 */ -@DubboService +@Service public class CallTableServiceImpl extends ServiceImpl implements CallTableService { @DubboReference private SysParamsService sysParamsService; diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java index 807adcf21..edec7ab1e 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java @@ -180,26 +180,22 @@ public class PayServiceImpl implements PayService { } private ShopMerchant getMerchant(Long shopId) { - try { - ShopMerchant shopMerchant = shopMerchantService.getByShopId(shopId); - if (shopMerchant == null || StrUtil.isBlank(shopMerchant.getChannel())) { - throw new CzgException("暂未开通支付!"); - } - if (shopMerchant.getChannel().equals(PayChannelCst.NATIVE)) { - if (StrUtil.isNotBlank(shopMerchant.getNativePayJson())) { - throw new CzgException("原生支付未开通"); - } - } else if (shopMerchant.getChannel().equals(PayChannelCst.POLY)) { - if (StrUtil.isNotBlank(shopMerchant.getPolyPayJson())) { - throw new CzgException("聚合支付未开通"); - } - } else { - throw new CzgException("暂不支持的支付渠道"); - } - return shopMerchant; - } catch (Exception e) { - throw new CzgException("该店铺暂未开通支付!"); + ShopMerchant shopMerchant = shopMerchantService.getByShopId(shopId); + if (shopMerchant == null || StrUtil.isBlank(shopMerchant.getChannel())) { + throw new CzgException("暂未开通支付!"); } + if (shopMerchant.getChannel().equals(PayChannelCst.NATIVE)) { + if (StrUtil.isNotBlank(shopMerchant.getNativePayJson())) { + throw new CzgException("原生支付未开通"); + } + } else if (shopMerchant.getChannel().equals(PayChannelCst.POLY)) { + if (StrUtil.isNotBlank(shopMerchant.getPolyPayJson())) { + throw new CzgException("聚合支付未开通"); + } + } else { + throw new CzgException("暂不支持的支付渠道"); + } + return shopMerchant; } private String getDomain() {