refactor(strategy): 通道策略体系全面对齐 PaymentStrategy, 按业务子域重组

主应用核心:
- ChannelMerchantCleanupStrategy 改为 extends PaymentStrategy, 挪到 strategy/merchant/ 子包
- 删除独立的 ChannelMerchantCleanupStrategyFactory, 并入 PaymentStrategyFactory
- PaymentStrategyFactory 新增 findOptionallyByProduct 软查找方法(返回 Optional)
- ChannelMerchantService 改用 findOptionallyByProduct 按 product 一对一清理, 删除 resolveChannelByProduct 辅助方法

关键语义修复:
- 原按 channel 一对多 forEach 会触发同通道无关策略(虽然无害但语义偏差)
- 现按 product 一对一精准匹配, 删除 ALIPAY_DIRECT 不再触发 ALIPAY_ISV 的 cleanup

通道策略按业务子域重组(对齐主应用 payment/strategy/ 的 7 子包):
- pay/ ← Pay, Close
- refund/ ← Refund, SyncRefund
- sync/ ← Sync
- auth/ ← Auth(仅 wechat)
- product/ ← Product
- merchant/ ← Cleanup(新增)
alipay/wechat 三层 strategy/direct|isv/{子域}/, 其他 11 个二层 strategy/{子域}/

cleanup 策略改造:
- 14 个非 UMS 改为 @Override getProduct() 返回对应 ProductEnum
- UMS 特殊处理: 1 抽象父类 + 6 产品子类(UMS_QRCODE/JSAPI/APP/MINI/H5/BARCODE)
  解决 6 product 共享同一扩展表的语义问题, 与 PaymentStrategy 体系完全对齐

命名偏差修复:
- yeepay: YeepayProductStrategy → YeepayDirectProductStrategy
- douyin: DouyinPayProductStrategy → DouyinDirectProductStrategy
This commit is contained in:
DaxPay Dev
2026-07-20 11:10:03 +08:00
parent 88f95eedd4
commit 78b99f9be3
125 changed files with 422 additions and 324 deletions

View File

@@ -1,8 +1,8 @@
package cn.daxpay.open.channel.adapay.cleanup.direct;
package cn.daxpay.open.channel.adapay.strategy.merchant;
import cn.daxpay.open.channel.adapay.dao.direct.AdapayDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -12,9 +12,9 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理 Adapay 直连的所有扩展数据直连配置表
///
/// 注意Adapay [cn.daxpay.open.channel.dougong.cleanup.isv.DougongIsvChannelMerchantCleanupStrategy]
/// 共享同一通道编码 [ChannelEnum#HUIFU] [ChannelMerchantCleanupStrategyFactory] channel
/// 过滤后遍历调用各自实现互不影响
/// [cn.daxpay.open.channel.dougong.strategy.merchant.DougongIsvChannelMerchantCleanupStrategy]
/// 分属不同 product(`ADA_PAY` vs `DOUGONG_PAY`), 共享同一通道 [cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum#HUIFU],
/// 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct] product 一对一查找, 互不影响
@Slf4j
@Service
@RequiredArgsConstructor
@@ -22,10 +22,10 @@ public class AdapayDirectChannelMerchantCleanupStrategy implements ChannelMercha
private final AdapayDirectKeyConfigManager adapayDirectKeyConfigManager;
/// 通道编码对应 [ChannelEnum#HUIFU] Dougong 共享
/// 对应产品: Adapay
@Override
public String getChannel() {
return ChannelEnum.HUIFU.getCode();
public ProductEnum getProduct() {
return ProductEnum.ADA_PAY;
}
/// 清理指定通道商户号下 Adapay 直连的所有扩展数据直连配置表

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.pay;
import cn.daxpay.open.channel.adapay.client.credential.AdapaySdkCredential;
import cn.daxpay.open.channel.adapay.service.direct.AdapayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.pay;
import cn.daxpay.open.channel.adapay.client.credential.AdapaySdkCredential;
import cn.daxpay.open.channel.adapay.service.direct.AdapayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.refund;
import cn.daxpay.open.channel.adapay.client.credential.AdapaySdkCredential;
import cn.daxpay.open.channel.adapay.service.direct.AdapayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.refund;
import cn.daxpay.open.channel.adapay.client.credential.AdapaySdkCredential;
import cn.daxpay.open.channel.adapay.service.direct.AdapayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.adapay.strategy;
package cn.daxpay.open.channel.adapay.strategy.sync;
import cn.daxpay.open.channel.adapay.client.credential.AdapaySdkCredential;
import cn.daxpay.open.channel.adapay.service.direct.AdapayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.cleanup.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.merchant;
import cn.daxpay.open.channel.alipay.dao.direct.AlipayDirectAppAuthConfigManager;
import cn.daxpay.open.channel.alipay.dao.direct.AlipayDirectAppCapabilityManager;
@@ -10,8 +10,8 @@ import cn.daxpay.open.channel.alipay.entity.direct.AlipayDirectAppAuthConfig;
import cn.daxpay.open.channel.alipay.entity.direct.AlipayDirectAppCapability;
import cn.daxpay.open.channel.alipay.entity.direct.AlipayDirectAppKeyConfig;
import cn.daxpay.open.channel.alipay.entity.direct.AlipayDirectChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -21,9 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理支付宝直连相关的所有扩展表直连扩展表应用应用密钥应用能力应用授权配置
///
/// 注意 [cn.daxpay.open.channel.alipay.cleanup.isv.AlipayIsvChannelMerchantCleanupStrategy]
/// 共享同一通道编码 [ChannelEnum#ALIPAY] [ChannelMerchantCleanupStrategyFactory] channel
/// 过滤后遍历调用各自实现互不影响
/// [cn.daxpay.open.channel.alipay.strategy.isv.merchant.AlipayIsvChannelMerchantCleanupStrategy]
/// 分属不同 product(`ALIPAY` vs `ALIPAY_ISV`), 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct]
/// product 一对一查找, 互不影响
@Slf4j
@Service
@RequiredArgsConstructor
@@ -35,10 +35,10 @@ public class AlipayDirectChannelMerchantCleanupStrategy implements ChannelMercha
private final AlipayDirectAppCapabilityManager alipayDirectAppCapabilityManager;
private final AlipayDirectAppAuthConfigManager alipayDirectAppAuthConfigManager;
/// 通道编码对应 [ChannelEnum#ALIPAY]与服务商共享
/// 对应产品: 支付宝直连
@Override
public String getChannel() {
return ChannelEnum.ALIPAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.ALIPAY;
}
/// 清理指定通道商户号下支付宝直连的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.pay;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.direct.AlipayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.pay;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.direct.AlipayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.refund;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.direct.AlipayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.refund;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.direct.AlipayDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.direct;
package cn.daxpay.open.channel.alipay.strategy.direct.sync;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.direct.AlipayDirectConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.alipay.cleanup.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.merchant;
import cn.daxpay.open.channel.alipay.dao.isv.AlipayIsvChannelMerchantManager;
import cn.daxpay.open.channel.alipay.entity.isv.AlipayIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -13,9 +13,9 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理支付宝服务商相关的扩展表子商户授权关系
///
/// 注意 [cn.daxpay.open.channel.alipay.cleanup.direct.AlipayDirectChannelMerchantCleanupStrategy]
/// 共享同一通道编码 [ChannelEnum#ALIPAY] [ChannelMerchantCleanupStrategyFactory] channel
/// 过滤后遍历调用各自实现互不影响
/// [cn.daxpay.open.channel.alipay.strategy.direct.merchant.AlipayDirectChannelMerchantCleanupStrategy]
/// 分属不同 product(`ALIPAY_ISV` vs `ALIPAY`), 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct]
/// product 一对一查找, 互不影响
@Slf4j
@Service
@RequiredArgsConstructor
@@ -23,10 +23,10 @@ public class AlipayIsvChannelMerchantCleanupStrategy implements ChannelMerchantC
private final AlipayIsvChannelMerchantManager alipayIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#ALIPAY]与直连共享
/// 对应产品: 支付宝服务商
@Override
public String getChannel() {
return ChannelEnum.ALIPAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.ALIPAY_ISV;
}
/// 清理指定通道商户号下支付宝服务商的扩展数据子商户授权关系

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.pay;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.isv.AlipayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.pay;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.isv.AlipayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.refund;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.isv.AlipayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.refund;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.isv.AlipayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.alipay.strategy.isv;
package cn.daxpay.open.channel.alipay.strategy.isv.sync;
import cn.daxpay.open.channel.alipay.client.credential.AlipaySdkCredential;
import cn.daxpay.open.channel.alipay.service.isv.AlipayIsvConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.dougong.cleanup.isv;
package cn.daxpay.open.channel.dougong.strategy.merchant;
import cn.daxpay.open.channel.dougong.dao.isv.DougongIsvChannelMerchantManager;
import cn.daxpay.open.channel.dougong.entity.isv.DougongIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -13,9 +13,9 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理斗拱的所有扩展数据
///
/// 注意斗拱 [cn.daxpay.open.channel.adapay.cleanup.direct.AdapayDirectChannelMerchantCleanupStrategy]
/// 共享同一通道编码 [ChannelEnum#HUIFU] [ChannelMerchantCleanupStrategyFactory] channel
/// 过滤后遍历调用各自实现互不影响
/// [cn.daxpay.open.channel.adapay.strategy.merchant.AdapayDirectChannelMerchantCleanupStrategy]
/// 分属不同 product(`DOUGONG_PAY` vs `ADA_PAY`), 共享同一通道 [cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum#HUIFU],
/// 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct] product 一对一查找, 互不影响
@Slf4j
@Service
@RequiredArgsConstructor
@@ -23,10 +23,10 @@ public class DougongIsvChannelMerchantCleanupStrategy implements ChannelMerchant
private final DougongIsvChannelMerchantManager dougongIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#HUIFU] Adapay 共享
/// 对应产品: 斗拱
@Override
public String getChannel() {
return ChannelEnum.HUIFU.getCode();
public ProductEnum getProduct() {
return ProductEnum.DOUGONG_PAY;
}
/// 清理指定通道商户号下斗拱的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.pay;
import cn.daxpay.open.channel.dougong.client.credential.DougongSdkCredential;
import cn.daxpay.open.channel.dougong.service.isv.DougongIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.pay;
import cn.daxpay.open.channel.dougong.client.credential.DougongSdkCredential;
import cn.daxpay.open.channel.dougong.service.isv.DougongIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.refund;
import cn.daxpay.open.channel.dougong.client.credential.DougongSdkCredential;
import cn.daxpay.open.channel.dougong.service.isv.DougongIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.refund;
import cn.daxpay.open.channel.dougong.client.credential.DougongSdkCredential;
import cn.daxpay.open.channel.dougong.service.isv.DougongIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.dougong.strategy;
package cn.daxpay.open.channel.dougong.strategy.sync;
import cn.daxpay.open.channel.dougong.client.credential.DougongSdkCredential;
import cn.daxpay.open.channel.dougong.service.isv.DougongIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.cleanup.direct;
package cn.daxpay.open.channel.douyin.strategy.merchant;
import cn.daxpay.open.channel.douyin.dao.direct.DouyinDirectAppAuthConfigManager;
import cn.daxpay.open.channel.douyin.dao.direct.DouyinDirectAppCapabilityManager;
@@ -10,8 +10,8 @@ import cn.daxpay.open.channel.douyin.entity.direct.DouyinDirectAppAuthConfig;
import cn.daxpay.open.channel.douyin.entity.direct.DouyinDirectAppCapability;
import cn.daxpay.open.channel.douyin.entity.direct.DouyinDirectChannelMerchant;
import cn.daxpay.open.channel.douyin.entity.direct.DouyinDirectKeyConfig;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -31,10 +31,10 @@ public class DouyinDirectChannelMerchantCleanupStrategy implements ChannelMercha
private final DouyinDirectAppCapabilityManager douyinDirectAppCapabilityManager;
private final DouyinDirectAppAuthConfigManager douyinDirectAppAuthConfigManager;
/// 通道编码对应 [ChannelEnum#DOUYIN]
/// 对应产品: 抖音支付直连
@Override
public String getChannel() {
return ChannelEnum.DOUYIN.getCode();
public ProductEnum getProduct() {
return ProductEnum.DOUYIN_PAY;
}
/// 清理指定通道商户号下抖音直连的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.pay;
import cn.daxpay.open.channel.douyin.client.credential.DouyinSdkCredential;
import cn.daxpay.open.channel.douyin.service.direct.DouyinDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.pay;
import cn.daxpay.open.channel.douyin.client.credential.DouyinSdkCredential;
import cn.daxpay.open.channel.douyin.service.direct.DouyinDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;
@@ -19,7 +19,7 @@ import java.util.Map;
@Slf4j
@Service
@RequiredArgsConstructor
public class DouyinPayProductStrategy extends AbsProductStrategy {
public class DouyinDirectProductStrategy extends AbsProductStrategy {
private static final Map<PayMethodEnum, List<PayCapabilityEnum>> METHOD_CAP_MAP = Map.of(
PayMethodEnum.DOUYIN_QR, List.of(PayCapabilityEnum.DOUYIN_QR),

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.refund;
import cn.daxpay.open.channel.douyin.client.credential.DouyinSdkCredential;
import cn.daxpay.open.channel.douyin.service.direct.DouyinDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.refund;
import cn.daxpay.open.channel.douyin.client.credential.DouyinSdkCredential;
import cn.daxpay.open.channel.douyin.service.direct.DouyinDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.douyin.strategy;
package cn.daxpay.open.channel.douyin.strategy.sync;
import cn.daxpay.open.channel.douyin.client.credential.DouyinSdkCredential;
import cn.daxpay.open.channel.douyin.service.direct.DouyinDirectConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.fuyou.cleanup.isv;
package cn.daxpay.open.channel.fuyou.strategy.merchant;
import cn.daxpay.open.channel.fuyou.dao.isv.FuyouIsvChannelMerchantManager;
import cn.daxpay.open.channel.fuyou.entity.isv.FuyouIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -19,10 +19,10 @@ public class FuyouIsvChannelMerchantCleanupStrategy implements ChannelMerchantCl
private final FuyouIsvChannelMerchantManager fuyouIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#FUYOU_PAY]
/// 对应产品: 富友
@Override
public String getChannel() {
return ChannelEnum.FUYOU_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.FUYOU_PAY;
}
/// 清理指定通道商户号下富友的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.pay;
import cn.daxpay.open.channel.fuyou.client.credential.FuyouSdkCredential;
import cn.daxpay.open.channel.fuyou.service.isv.FuyouIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.pay;
import cn.daxpay.open.channel.fuyou.client.credential.FuyouSdkCredential;
import cn.daxpay.open.channel.fuyou.service.isv.FuyouIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.refund;
import cn.daxpay.open.channel.fuyou.client.credential.FuyouSdkCredential;
import cn.daxpay.open.channel.fuyou.service.isv.FuyouIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.refund;
import cn.daxpay.open.channel.fuyou.client.credential.FuyouSdkCredential;
import cn.daxpay.open.channel.fuyou.service.isv.FuyouIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.fuyou.strategy;
package cn.daxpay.open.channel.fuyou.strategy.sync;
import cn.daxpay.open.channel.fuyou.client.credential.FuyouSdkCredential;
import cn.daxpay.open.channel.fuyou.service.isv.FuyouIsvConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.hkrt.cleanup.isv;
package cn.daxpay.open.channel.hkrt.strategy.merchant;
import cn.daxpay.open.channel.hkrt.dao.isv.HkrtIsvChannelMerchantManager;
import cn.daxpay.open.channel.hkrt.entity.isv.HkrtIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -19,10 +19,10 @@ public class HkrtIsvChannelMerchantCleanupStrategy implements ChannelMerchantCle
private final HkrtIsvChannelMerchantManager hkrtIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#HKRT_PAY]
/// 对应产品: 海科融通
@Override
public String getChannel() {
return ChannelEnum.HKRT_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.HKRT_PAY;
}
/// 清理指定通道商户号下海科融通的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.pay;
import cn.daxpay.open.channel.hkrt.client.credential.HkrtSdkCredential;
import cn.daxpay.open.channel.hkrt.service.isv.HkrtIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.pay;
import cn.daxpay.open.channel.hkrt.client.credential.HkrtSdkCredential;
import cn.daxpay.open.channel.hkrt.service.isv.HkrtIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.refund;
import cn.daxpay.open.channel.hkrt.client.credential.HkrtSdkCredential;
import cn.daxpay.open.channel.hkrt.service.isv.HkrtIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.refund;
import cn.daxpay.open.channel.hkrt.client.credential.HkrtSdkCredential;
import cn.daxpay.open.channel.hkrt.service.isv.HkrtIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hkrt.strategy;
package cn.daxpay.open.channel.hkrt.strategy.sync;
import cn.daxpay.open.channel.hkrt.client.credential.HkrtSdkCredential;
import cn.daxpay.open.channel.hkrt.service.isv.HkrtIsvConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.hmpay.cleanup.isv;
package cn.daxpay.open.channel.hmpay.strategy.merchant;
import cn.daxpay.open.channel.hmpay.dao.isv.HmpayIsvChannelMerchantManager;
import cn.daxpay.open.channel.hmpay.entity.isv.HmpayIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -13,7 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理河马付的所有扩展数据
///
/// 注意河马付底层走杉德通道[getChannel] 返回 [ChannelEnum#SAND_PAY]
/// 河马付底层走杉德通道(对应 [cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum#SAND_PAY]),
/// 但产品维度的清理策略按 [ProductEnum#HM_PAY] 注册, 与支付策略体系一致
@Slf4j
@Service
@RequiredArgsConstructor
@@ -21,10 +22,10 @@ public class HmpayIsvChannelMerchantCleanupStrategy implements ChannelMerchantCl
private final HmpayIsvChannelMerchantManager hmpayIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#SAND_PAY]河马付底层走杉德通道
/// 对应产品: 河马付
@Override
public String getChannel() {
return ChannelEnum.SAND_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.HM_PAY;
}
/// 清理指定通道商户号下河马付的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.pay;
import cn.daxpay.open.channel.hmpay.client.credential.HmpaySdkCredential;
import cn.daxpay.open.channel.hmpay.service.isv.HmpayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.pay;
import cn.daxpay.open.channel.hmpay.client.credential.HmpaySdkCredential;
import cn.daxpay.open.channel.hmpay.service.isv.HmpayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.refund;
import cn.daxpay.open.channel.hmpay.client.credential.HmpaySdkCredential;
import cn.daxpay.open.channel.hmpay.service.isv.HmpayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.refund;
import cn.daxpay.open.channel.hmpay.client.credential.HmpaySdkCredential;
import cn.daxpay.open.channel.hmpay.service.isv.HmpayIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.hmpay.strategy;
package cn.daxpay.open.channel.hmpay.strategy.sync;
import cn.daxpay.open.channel.hmpay.client.credential.HmpaySdkCredential;
import cn.daxpay.open.channel.hmpay.service.isv.HmpayIsvConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.lakala.cleanup.isv;
package cn.daxpay.open.channel.lakala.strategy.merchant;
import cn.daxpay.open.channel.lakala.dao.isv.LakalaIsvChannelMerchantManager;
import cn.daxpay.open.channel.lakala.entity.isv.LakalaIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -19,10 +19,10 @@ public class LakalaIsvChannelMerchantCleanupStrategy implements ChannelMerchantC
private final LakalaIsvChannelMerchantManager lakalaIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#LAKALA_PAY]
/// 对应产品: 拉卡拉
@Override
public String getChannel() {
return ChannelEnum.LAKALA_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.LAKALA_PAY;
}
/// 清理指定通道商户号下拉卡拉的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.pay;
import cn.daxpay.open.channel.lakala.client.credential.LakalaSdkCredential;
import cn.daxpay.open.channel.lakala.service.isv.LakalaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.pay;
import cn.daxpay.open.channel.lakala.client.credential.LakalaSdkCredential;
import cn.daxpay.open.channel.lakala.service.isv.LakalaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.refund;
import cn.daxpay.open.channel.lakala.client.credential.LakalaSdkCredential;
import cn.daxpay.open.channel.lakala.service.isv.LakalaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.refund;
import cn.daxpay.open.channel.lakala.client.credential.LakalaSdkCredential;
import cn.daxpay.open.channel.lakala.service.isv.LakalaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.lakala.strategy;
package cn.daxpay.open.channel.lakala.strategy.sync;
import cn.daxpay.open.channel.lakala.client.credential.LakalaSdkCredential;
import cn.daxpay.open.channel.lakala.service.isv.LakalaIsvConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.leshua.cleanup.isv;
package cn.daxpay.open.channel.leshua.strategy.merchant;
import cn.daxpay.open.channel.leshua.dao.isv.LeshuaIsvChannelMerchantManager;
import cn.daxpay.open.channel.leshua.entity.isv.LeshuaIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -19,10 +19,10 @@ public class LeshuaIsvChannelMerchantCleanupStrategy implements ChannelMerchantC
private final LeshuaIsvChannelMerchantManager leshuaIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#LESHUA_PAY]
/// 对应产品: 乐刷
@Override
public String getChannel() {
return ChannelEnum.LESHUA_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.LESHUA_PAY;
}
/// 清理指定通道商户号下乐刷的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.pay;
import cn.daxpay.open.channel.leshua.client.credential.LeshuaSdkCredential;
import cn.daxpay.open.channel.leshua.service.isv.LeshuaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.pay;
import cn.daxpay.open.channel.leshua.client.credential.LeshuaSdkCredential;
import cn.daxpay.open.channel.leshua.service.isv.LeshuaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.refund;
import cn.daxpay.open.channel.leshua.client.credential.LeshuaSdkCredential;
import cn.daxpay.open.channel.leshua.service.isv.LeshuaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.refund;
import cn.daxpay.open.channel.leshua.client.credential.LeshuaSdkCredential;
import cn.daxpay.open.channel.leshua.service.isv.LeshuaIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.leshua.strategy;
package cn.daxpay.open.channel.leshua.strategy.sync;
import cn.daxpay.open.channel.leshua.client.credential.LeshuaSdkCredential;
import cn.daxpay.open.channel.leshua.service.isv.LeshuaIsvConfigAssembler;

View File

@@ -1,33 +0,0 @@
package cn.daxpay.open.channel.ums.cleanup.direct;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/// # 银联商务直连通道商户清理策略
///
/// 在通道商户删除时清理银联商务直连的所有扩展数据(直连配置表)。
@Slf4j
@Service
@RequiredArgsConstructor
public class UmsDirectChannelMerchantCleanupStrategy implements ChannelMerchantCleanupStrategy {
private final UmsDirectKeyConfigManager umsDirectKeyConfigManager;
/// 通道编码(对应 [ChannelEnum#UMS_PAY]
@Override
public String getChannel() {
return ChannelEnum.UMS_PAY.getCode();
}
/// 清理指定通道商户号下银联商务直连的所有扩展数据(直连配置表)
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteByChannelMchNo(String channelMchNo) {
umsDirectKeyConfigManager.deleteByChannelMchNo(channelMchNo);
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(APP)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_APP], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsAppChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsAppChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_APP;
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(B扫C)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_BARCODE], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsBarcodeChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsBarcodeChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_BARCODE;
}
}

View File

@@ -0,0 +1,36 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
/// # 银联商务直连通道商户清理策略基类
///
/// UMS 通道有 6 个 product(QRCODE/JSAPI/APP/MINI/H5/BARCODE), 共享同一份扩展表
/// `ums_direct_key_config`, 删除逻辑完全相同。本类封装共享删除逻辑, 由 6 个具体产品子类
/// 各自实现 [cn.daxpay.open.payment.strategy.PaymentStrategy#getProduct] 返回对应
/// [cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum], 注册为独立 Spring Bean。
///
/// 这样设计的原因:每个 channelMerchant 记录的 product 字段是创建时由用户从 6 个中选一个,
/// 删除时按 product 一对一查找策略, 必须每个 product 都有对应实现, 否则该 product 创建的
/// 商户删除时 cleanup 不会触发。
///
/// @see UmsQrcodeChannelMerchantCleanupStrategy
/// @see UmsJsapiChannelMerchantCleanupStrategy
/// @see UmsAppChannelMerchantCleanupStrategy
/// @see UmsMiniChannelMerchantCleanupStrategy
/// @see UmsH5ChannelMerchantCleanupStrategy
/// @see UmsBarcodeChannelMerchantCleanupStrategy
@RequiredArgsConstructor
public abstract class UmsDirectChannelMerchantCleanupStrategy implements ChannelMerchantCleanupStrategy {
protected final UmsDirectKeyConfigManager umsDirectKeyConfigManager;
/// 清理指定通道商户号下银联商务直连的所有扩展数据(直连配置表)
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteByChannelMchNo(String channelMchNo) {
umsDirectKeyConfigManager.deleteByChannelMchNo(channelMchNo);
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(H5)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_H5], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsH5ChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsH5ChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_H5;
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(公众号)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_JSAPI], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsJsapiChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsJsapiChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_JSAPI;
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(小程序)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_MINI], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsMiniChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsMiniChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_MINI;
}
}

View File

@@ -0,0 +1,21 @@
package cn.daxpay.open.channel.ums.strategy.merchant;
import cn.daxpay.open.channel.ums.dao.direct.UmsDirectKeyConfigManager;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import org.springframework.stereotype.Service;
/// # 银联商务(C扫B)通道商户清理策略
///
/// 对应 [ProductEnum#UMS_QRCODE], 共享 [UmsDirectChannelMerchantCleanupStrategy] 的删除逻辑。
@Service
public class UmsQrcodeChannelMerchantCleanupStrategy extends UmsDirectChannelMerchantCleanupStrategy {
public UmsQrcodeChannelMerchantCleanupStrategy(UmsDirectKeyConfigManager umsDirectKeyConfigManager) {
super(umsDirectKeyConfigManager);
}
@Override
public ProductEnum getProduct() {
return ProductEnum.UMS_QRCODE;
}
}

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.pay;
import cn.daxpay.open.channel.ums.client.credential.UmsSdkCredential;
import cn.daxpay.open.channel.ums.service.direct.UmsDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.pay;
import cn.daxpay.open.channel.ums.client.credential.UmsSdkCredential;
import cn.daxpay.open.channel.ums.service.direct.UmsDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum;
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.refund;
import cn.daxpay.open.channel.ums.client.credential.UmsSdkCredential;
import cn.daxpay.open.channel.ums.service.direct.UmsDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.refund;
import cn.daxpay.open.channel.ums.client.credential.UmsSdkCredential;
import cn.daxpay.open.channel.ums.service.direct.UmsDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.ums.strategy;
package cn.daxpay.open.channel.ums.strategy.sync;
import cn.daxpay.open.channel.ums.client.credential.UmsSdkCredential;
import cn.daxpay.open.channel.ums.service.direct.UmsDirectConfigAssembler;

View File

@@ -1,9 +1,9 @@
package cn.daxpay.open.channel.vbill.cleanup.isv;
package cn.daxpay.open.channel.vbill.strategy.merchant;
import cn.daxpay.open.channel.vbill.dao.isv.VbillIsvChannelMerchantManager;
import cn.daxpay.open.channel.vbill.entity.isv.VbillIsvChannelMerchant;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -19,10 +19,10 @@ public class VbillIsvChannelMerchantCleanupStrategy implements ChannelMerchantCl
private final VbillIsvChannelMerchantManager vbillIsvChannelMerchantManager;
/// 通道编码对应 [ChannelEnum#VBILL_PAY]
/// 对应产品: 随行付
@Override
public String getChannel() {
return ChannelEnum.VBILL_PAY.getCode();
public ProductEnum getProduct() {
return ProductEnum.VBILL_PAY;
}
/// 清理指定通道商户号下随行付的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.pay;
import cn.daxpay.open.channel.vbill.client.credential.VbillSdkCredential;
import cn.daxpay.open.channel.vbill.service.isv.VbillIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.pay;
import cn.daxpay.open.channel.vbill.client.credential.VbillSdkCredential;
import cn.daxpay.open.channel.vbill.service.isv.VbillIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.product;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.refund;
import cn.daxpay.open.channel.vbill.client.credential.VbillSdkCredential;
import cn.daxpay.open.channel.vbill.service.isv.VbillIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.refund;
import cn.daxpay.open.channel.vbill.client.credential.VbillSdkCredential;
import cn.daxpay.open.channel.vbill.service.isv.VbillIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.vbill.strategy;
package cn.daxpay.open.channel.vbill.strategy.sync;
import cn.daxpay.open.channel.vbill.client.credential.VbillSdkCredential;
import cn.daxpay.open.channel.vbill.service.isv.VbillIsvConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.wechat.strategy.direct;
package cn.daxpay.open.channel.wechat.strategy.direct.auth;
import cn.daxpay.open.channel.wechat.dao.direct.WechatDirectAppManager;
import cn.daxpay.open.channel.wechat.entity.direct.WechatDirectApp;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.wechat.cleanup.direct;
package cn.daxpay.open.channel.wechat.strategy.direct.merchant;
import cn.daxpay.open.channel.wechat.dao.direct.WechatDirectAppAuthConfigManager;
import cn.daxpay.open.channel.wechat.dao.direct.WechatDirectAppCapabilityManager;
@@ -10,8 +10,8 @@ import cn.daxpay.open.channel.wechat.entity.direct.WechatDirectAppAuthConfig;
import cn.daxpay.open.channel.wechat.entity.direct.WechatDirectAppCapability;
import cn.daxpay.open.channel.wechat.entity.direct.WechatDirectChannelMerchant;
import cn.daxpay.open.channel.wechat.entity.direct.WechatDirectKeyConfig;
import cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum;
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategy;
import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -21,9 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
///
/// 在通道商户删除时清理微信直连相关的所有扩展表直连扩展表应用应用密钥应用能力应用授权配置
///
/// 注意 [cn.daxpay.open.channel.wechat.cleanup.isv.WechatIsvChannelMerchantCleanupStrategy]
/// 共享同一通道编码 [ChannelEnum#WECHAT] [ChannelMerchantCleanupStrategyFactory] channel
/// 过滤后遍历调用各自实现互不影响
/// [cn.daxpay.open.channel.wechat.strategy.isv.merchant.WechatIsvChannelMerchantCleanupStrategy]
/// 分属不同 product(`WECHAT_PAY` vs `WECHAT_ISV`), 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct]
/// product 一对一查找, 互不影响
@Slf4j
@Service
@RequiredArgsConstructor
@@ -35,10 +35,10 @@ public class WechatDirectChannelMerchantCleanupStrategy implements ChannelMercha
private final WechatDirectAppCapabilityManager wechatDirectAppCapabilityManager;
private final WechatDirectAppAuthConfigManager wechatDirectAppAuthConfigManager;
/// 通道编码对应 [ChannelEnum#WECHAT]与服务商共享
/// 对应产品: 微信支付直连
@Override
public String getChannel() {
return ChannelEnum.WECHAT.getCode();
public ProductEnum getProduct() {
return ProductEnum.WECHAT_PAY;
}
/// 清理指定通道商户号下微信直连的所有扩展数据

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.wechat.strategy.direct;
package cn.daxpay.open.channel.wechat.strategy.direct.pay;
import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential;
import cn.daxpay.open.channel.wechat.service.direct.WechatDirectConfigAssembler;

View File

@@ -1,4 +1,4 @@
package cn.daxpay.open.channel.wechat.strategy.direct;
package cn.daxpay.open.channel.wechat.strategy.direct.pay;
import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential;
import cn.daxpay.open.channel.wechat.service.direct.WechatDirectConfigAssembler;

Some files were not shown because too many files have changed in this diff Show More