支付参数2

This commit is contained in:
2026-01-15 14:01:10 +08:00
parent 9143331267
commit 5541ed5da4
3 changed files with 7 additions and 12 deletions

View File

@@ -8,8 +8,6 @@ import com.mybatisflex.core.service.IService;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 第三方商户进件 服务层。
*
@@ -32,8 +30,7 @@ public interface ShopMerchantService extends IService<ShopMerchant> {
*/
void upMerchant(@NotBlank String relatedLicenceNo, @NotNull NativeMerchantDTO nativeMerchantDTO);
@Override
ShopMerchant getById(Serializable id);
ShopMerchant getById(Long shopId);
ShopDirectMerchant getMainMerchant(Long shopId);

View File

@@ -181,9 +181,9 @@ public class PayServiceImpl implements PayService {
private ShopMerchant getMerchant(Long shopId) {
try {
ShopMerchant shopMerchant = shopMerchantService.getOne(new QueryWrapper().eq(ShopMerchant::getShopId, shopId));
ShopMerchant shopMerchant = shopMerchantService.getById(shopId);
if (shopMerchant == null || StrUtil.isBlank(shopMerchant.getChannel())) {
throw new CzgException("暂未开通支付");
throw new CzgException("暂未开通支付!");
}
if (shopMerchant.getChannel().equals(PayChannelCst.NATIVE)) {
if (StrUtil.isNotBlank(shopMerchant.getNativePayJson())) {
@@ -198,7 +198,7 @@ public class PayServiceImpl implements PayService {
}
return shopMerchant;
} catch (Exception e) {
throw new CzgException("暂未开通支付");
throw new CzgException("该店铺暂未开通支付!");
}
}

View File

@@ -24,8 +24,6 @@ import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.io.Serializable;
/**
* 第三方商户进件 服务层实现。
*
@@ -113,9 +111,9 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
@Cacheable(key = "#id")
@Override
public ShopMerchant getById(Serializable id) {
ShopMerchant shopMerchant = getMapper().selectOneById(id);
AssertUtil.isNull(shopMerchant, "暂未开通支付");
public ShopMerchant getById(Long shopId) {
ShopMerchant shopMerchant = getOne(query().eq(ShopMerchant::getShopId, shopId));
AssertUtil.isNull(shopMerchant, "暂未开通支付.");
return shopMerchant;
}