调整框架,删除不必要的组件,添加sdk模块
This commit is contained in:
@@ -25,8 +25,7 @@ public interface PayClientFactory {
|
|||||||
* @param config 支付配置
|
* @param config 支付配置
|
||||||
* @return 支付客户端
|
* @return 支付客户端
|
||||||
*/
|
*/
|
||||||
<Config extends PayClientConfig> PayClient createOrUpdatePayClient(Long channelId, String channelCode,
|
<Config extends PayClientConfig> PayClient createOrUpdatePayClient(Long channelId, String channelCode, Config config);
|
||||||
Config config);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册支付客户端 Class,用于模块中实现的 PayClient
|
* 注册支付客户端 Class,用于模块中实现的 PayClient
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.tashow.cloud.sdk.payment.client.impl;
|
|
||||||
|
|
||||||
import com.tashow.cloud.sdk.payment.client.PayClientConfig;
|
|
||||||
import jakarta.validation.Validator;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 无需任何配置 PayClientConfig 实现类
|
|
||||||
*
|
|
||||||
* @author jason
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class NonePayClientConfig implements PayClientConfig {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 配置名称
|
|
||||||
* <p>
|
|
||||||
* 如果不加任何属性,JsonUtils.parseObject2 解析会报错,所以暂时加个名称
|
|
||||||
*/
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
public NonePayClientConfig(){
|
|
||||||
this.name = "none-config";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void validate(Validator validator) {
|
|
||||||
// 无任何配置不需要校验
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@ package com.tashow.cloud.sdk.payment.enums.channel;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ArrayUtil;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import com.tashow.cloud.sdk.payment.client.PayClientConfig;
|
import com.tashow.cloud.sdk.payment.client.PayClientConfig;
|
||||||
import com.tashow.cloud.sdk.payment.client.impl.NonePayClientConfig;
|
|
||||||
import com.tashow.cloud.sdk.payment.client.impl.alipay.AlipayPayClientConfig;
|
import com.tashow.cloud.sdk.payment.client.impl.alipay.AlipayPayClientConfig;
|
||||||
import com.tashow.cloud.sdk.payment.client.impl.weixin.WxPayClientConfig;
|
import com.tashow.cloud.sdk.payment.client.impl.weixin.WxPayClientConfig;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -29,9 +28,7 @@ public enum PayChannelEnum {
|
|||||||
ALIPAY_APP("alipay_app", "支付宝App 支付", AlipayPayClientConfig.class),
|
ALIPAY_APP("alipay_app", "支付宝App 支付", AlipayPayClientConfig.class),
|
||||||
ALIPAY_QR("alipay_qr", "支付宝扫码支付", AlipayPayClientConfig.class),
|
ALIPAY_QR("alipay_qr", "支付宝扫码支付", AlipayPayClientConfig.class),
|
||||||
ALIPAY_BAR("alipay_bar", "支付宝条码支付", AlipayPayClientConfig.class),
|
ALIPAY_BAR("alipay_bar", "支付宝条码支付", AlipayPayClientConfig.class),
|
||||||
MOCK("mock", "模拟支付", NonePayClientConfig.class),
|
;
|
||||||
|
|
||||||
WALLET("wallet", "钱包支付", NonePayClientConfig.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编码
|
* 编码
|
||||||
|
|||||||
Reference in New Issue
Block a user