支付参数5

This commit is contained in:
2026-01-15 14:12:57 +08:00
parent b3a161d643
commit 2c417daa3f
2 changed files with 17 additions and 20 deletions

View File

@@ -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<CallTableMapper, CallTable> implements CallTableService {
@DubboReference
private SysParamsService sysParamsService;

View File

@@ -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() {