支付参数2
This commit is contained in:
@@ -8,8 +8,6 @@ import com.mybatisflex.core.service.IService;
|
|||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
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);
|
void upMerchant(@NotBlank String relatedLicenceNo, @NotNull NativeMerchantDTO nativeMerchantDTO);
|
||||||
|
|
||||||
@Override
|
ShopMerchant getById(Long shopId);
|
||||||
ShopMerchant getById(Serializable id);
|
|
||||||
|
|
||||||
|
|
||||||
ShopDirectMerchant getMainMerchant(Long shopId);
|
ShopDirectMerchant getMainMerchant(Long shopId);
|
||||||
|
|||||||
@@ -181,9 +181,9 @@ public class PayServiceImpl implements PayService {
|
|||||||
|
|
||||||
private ShopMerchant getMerchant(Long shopId) {
|
private ShopMerchant getMerchant(Long shopId) {
|
||||||
try {
|
try {
|
||||||
ShopMerchant shopMerchant = shopMerchantService.getOne(new QueryWrapper().eq(ShopMerchant::getShopId, shopId));
|
ShopMerchant shopMerchant = shopMerchantService.getById(shopId);
|
||||||
if (shopMerchant == null || StrUtil.isBlank(shopMerchant.getChannel())) {
|
if (shopMerchant == null || StrUtil.isBlank(shopMerchant.getChannel())) {
|
||||||
throw new CzgException("暂未开通支付");
|
throw new CzgException("暂未开通支付!");
|
||||||
}
|
}
|
||||||
if (shopMerchant.getChannel().equals(PayChannelCst.NATIVE)) {
|
if (shopMerchant.getChannel().equals(PayChannelCst.NATIVE)) {
|
||||||
if (StrUtil.isNotBlank(shopMerchant.getNativePayJson())) {
|
if (StrUtil.isNotBlank(shopMerchant.getNativePayJson())) {
|
||||||
@@ -198,7 +198,7 @@ public class PayServiceImpl implements PayService {
|
|||||||
}
|
}
|
||||||
return shopMerchant;
|
return shopMerchant;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new CzgException("暂未开通支付");
|
throw new CzgException("该店铺暂未开通支付!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import org.springframework.cache.annotation.CacheEvict;
|
|||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方商户进件 服务层实现。
|
* 第三方商户进件 服务层实现。
|
||||||
*
|
*
|
||||||
@@ -113,9 +111,9 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
|||||||
|
|
||||||
@Cacheable(key = "#id")
|
@Cacheable(key = "#id")
|
||||||
@Override
|
@Override
|
||||||
public ShopMerchant getById(Serializable id) {
|
public ShopMerchant getById(Long shopId) {
|
||||||
ShopMerchant shopMerchant = getMapper().selectOneById(id);
|
ShopMerchant shopMerchant = getOne(query().eq(ShopMerchant::getShopId, shopId));
|
||||||
AssertUtil.isNull(shopMerchant, "暂未开通支付");
|
AssertUtil.isNull(shopMerchant, "暂未开通支付.");
|
||||||
return shopMerchant;
|
return shopMerchant;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user