钱包退款的实现

This commit is contained in:
jason
2023-08-28 10:25:50 +08:00
parent c7f6f92159
commit 7237bc07bb
15 changed files with 202 additions and 29 deletions

View File

@ -27,6 +27,12 @@ public interface PayClientFactory {
<Config extends PayClientConfig> void createOrUpdatePayClient(Long channelId, String channelCode,
Config config);
<Config extends PayClientConfig> void createOrUpdateDelegatePayClient(Long channelId, DelegatePayClient<Config> delegatePayClient);
/**
* 新增或更新代理支付客户端
* @param channelId 渠道编号
* @param delegatePayClient 代理支付客户端
* @param <Config> 支付配置
*/
<Config extends PayClientConfig> void addOrUpdateDelegatePayClient(Long channelId, DelegatePayClient<Config> delegatePayClient);
}

View File

@ -53,7 +53,7 @@ public class PayClientFactoryImpl implements PayClientFactory {
}
@Override
public <Config extends PayClientConfig> void createOrUpdateDelegatePayClient(Long channelId, DelegatePayClient<Config> delegatePayClient) {
public <Config extends PayClientConfig> void addOrUpdateDelegatePayClient(Long channelId, DelegatePayClient<Config> delegatePayClient) {
clients.put(channelId, delegatePayClient);
}

View File

@ -10,6 +10,8 @@ import cn.iocoder.yudao.framework.pay.core.client.impl.AbstractPayClient;
import java.util.Map;
/**
* 代理支付 Client 的抽象类。用于支付 Client 由其它模块实现, 例如钱包支付
*
* @author jason
*/
public abstract class DelegatePayClient<Config extends PayClientConfig> extends AbstractPayClient<PayClientConfig> {