支付参数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

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