update:
1. 重构支付宝支付
This commit is contained in:
@@ -161,6 +161,10 @@ public class AliPayAccountConfigServiceImpl extends BaseServiceImpl<AliPayAccoun
|
||||
|
||||
@Override
|
||||
public AliPayAccountConfig getDefault() {
|
||||
return getOne(Wrappers.<AliPayAccountConfig>lambdaQuery().eq(AliPayAccountConfig::getStatus, 1));
|
||||
AliPayAccountConfig config = getOne(Wrappers.<AliPayAccountConfig>lambdaQuery().eq(AliPayAccountConfig::getStatus, 1));
|
||||
if (config == null) {
|
||||
throw new ServiceException("该商户号尚未接入");
|
||||
}
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class AliPayServiceImpl implements IAliPayService {
|
||||
if (aliPayAccountConfig == null) {
|
||||
throw new ServiceException("该商户号尚未接入");
|
||||
}
|
||||
if (aliPayAccountConfig.getStatus().intValue() != 1) {
|
||||
if (aliPayAccountConfig.getStatus() != 1) {
|
||||
throw new ServiceException("该商户号已暂停交易");
|
||||
}
|
||||
if (StringUtil.isBlank(notifyUrl)) {
|
||||
|
||||
@@ -177,6 +177,10 @@ public class WxPayAccountConfigServiceImpl extends BaseServiceImpl<WxPayAccountC
|
||||
|
||||
@Override
|
||||
public WxPayAccountConfig getDefault() {
|
||||
return getOne(Wrappers.<WxPayAccountConfig>lambdaQuery().eq(WxPayAccountConfig::getStatus, 1));
|
||||
WxPayAccountConfig config = getOne(Wrappers.<WxPayAccountConfig>lambdaQuery().eq(WxPayAccountConfig::getStatus, 1));
|
||||
if (config == null) {
|
||||
throw new ServiceException("该商户号尚未接入");
|
||||
}
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user