From 78b99f9be3ab1c8f081dc1e25cecdd34165fc6bd Mon Sep 17 00:00:00 2001 From: DaxPay Dev Date: Mon, 20 Jul 2026 11:10:03 +0800 Subject: [PATCH] =?UTF-8?q?refactor(strategy):=20=E9=80=9A=E9=81=93?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E4=BD=93=E7=B3=BB=E5=85=A8=E9=9D=A2=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=20PaymentStrategy,=20=E6=8C=89=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=AD=90=E5=9F=9F=E9=87=8D=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主应用核心: - 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 --- ...yDirectChannelMerchantCleanupStrategy.java | 18 ++++----- .../{ => pay}/AdapayDirectCloseStrategy.java | 2 +- .../{ => pay}/AdapayDirectPayStrategy.java | 2 +- .../AdapayDirectProductStrategy.java | 2 +- .../AdapayDirectRefundStrategy.java | 2 +- .../AdapayDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/AdapayDirectSyncStrategy.java | 2 +- ...yDirectChannelMerchantCleanupStrategy.java | 18 ++++----- .../{ => pay}/AlipayDirectCloseStrategy.java | 2 +- .../{ => pay}/AlipayDirectPayStrategy.java | 2 +- .../AlipayDirectProductStrategy.java | 2 +- .../AlipayDirectRefundStrategy.java | 2 +- .../AlipayDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/AlipayDirectSyncStrategy.java | 2 +- ...ipayIsvChannelMerchantCleanupStrategy.java | 18 ++++----- .../isv/{ => pay}/AlipayIsvCloseStrategy.java | 2 +- .../isv/{ => pay}/AlipayIsvPayStrategy.java | 2 +- .../AlipayIsvProductStrategy.java | 2 +- .../{ => refund}/AlipayIsvRefundStrategy.java | 2 +- .../AlipayIsvSyncRefundStrategy.java | 2 +- .../isv/{ => sync}/AlipayIsvSyncStrategy.java | 2 +- ...gongIsvChannelMerchantCleanupStrategy.java | 18 ++++----- .../{ => pay}/DougongCloseStrategy.java | 2 +- .../{ => pay}/DougongPayStrategy.java | 2 +- .../{ => product}/DougongProductStrategy.java | 2 +- .../{ => refund}/DougongRefundStrategy.java | 2 +- .../DougongSyncRefundStrategy.java | 2 +- .../{ => sync}/DougongSyncStrategy.java | 2 +- ...nDirectChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/DouyinDirectCloseStrategy.java | 2 +- .../{ => pay}/DouyinDirectPayStrategy.java | 2 +- .../DouyinDirectProductStrategy.java} | 4 +- .../DouyinDirectRefundStrategy.java | 2 +- .../DouyinDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/DouyinDirectSyncStrategy.java | 2 +- ...uyouIsvChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/FuyouCloseStrategy.java | 2 +- .../strategy/{ => pay}/FuyouPayStrategy.java | 2 +- .../{ => product}/FuyouProductStrategy.java | 2 +- .../{ => refund}/FuyouRefundStrategy.java | 2 +- .../{ => refund}/FuyouSyncRefundStrategy.java | 2 +- .../{ => sync}/FuyouSyncStrategy.java | 2 +- ...HkrtIsvChannelMerchantCleanupStrategy.java | 12 +++--- .../strategy/{ => pay}/HkrtCloseStrategy.java | 2 +- .../strategy/{ => pay}/HkrtPayStrategy.java | 2 +- .../{ => product}/HkrtProductStrategy.java | 2 +- .../{ => refund}/HkrtRefundStrategy.java | 2 +- .../{ => refund}/HkrtSyncRefundStrategy.java | 2 +- .../strategy/{ => sync}/HkrtSyncStrategy.java | 2 +- ...mpayIsvChannelMerchantCleanupStrategy.java | 15 ++++---- .../{ => pay}/HmpayCloseStrategy.java | 2 +- .../strategy/{ => pay}/HmpayPayStrategy.java | 2 +- .../{ => product}/HmpayProductStrategy.java | 2 +- .../{ => refund}/HmpayRefundStrategy.java | 2 +- .../{ => refund}/HmpaySyncRefundStrategy.java | 2 +- .../{ => sync}/HmpaySyncStrategy.java | 2 +- ...kalaIsvChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/LakalaCloseStrategy.java | 2 +- .../strategy/{ => pay}/LakalaPayStrategy.java | 2 +- .../{ => product}/LakalaProductStrategy.java | 2 +- .../{ => refund}/LakalaRefundStrategy.java | 2 +- .../LakalaSyncRefundStrategy.java | 2 +- .../{ => sync}/LakalaSyncStrategy.java | 2 +- ...shuaIsvChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/LeshuaCloseStrategy.java | 2 +- .../strategy/{ => pay}/LeshuaPayStrategy.java | 2 +- .../{ => product}/LeshuaProductStrategy.java | 2 +- .../{ => refund}/LeshuaRefundStrategy.java | 2 +- .../LeshuaSyncRefundStrategy.java | 2 +- .../{ => sync}/LeshuaSyncStrategy.java | 2 +- ...sDirectChannelMerchantCleanupStrategy.java | 33 ----------------- .../UmsAppChannelMerchantCleanupStrategy.java | 21 +++++++++++ ...BarcodeChannelMerchantCleanupStrategy.java | 21 +++++++++++ ...sDirectChannelMerchantCleanupStrategy.java | 36 ++++++++++++++++++ .../UmsH5ChannelMerchantCleanupStrategy.java | 21 +++++++++++ ...msJsapiChannelMerchantCleanupStrategy.java | 21 +++++++++++ ...UmsMiniChannelMerchantCleanupStrategy.java | 21 +++++++++++ ...sQrcodeChannelMerchantCleanupStrategy.java | 21 +++++++++++ .../{ => pay}/UmsDirectCloseStrategy.java | 2 +- .../{ => pay}/UmsDirectPayStrategy.java | 2 +- .../{ => product}/UmsAppProductStrategy.java | 2 +- .../UmsBarcodeProductStrategy.java | 2 +- .../{ => product}/UmsH5ProductStrategy.java | 2 +- .../UmsJsapiProductStrategy.java | 2 +- .../{ => product}/UmsMiniProductStrategy.java | 2 +- .../UmsQrcodeProductStrategy.java | 2 +- .../{ => refund}/UmsDirectRefundStrategy.java | 2 +- .../UmsDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/UmsDirectSyncStrategy.java | 2 +- ...billIsvChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/VbillCloseStrategy.java | 2 +- .../strategy/{ => pay}/VbillPayStrategy.java | 2 +- .../{ => product}/VbillProductStrategy.java | 2 +- .../{ => refund}/VbillRefundStrategy.java | 2 +- .../{ => refund}/VbillSyncRefundStrategy.java | 2 +- .../{ => sync}/VbillSyncStrategy.java | 2 +- .../{ => auth}/WechatDirectAuthStrategy.java | 2 +- ...tDirectChannelMerchantCleanupStrategy.java | 18 ++++----- .../{ => pay}/WechatDirectCloseStrategy.java | 2 +- .../{ => pay}/WechatDirectPayStrategy.java | 2 +- .../WechatDirectProductStrategy.java | 2 +- .../WechatDirectRefundStrategy.java | 2 +- .../WechatDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/WechatDirectSyncStrategy.java | 2 +- .../isv/{ => auth}/WechatIsvAuthStrategy.java | 2 +- ...chatIsvChannelMerchantCleanupStrategy.java | 18 ++++----- .../isv/{ => pay}/WechatIsvCloseStrategy.java | 2 +- .../isv/{ => pay}/WechatIsvPayStrategy.java | 2 +- .../WechatIsvProductStrategy.java | 2 +- .../{ => refund}/WechatIsvRefundStrategy.java | 2 +- .../WechatIsvSyncRefundStrategy.java | 2 +- .../isv/{ => sync}/WechatIsvSyncStrategy.java | 2 +- ...yDirectChannelMerchantCleanupStrategy.java | 12 +++--- .../{ => pay}/YeepayDirectCloseStrategy.java | 2 +- .../{ => pay}/YeepayDirectPayStrategy.java | 2 +- .../YeepayDirectProductStrategy.java} | 4 +- .../YeepayDirectRefundStrategy.java | 2 +- .../YeepayDirectSyncRefundStrategy.java | 2 +- .../{ => sync}/YeepayDirectSyncStrategy.java | 2 +- .../merchant/info/MerchantAdminService.java | 2 +- .../ChannelMerchantCleanupStrategy.java | 35 ------------------ ...ChannelMerchantCleanupStrategyFactory.java | 34 ----------------- .../channel/ChannelMerchantService.java | 26 ++++--------- .../strategy/PaymentStrategyFactory.java | 12 ++++++ .../ChannelMerchantCleanupStrategy.java | 37 +++++++++++++++++++ 125 files changed, 422 insertions(+), 324 deletions(-) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/{cleanup/direct => strategy/merchant}/AdapayDirectChannelMerchantCleanupStrategy.java (58%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => pay}/AdapayDirectCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => pay}/AdapayDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => product}/AdapayDirectProductStrategy.java (98%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => refund}/AdapayDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => refund}/AdapayDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/{ => sync}/AdapayDirectSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/{cleanup/direct => strategy/direct/merchant}/AlipayDirectChannelMerchantCleanupStrategy.java (80%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => pay}/AlipayDirectCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => pay}/AlipayDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => product}/AlipayDirectProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => refund}/AlipayDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => refund}/AlipayDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/{ => sync}/AlipayDirectSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/{cleanup/isv => strategy/isv/merchant}/AlipayIsvChannelMerchantCleanupStrategy.java (63%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => pay}/AlipayIsvCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => pay}/AlipayIsvPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => product}/AlipayIsvProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => refund}/AlipayIsvRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => refund}/AlipayIsvSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/{ => sync}/AlipayIsvSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/{cleanup/isv => strategy/merchant}/DougongIsvChannelMerchantCleanupStrategy.java (59%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => pay}/DougongCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => pay}/DougongPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => product}/DougongProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => refund}/DougongRefundStrategy.java (95%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => refund}/DougongSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/{ => sync}/DougongSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/{cleanup/direct => strategy/merchant}/DouyinDirectChannelMerchantCleanupStrategy.java (88%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{ => pay}/DouyinDirectCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{ => pay}/DouyinDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{DouyinPayProductStrategy.java => product/DouyinDirectProductStrategy.java} (93%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{ => refund}/DouyinDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{ => refund}/DouyinDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/{ => sync}/DouyinDirectSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/{cleanup/isv => strategy/merchant}/FuyouIsvChannelMerchantCleanupStrategy.java (74%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => pay}/FuyouCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => pay}/FuyouPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => product}/FuyouProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => refund}/FuyouRefundStrategy.java (95%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => refund}/FuyouSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/{ => sync}/FuyouSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/{cleanup/isv => strategy/merchant}/HkrtIsvChannelMerchantCleanupStrategy.java (74%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => pay}/HkrtCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => pay}/HkrtPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => product}/HkrtProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => refund}/HkrtRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => refund}/HkrtSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/{ => sync}/HkrtSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/{cleanup/isv => strategy/merchant}/HmpayIsvChannelMerchantCleanupStrategy.java (66%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => pay}/HmpayCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => pay}/HmpayPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => product}/HmpayProductStrategy.java (98%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => refund}/HmpayRefundStrategy.java (95%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => refund}/HmpaySyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/{ => sync}/HmpaySyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/{cleanup/isv => strategy/merchant}/LakalaIsvChannelMerchantCleanupStrategy.java (74%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => pay}/LakalaCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => pay}/LakalaPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => product}/LakalaProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => refund}/LakalaRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => refund}/LakalaSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/{ => sync}/LakalaSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/{cleanup/isv => strategy/merchant}/LeshuaIsvChannelMerchantCleanupStrategy.java (74%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => pay}/LeshuaCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => pay}/LeshuaPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => product}/LeshuaProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => refund}/LeshuaRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => refund}/LeshuaSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/{ => sync}/LeshuaSyncStrategy.java (96%) delete mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/cleanup/direct/UmsDirectChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsAppChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsBarcodeChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsDirectChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsH5ChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsJsapiChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsMiniChannelMerchantCleanupStrategy.java create mode 100644 daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsQrcodeChannelMerchantCleanupStrategy.java rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => pay}/UmsDirectCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => pay}/UmsDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsAppProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsBarcodeProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsH5ProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsJsapiProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsMiniProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => product}/UmsQrcodeProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => refund}/UmsDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => refund}/UmsDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/{ => sync}/UmsDirectSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/{cleanup/isv => strategy/merchant}/VbillIsvChannelMerchantCleanupStrategy.java (74%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => pay}/VbillCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => pay}/VbillPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => product}/VbillProductStrategy.java (98%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => refund}/VbillRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => refund}/VbillSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/{ => sync}/VbillSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => auth}/WechatDirectAuthStrategy.java (99%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/{cleanup/direct => strategy/direct/merchant}/WechatDirectChannelMerchantCleanupStrategy.java (80%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => pay}/WechatDirectCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => pay}/WechatDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => product}/WechatDirectProductStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => refund}/WechatDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => refund}/WechatDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/{ => sync}/WechatDirectSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => auth}/WechatIsvAuthStrategy.java (99%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/{cleanup/isv => strategy/isv/merchant}/WechatIsvChannelMerchantCleanupStrategy.java (77%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => pay}/WechatIsvCloseStrategy.java (97%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => pay}/WechatIsvPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => product}/WechatIsvProductStrategy.java (97%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => refund}/WechatIsvRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => refund}/WechatIsvSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/{ => sync}/WechatIsvSyncStrategy.java (96%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/{cleanup/direct => strategy/merchant}/YeepayDirectChannelMerchantCleanupStrategy.java (73%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{ => pay}/YeepayDirectCloseStrategy.java (96%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{ => pay}/YeepayDirectPayStrategy.java (97%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{YeepayProductStrategy.java => product/YeepayDirectProductStrategy.java} (94%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{ => refund}/YeepayDirectRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{ => refund}/YeepayDirectSyncRefundStrategy.java (96%) rename daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/{ => sync}/YeepayDirectSyncStrategy.java (96%) delete mode 100644 daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategy.java delete mode 100644 daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategyFactory.java create mode 100644 daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/merchant/ChannelMerchantCleanupStrategy.java diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/cleanup/direct/AdapayDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/merchant/AdapayDirectChannelMerchantCleanupStrategy.java similarity index 58% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/cleanup/direct/AdapayDirectChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/merchant/AdapayDirectChannelMerchantCleanupStrategy.java index 16aa88b46..de9a7fa8d 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/cleanup/direct/AdapayDirectChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/merchant/AdapayDirectChannelMerchantCleanupStrategy.java @@ -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 直连的所有扩展数据(直连配置表) diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectCloseStrategy.java index 997ba3433..a4b12a7fb 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectPayStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectPayStrategy.java index de589ec9a..6d93ab6d0 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/pay/AdapayDirectPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectProductStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/product/AdapayDirectProductStrategy.java similarity index 98% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectProductStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/product/AdapayDirectProductStrategy.java index b698de9eb..25d6fdaa6 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectProductStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/product/AdapayDirectProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectRefundStrategy.java index 4a2289dc3..626a66dd9 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectSyncRefundStrategy.java index 2d2e34524..ca2867a45 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/refund/AdapayDirectSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/sync/AdapayDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/sync/AdapayDirectSyncStrategy.java index e12b72a62..d9dcbba4f 100644 --- a/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/AdapayDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-adapay/src/main/java/cn/daxpay/open/channel/adapay/strategy/sync/AdapayDirectSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/direct/AlipayDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/merchant/AlipayDirectChannelMerchantCleanupStrategy.java similarity index 80% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/direct/AlipayDirectChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/merchant/AlipayDirectChannelMerchantCleanupStrategy.java index 07dfc1c42..50a7ebcf1 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/direct/AlipayDirectChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/merchant/AlipayDirectChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下支付宝直连的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectCloseStrategy.java index fb434c3d8..b720848fd 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectPayStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectPayStrategy.java index 7d0e55f59..85cd69a10 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/pay/AlipayDirectPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectProductStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/product/AlipayDirectProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectProductStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/product/AlipayDirectProductStrategy.java index 6493dd120..cfd08dc2c 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectProductStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/product/AlipayDirectProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectRefundStrategy.java index db27c96cb..d9f56e0d0 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectSyncRefundStrategy.java index d18e19b83..f8b8ec10e 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/refund/AlipayDirectSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/sync/AlipayDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/sync/AlipayDirectSyncStrategy.java index 6b9e09041..9f6647060 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/AlipayDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/direct/sync/AlipayDirectSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/isv/AlipayIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/merchant/AlipayIsvChannelMerchantCleanupStrategy.java similarity index 63% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/isv/AlipayIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/merchant/AlipayIsvChannelMerchantCleanupStrategy.java index ccffd2077..4918f48eb 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/cleanup/isv/AlipayIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/merchant/AlipayIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下支付宝服务商的扩展数据(子商户授权关系) diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvCloseStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvCloseStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvCloseStrategy.java index c62932107..496a9a537 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvPayStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvPayStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvPayStrategy.java index 8cfc20ac8..7c228abb2 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvPayStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/pay/AlipayIsvPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvProductStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/product/AlipayIsvProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvProductStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/product/AlipayIsvProductStrategy.java index fe309783e..5c6d56c16 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvProductStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/product/AlipayIsvProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvRefundStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvRefundStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvRefundStrategy.java index 11d7fe850..c85e57100 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvSyncRefundStrategy.java index e688bf0fa..51dded052 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/refund/AlipayIsvSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncStrategy.java b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/sync/AlipayIsvSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncStrategy.java rename to daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/sync/AlipayIsvSyncStrategy.java index 38da6a8f9..42e3aab60 100644 --- a/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/AlipayIsvSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-alipay/src/main/java/cn/daxpay/open/channel/alipay/strategy/isv/sync/AlipayIsvSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/cleanup/isv/DougongIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/merchant/DougongIsvChannelMerchantCleanupStrategy.java similarity index 59% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/cleanup/isv/DougongIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/merchant/DougongIsvChannelMerchantCleanupStrategy.java index 58fd88fe6..927fe35d3 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/cleanup/isv/DougongIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/merchant/DougongIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下斗拱的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongCloseStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongCloseStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongCloseStrategy.java index b0e0f6863..ae39264bd 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongPayStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongPayStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongPayStrategy.java index 71ef2bb5b..1ba3e1969 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongPayStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/pay/DougongPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongProductStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/product/DougongProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongProductStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/product/DougongProductStrategy.java index 6c0deb0e4..2e71438ec 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongProductStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/product/DougongProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongRefundStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongRefundStrategy.java similarity index 95% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongRefundStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongRefundStrategy.java index f0e8ec40f..f099a4b0d 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongSyncRefundStrategy.java index e9b1e3349..3d9dd27e0 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/refund/DougongSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncStrategy.java b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/sync/DougongSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncStrategy.java rename to daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/sync/DougongSyncStrategy.java index 5b0b0a47b..f1b8a3b72 100644 --- a/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/DougongSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-dougong/src/main/java/cn/daxpay/open/channel/dougong/strategy/sync/DougongSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/cleanup/direct/DouyinDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/merchant/DouyinDirectChannelMerchantCleanupStrategy.java similarity index 88% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/cleanup/direct/DouyinDirectChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/merchant/DouyinDirectChannelMerchantCleanupStrategy.java index c3f21a5eb..f7e0462a0 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/cleanup/direct/DouyinDirectChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/merchant/DouyinDirectChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下抖音直连的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectCloseStrategy.java index aa7a8542a..d1b7ef929 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectPayStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectPayStrategy.java index 2d7e48161..30b871a44 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/pay/DouyinDirectPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinPayProductStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/product/DouyinDirectProductStrategy.java similarity index 93% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinPayProductStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/product/DouyinDirectProductStrategy.java index b5aa384bb..dcf2fee51 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinPayProductStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/product/DouyinDirectProductStrategy.java @@ -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> METHOD_CAP_MAP = Map.of( PayMethodEnum.DOUYIN_QR, List.of(PayCapabilityEnum.DOUYIN_QR), diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectRefundStrategy.java index b9cc74d1a..13cd9b8dd 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectSyncRefundStrategy.java index e19b0c899..3a7a1253e 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/refund/DouyinDirectSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/sync/DouyinDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/sync/DouyinDirectSyncStrategy.java index ac0721fad..374598eab 100644 --- a/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/DouyinDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-douyin/src/main/java/cn/daxpay/open/channel/douyin/strategy/sync/DouyinDirectSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/cleanup/isv/FuyouIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/merchant/FuyouIsvChannelMerchantCleanupStrategy.java similarity index 74% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/cleanup/isv/FuyouIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/merchant/FuyouIsvChannelMerchantCleanupStrategy.java index fa7949d91..5717480f7 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/cleanup/isv/FuyouIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/merchant/FuyouIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下富友的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouCloseStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouCloseStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouCloseStrategy.java index 90b8ec733..86c1f30f4 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouPayStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouPayStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouPayStrategy.java index 2253bcd2a..d5ecfffde 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouPayStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/pay/FuyouPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouProductStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/product/FuyouProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouProductStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/product/FuyouProductStrategy.java index e7605dd6e..0bd900419 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouProductStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/product/FuyouProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouRefundStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouRefundStrategy.java similarity index 95% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouRefundStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouRefundStrategy.java index 9e8577097..ed429f289 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouSyncRefundStrategy.java index 043f25201..dd8cadc14 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/refund/FuyouSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncStrategy.java b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/sync/FuyouSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncStrategy.java rename to daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/sync/FuyouSyncStrategy.java index 197fa2f64..be4bac338 100644 --- a/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/FuyouSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-fuyou/src/main/java/cn/daxpay/open/channel/fuyou/strategy/sync/FuyouSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/cleanup/isv/HkrtIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/merchant/HkrtIsvChannelMerchantCleanupStrategy.java similarity index 74% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/cleanup/isv/HkrtIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/merchant/HkrtIsvChannelMerchantCleanupStrategy.java index 7beeccf50..ffbe9a343 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/cleanup/isv/HkrtIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/merchant/HkrtIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下海科融通的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtCloseStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtCloseStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtCloseStrategy.java index f76a85e84..7374347f4 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtPayStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtPayStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtPayStrategy.java index 6f433c376..8a7b2d21e 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtPayStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/pay/HkrtPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtProductStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/product/HkrtProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtProductStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/product/HkrtProductStrategy.java index 1057a590b..fe1a138b3 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtProductStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/product/HkrtProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtRefundStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtRefundStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtRefundStrategy.java index b8fcaf014..bd24ea84d 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtSyncRefundStrategy.java index cb2934a6f..26891f709 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/refund/HkrtSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncStrategy.java b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/sync/HkrtSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncStrategy.java rename to daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/sync/HkrtSyncStrategy.java index deebbe65f..7088464b7 100644 --- a/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/HkrtSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-hkrt/src/main/java/cn/daxpay/open/channel/hkrt/strategy/sync/HkrtSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/cleanup/isv/HmpayIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/merchant/HmpayIsvChannelMerchantCleanupStrategy.java similarity index 66% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/cleanup/isv/HmpayIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/merchant/HmpayIsvChannelMerchantCleanupStrategy.java index d97c118db..a44e410b2 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/cleanup/isv/HmpayIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/merchant/HmpayIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下河马付的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayCloseStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayCloseStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayCloseStrategy.java index 23bc1cc20..422d6082d 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayPayStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayPayStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayPayStrategy.java index 8883810d3..6a613051e 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayPayStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/pay/HmpayPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayProductStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/product/HmpayProductStrategy.java similarity index 98% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayProductStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/product/HmpayProductStrategy.java index 5265a3ed0..3ef20b730 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayProductStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/product/HmpayProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayRefundStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpayRefundStrategy.java similarity index 95% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayRefundStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpayRefundStrategy.java index a3c98642d..90ad2cd46 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpayRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpayRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncRefundStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpaySyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpaySyncRefundStrategy.java index c45c87884..9d055a755 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/refund/HmpaySyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncStrategy.java b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/sync/HmpaySyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncStrategy.java rename to daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/sync/HmpaySyncStrategy.java index 30e7a5ef4..39dced5d4 100644 --- a/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/HmpaySyncStrategy.java +++ b/daxpay-channel/daxpay-channel-hmpay/src/main/java/cn/daxpay/open/channel/hmpay/strategy/sync/HmpaySyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/cleanup/isv/LakalaIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/merchant/LakalaIsvChannelMerchantCleanupStrategy.java similarity index 74% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/cleanup/isv/LakalaIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/merchant/LakalaIsvChannelMerchantCleanupStrategy.java index f99c1d3b5..808483d75 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/cleanup/isv/LakalaIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/merchant/LakalaIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下拉卡拉的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaCloseStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaCloseStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaCloseStrategy.java index 8fbdd5287..5a86450fc 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaPayStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaPayStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaPayStrategy.java index f2d31d5bb..3e86e3c8a 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaPayStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/pay/LakalaPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaProductStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/product/LakalaProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaProductStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/product/LakalaProductStrategy.java index c48201a12..adad37dcd 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaProductStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/product/LakalaProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaRefundStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaRefundStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaRefundStrategy.java index 307c34df0..b7bc5da8f 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaSyncRefundStrategy.java index 929820415..d4ea7a832 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/refund/LakalaSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncStrategy.java b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/sync/LakalaSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncStrategy.java rename to daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/sync/LakalaSyncStrategy.java index 4e72cb21c..72bb9ddc8 100644 --- a/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/LakalaSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-lakala/src/main/java/cn/daxpay/open/channel/lakala/strategy/sync/LakalaSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/cleanup/isv/LeshuaIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/merchant/LeshuaIsvChannelMerchantCleanupStrategy.java similarity index 74% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/cleanup/isv/LeshuaIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/merchant/LeshuaIsvChannelMerchantCleanupStrategy.java index 727d7940c..fc5c1e56b 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/cleanup/isv/LeshuaIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/merchant/LeshuaIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下乐刷的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaCloseStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaCloseStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaCloseStrategy.java index 6e8f3b509..10f66acb4 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaPayStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaPayStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaPayStrategy.java index 804ef589a..6347a340d 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaPayStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/pay/LeshuaPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaProductStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/product/LeshuaProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaProductStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/product/LeshuaProductStrategy.java index ea33a2014..51eca6801 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaProductStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/product/LeshuaProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaRefundStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaRefundStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaRefundStrategy.java index 72815e9df..0aa9b71e3 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaSyncRefundStrategy.java index 63a796d87..217f6a065 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/refund/LeshuaSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncStrategy.java b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/sync/LeshuaSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncStrategy.java rename to daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/sync/LeshuaSyncStrategy.java index 9579489ff..55119da5a 100644 --- a/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/LeshuaSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-leshua/src/main/java/cn/daxpay/open/channel/leshua/strategy/sync/LeshuaSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/cleanup/direct/UmsDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/cleanup/direct/UmsDirectChannelMerchantCleanupStrategy.java deleted file mode 100644 index 001bf580e..000000000 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/cleanup/direct/UmsDirectChannelMerchantCleanupStrategy.java +++ /dev/null @@ -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); - } -} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsAppChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsAppChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..c4416b1ed --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsAppChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsBarcodeChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsBarcodeChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..494825b62 --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsBarcodeChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsDirectChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..b642786c0 --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsDirectChannelMerchantCleanupStrategy.java @@ -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); + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsH5ChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsH5ChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..1f48b976d --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsH5ChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsJsapiChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsJsapiChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..c9c952341 --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsJsapiChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsMiniChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsMiniChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..bb668a3e8 --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsMiniChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsQrcodeChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsQrcodeChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..3bb9919ad --- /dev/null +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/merchant/UmsQrcodeChannelMerchantCleanupStrategy.java @@ -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; + } +} diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectCloseStrategy.java index 938139f0c..d9a5e801a 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectPayStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectPayStrategy.java index 58b6c196e..95281681a 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/pay/UmsDirectPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsAppProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsAppProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsAppProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsAppProductStrategy.java index aaa54dc3b..b41edb8c8 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsAppProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsAppProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsBarcodeProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsBarcodeProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsBarcodeProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsBarcodeProductStrategy.java index 6b1ea0f67..852d10039 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsBarcodeProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsBarcodeProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsH5ProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsH5ProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsH5ProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsH5ProductStrategy.java index f5df5d295..1acb17e1c 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsH5ProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsH5ProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsJsapiProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsJsapiProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsJsapiProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsJsapiProductStrategy.java index 17322a900..1d7220210 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsJsapiProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsJsapiProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsMiniProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsMiniProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsMiniProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsMiniProductStrategy.java index d64049bb4..84aee392c 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsMiniProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsMiniProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsQrcodeProductStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsQrcodeProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsQrcodeProductStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsQrcodeProductStrategy.java index 6b2e3e4c7..86291e7a3 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsQrcodeProductStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/product/UmsQrcodeProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectRefundStrategy.java index f85698bb8..2e6a2d15b 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectSyncRefundStrategy.java index 9d588740d..c24c3f04d 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/refund/UmsDirectSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/sync/UmsDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/sync/UmsDirectSyncStrategy.java index af36feb52..ce7067888 100644 --- a/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/UmsDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-ums/src/main/java/cn/daxpay/open/channel/ums/strategy/sync/UmsDirectSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/cleanup/isv/VbillIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/merchant/VbillIsvChannelMerchantCleanupStrategy.java similarity index 74% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/cleanup/isv/VbillIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/merchant/VbillIsvChannelMerchantCleanupStrategy.java index 70f9428c8..051a1f7db 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/cleanup/isv/VbillIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/merchant/VbillIsvChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下随行付的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillCloseStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillCloseStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillCloseStrategy.java index f79a9dede..7b652e6fc 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillPayStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillPayStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillPayStrategy.java index 9e9bc628f..b89c75bca 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillPayStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/pay/VbillPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillProductStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/product/VbillProductStrategy.java similarity index 98% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillProductStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/product/VbillProductStrategy.java index 479159f74..6b13a4142 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillProductStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/product/VbillProductStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillRefundStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillRefundStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillRefundStrategy.java index 0f6255460..033ae83df 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillSyncRefundStrategy.java index cedbef79e..a6086cb94 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/refund/VbillSyncRefundStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncStrategy.java b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/sync/VbillSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncStrategy.java rename to daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/sync/VbillSyncStrategy.java index d4c33aac7..07eeb5e6f 100644 --- a/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/VbillSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-vbill/src/main/java/cn/daxpay/open/channel/vbill/strategy/sync/VbillSyncStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectAuthStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/auth/WechatDirectAuthStrategy.java similarity index 99% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectAuthStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/auth/WechatDirectAuthStrategy.java index a58dc46a0..88138b07f 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectAuthStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/auth/WechatDirectAuthStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/direct/WechatDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/merchant/WechatDirectChannelMerchantCleanupStrategy.java similarity index 80% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/direct/WechatDirectChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/merchant/WechatDirectChannelMerchantCleanupStrategy.java index 2297e8e5d..1105622ad 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/direct/WechatDirectChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/merchant/WechatDirectChannelMerchantCleanupStrategy.java @@ -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; } /// 清理指定通道商户号下微信直连的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectCloseStrategy.java index dad7cbdf2..cd8fa2718 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectCloseStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectPayStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectPayStrategy.java index 62b3a21bf..7d171d842 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/pay/WechatDirectPayStrategy.java @@ -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; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectProductStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/product/WechatDirectProductStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectProductStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/product/WechatDirectProductStrategy.java index fd43411b4..ba67f8235 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectProductStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/product/WechatDirectProductStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.direct; +package cn.daxpay.open.channel.wechat.strategy.direct.product; import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode; import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectRefundStrategy.java index 060e8ab89..2ffc46561 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.direct; +package cn.daxpay.open.channel.wechat.strategy.direct.refund; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.direct.WechatDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectSyncRefundStrategy.java index e4b7cf022..a62a312f6 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/refund/WechatDirectSyncRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.direct; +package cn.daxpay.open.channel.wechat.strategy.direct.refund; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.direct.WechatDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/sync/WechatDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/sync/WechatDirectSyncStrategy.java index a33fe629d..42a6840f7 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/WechatDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/direct/sync/WechatDirectSyncStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.direct; +package cn.daxpay.open.channel.wechat.strategy.direct.sync; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.direct.WechatDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvAuthStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/auth/WechatIsvAuthStrategy.java similarity index 99% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvAuthStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/auth/WechatIsvAuthStrategy.java index 542ff9e2d..420c6aaaf 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvAuthStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/auth/WechatIsvAuthStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.auth; import cn.daxpay.open.channel.wechat.code.WechatAuthAppTypeEnum; import cn.daxpay.open.channel.wechat.dao.isv.WechatIsvAppManager; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/isv/WechatIsvChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/merchant/WechatIsvChannelMerchantCleanupStrategy.java similarity index 77% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/isv/WechatIsvChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/merchant/WechatIsvChannelMerchantCleanupStrategy.java index 75de984aa..3f77eadf3 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/cleanup/isv/WechatIsvChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/merchant/WechatIsvChannelMerchantCleanupStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.cleanup.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.merchant; import cn.daxpay.open.channel.wechat.dao.isv.WechatIsvChannelMerchantManager; import cn.daxpay.open.channel.wechat.dao.isv.WechatIsvMchAppAuthConfigManager; @@ -8,8 +8,8 @@ import cn.daxpay.open.channel.wechat.entity.isv.WechatIsvChannelMerchant; import cn.daxpay.open.channel.wechat.entity.isv.WechatIsvMchApp; import cn.daxpay.open.channel.wechat.entity.isv.WechatIsvMchAppAuthConfig; import cn.daxpay.open.channel.wechat.entity.isv.WechatIsvMchAppCapability; -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,9 +19,9 @@ import org.springframework.transaction.annotation.Transactional; /// /// 在通道商户删除时清理微信服务商相关的扩展表(服务商扩展表、子商户应用、子商户应用能力、子商户应用授权配置)。 /// -/// 注意:与 [cn.daxpay.open.channel.wechat.cleanup.direct.WechatDirectChannelMerchantCleanupStrategy] -/// 共享同一通道编码 [ChannelEnum#WECHAT],由 [ChannelMerchantCleanupStrategyFactory] 按 channel -/// 过滤后遍历调用各自实现,互不影响。 +/// 与 [cn.daxpay.open.channel.wechat.strategy.direct.merchant.WechatDirectChannelMerchantCleanupStrategy] +/// 分属不同 product(`WECHAT_ISV` vs `WECHAT_PAY`), 通过 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory#findOptionallyByProduct] +/// 按 product 一对一查找, 互不影响。 @Slf4j @Service @RequiredArgsConstructor @@ -32,10 +32,10 @@ public class WechatIsvChannelMerchantCleanupStrategy implements ChannelMerchantC private final WechatIsvMchAppCapabilityManager wechatIsvMchAppCapabilityManager; private final WechatIsvMchAppAuthConfigManager wechatIsvMchAppAuthConfigManager; - /// 通道编码(对应 [ChannelEnum#WECHAT],与直连共享) + /// 对应产品: 微信支付服务商 @Override - public String getChannel() { - return ChannelEnum.WECHAT.getCode(); + public ProductEnum getProduct() { + return ProductEnum.WECHAT_ISV; } /// 清理指定通道商户号下微信服务商的所有扩展数据 diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvCloseStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvCloseStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvCloseStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvCloseStrategy.java index 1a42c30f5..9899163b1 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvCloseStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.pay; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.isv.WechatIsvConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvPayStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvPayStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvPayStrategy.java index 0dae9a379..0c38abc63 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvPayStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/pay/WechatIsvPayStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.pay; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.isv.WechatIsvConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvProductStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/product/WechatIsvProductStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvProductStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/product/WechatIsvProductStrategy.java index 5114ce477..00ec932b7 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvProductStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/product/WechatIsvProductStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.product; import cn.daxpay.open.platform.core.enums.pay.channel.ChannelApiCallMode; import cn.daxpay.open.platform.core.enums.pay.channel.ChannelPayIdType; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvRefundStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvRefundStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvRefundStrategy.java index d4e019fe4..3e66b308a 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.refund; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.isv.WechatIsvConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvSyncRefundStrategy.java index 66837505b..e2253ddb1 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/refund/WechatIsvSyncRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.refund; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.isv.WechatIsvConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncStrategy.java b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/sync/WechatIsvSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncStrategy.java rename to daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/sync/WechatIsvSyncStrategy.java index 87740f82d..088a78c1f 100644 --- a/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/WechatIsvSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-wechat/src/main/java/cn/daxpay/open/channel/wechat/strategy/isv/sync/WechatIsvSyncStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.wechat.strategy.isv; +package cn.daxpay.open.channel.wechat.strategy.isv.sync; import cn.daxpay.open.channel.wechat.client.credential.WechatSdkCredential; import cn.daxpay.open.channel.wechat.service.isv.WechatIsvConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/cleanup/direct/YeepayDirectChannelMerchantCleanupStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/merchant/YeepayDirectChannelMerchantCleanupStrategy.java similarity index 73% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/cleanup/direct/YeepayDirectChannelMerchantCleanupStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/merchant/YeepayDirectChannelMerchantCleanupStrategy.java index cee1af978..be3bd1c81 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/cleanup/direct/YeepayDirectChannelMerchantCleanupStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/merchant/YeepayDirectChannelMerchantCleanupStrategy.java @@ -1,8 +1,8 @@ -package cn.daxpay.open.channel.yeepay.cleanup.direct; +package cn.daxpay.open.channel.yeepay.strategy.merchant; import cn.daxpay.open.channel.yeepay.dao.direct.YeepayDirectKeyConfigManager; -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; @@ -18,10 +18,10 @@ public class YeepayDirectChannelMerchantCleanupStrategy implements ChannelMercha private final YeepayDirectKeyConfigManager yeepayDirectKeyConfigManager; - /// 通道编码(对应 [ChannelEnum#YEE_PAY]) + /// 对应产品: 易宝 @Override - public String getChannel() { - return ChannelEnum.YEE_PAY.getCode(); + public ProductEnum getProduct() { + return ProductEnum.YEE_PAY; } /// 清理指定通道商户号下易宝直连的所有扩展数据(直连配置表) diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectCloseStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectCloseStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectCloseStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectCloseStrategy.java index bc35b88a7..892b3692f 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectCloseStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectCloseStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.pay; import cn.daxpay.open.channel.yeepay.client.credential.YeepaySdkCredential; import cn.daxpay.open.channel.yeepay.service.direct.YeepayDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectPayStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectPayStrategy.java similarity index 97% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectPayStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectPayStrategy.java index b69b96593..32f2053d3 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectPayStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/pay/YeepayDirectPayStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.pay; import cn.daxpay.open.channel.yeepay.client.credential.YeepaySdkCredential; import cn.daxpay.open.channel.yeepay.service.direct.YeepayDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayProductStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/product/YeepayDirectProductStrategy.java similarity index 94% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayProductStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/product/YeepayDirectProductStrategy.java index 17c8a58f2..ffacaaa68 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayProductStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/product/YeepayDirectProductStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.product; import cn.daxpay.open.platform.core.enums.pay.channel.PayCapabilityEnum; import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum; @@ -18,7 +18,7 @@ import java.util.Map; @Slf4j @Service @RequiredArgsConstructor -public class YeepayProductStrategy extends AbsProductStrategy { +public class YeepayDirectProductStrategy extends AbsProductStrategy { /// 支付方式 → 支付能力映射 private static final Map> METHOD_CAP_MAP = Map.ofEntries( diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectRefundStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectRefundStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectRefundStrategy.java index 9d3d38cbb..d1fb8a414 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.refund; import cn.daxpay.open.channel.yeepay.client.credential.YeepaySdkCredential; import cn.daxpay.open.channel.yeepay.service.direct.YeepayDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncRefundStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectSyncRefundStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncRefundStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectSyncRefundStrategy.java index 971e0db0b..0322e589e 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncRefundStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/refund/YeepayDirectSyncRefundStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.refund; import cn.daxpay.open.channel.yeepay.client.credential.YeepaySdkCredential; import cn.daxpay.open.channel.yeepay.service.direct.YeepayDirectConfigAssembler; diff --git a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncStrategy.java b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/sync/YeepayDirectSyncStrategy.java similarity index 96% rename from daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncStrategy.java rename to daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/sync/YeepayDirectSyncStrategy.java index 6a5fc0a6d..8969e4d55 100644 --- a/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/YeepayDirectSyncStrategy.java +++ b/daxpay-channel/daxpay-channel-yeepay/src/main/java/cn/daxpay/open/channel/yeepay/strategy/sync/YeepayDirectSyncStrategy.java @@ -1,4 +1,4 @@ -package cn.daxpay.open.channel.yeepay.strategy; +package cn.daxpay.open.channel.yeepay.strategy.sync; import cn.daxpay.open.channel.yeepay.client.credential.YeepaySdkCredential; import cn.daxpay.open.channel.yeepay.service.direct.YeepayDirectConfigAssembler; diff --git a/daxpay-payment/daxpay-payment-admin/src/main/java/cn/daxpay/open/payment/admin/service/merchant/info/MerchantAdminService.java b/daxpay-payment/daxpay-payment-admin/src/main/java/cn/daxpay/open/payment/admin/service/merchant/info/MerchantAdminService.java index a7d272cce..ce6d15d90 100644 --- a/daxpay-payment/daxpay-payment-admin/src/main/java/cn/daxpay/open/payment/admin/service/merchant/info/MerchantAdminService.java +++ b/daxpay-payment/daxpay-payment-admin/src/main/java/cn/daxpay/open/payment/admin/service/merchant/info/MerchantAdminService.java @@ -198,7 +198,7 @@ public class MerchantAdminService { /// - 通道扩展表(各通道 `XxxChannelMerchant` + `XxxKeyConfig`)**不在本次级联范围**, /// 避免事务过深与跨模块循环依赖;主表 `mch_channel_merchant` 删除后路由不再命中, /// 扩展表孤儿数据对业务无影响。 - /// - 通道商户主表删除仅清主表,不触发 [cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantCleanupStrategyFactory]。 + /// - 通道商户主表删除仅清主表,不触发 [cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy]。 @Transactional(rollbackFor = Exception.class) public void delete(Long id) { MerchantInfo merchant = merchantInfoManager.findById(id) diff --git a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategy.java b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategy.java deleted file mode 100644 index 2c8523455..000000000 --- a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategy.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.daxpay.open.payment.merchant.service.channel; - -/// # 通道商户扩展数据清理策略 -/// -/// 用于通道商户删除时的级联清理:各通道子模块(daxpay-channel-*)实现此策略, -/// 在主表 `mch_channel_merchant` 删除时同步清理通道私有数据(通道扩展表、密钥配置等)。 -/// -/// 设计要点: -/// - 主应用通过 [ChannelMerchantCleanupStrategyFactory] 按 `channel` 反查实现,未实现的通道跳过; -/// - 跳过的通道会留下孤儿数据,但主表已删、路由不再命中,对业务无影响; -/// - 实现类使用 `@Service`/`@Component` 注册到 Spring 容器,由工厂通过 -/// [cn.hutool.extra.spring.SpringUtil#getBeansOfType] 统一收集; -/// - 同一 channel 允许多个实现(如 `ALIPAY` 同时存在直连与服务商两条子商户绑定, -/// `HUIFU` 同时对应 adapay 与 dougong 两个子模块),工厂按 channel 过滤后遍历调用,互不影响。 -/// -/// 命名约定:实现类命名为 `{Channel}{Mode}ChannelMerchantCleanupStrategy`, -/// 放在各通道子模块的 `cleanup/{direct|isv}/` 子包下,与支付策略(`strategy/`)子域物理隔离。 -/// -/// @see ChannelMerchantCleanupStrategyFactory -public interface ChannelMerchantCleanupStrategy { - - /// 该实现所属的通道编码 - /// - /// 返回值应与 [cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum] 的 code 一致, - /// 工厂按 `channel` 过滤后定位实现。同 channel 多个实现时全部调用。 - String getChannel(); - - /// 清理指定通道商户的扩展数据 - /// - /// 仅清理通道私有数据(扩展表 + KeyConfig 等),通用主表 `mch_channel_merchant` 由主应用负责删除。 - /// 实现应保证幂等:同一 channelMchNo 重复调用不应产生副作用。 - /// - /// @param channelMchNo 通道商户号(平台侧生成的全局唯一号) - void deleteByChannelMchNo(String channelMchNo); -} diff --git a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategyFactory.java b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategyFactory.java deleted file mode 100644 index 8c7028f7f..000000000 --- a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantCleanupStrategyFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.daxpay.open.payment.merchant.service.channel; - -import cn.hutool.extra.spring.SpringUtil; -import lombok.experimental.UtilityClass; - -/// # 通道商户清理策略工厂 -/// -/// 模仿 [cn.daxpay.open.payment.strategy.PaymentStrategyFactory] 的工具类风格: -/// - `@UtilityClass` 所有方法静态化; -/// - 通过 [SpringUtil#getBeansOfType] 在调用时实时查 Spring 容器(与 PaymentStrategyFactory 同构); -/// - 按策略的 [ChannelMerchantCleanupStrategy#getChannel] 业务过滤,而非依赖包路径或 bean 名。 -/// -/// 与 PaymentStrategyFactory 的唯一结构差异:本工厂支持**同 channel 一对多**(如 `ALIPAY` 直连+服务商共享, -/// `HUIFU` 同时对应 adapay 与 dougong),用 `filter().forEach()` 遍历所有匹配实现; -/// PaymentStrategyFactory 则是按 product 一对一,用 `findFirst()`。 -/// -/// 未实现策略的通道跳过(孤儿数据不影响业务:主表已删、路由不再命中)。 -@UtilityClass -public class ChannelMerchantCleanupStrategyFactory { - - /// 按通道清理指定通道商户的扩展数据 - /// - /// 同 channel 存在多个实现时全部调用(如 `ALIPAY` 直连+服务商、`HUIFU` 的 adapay + dougong)。 - /// 未注册任何实现的 channel 静默跳过,不抛异常。 - /// - /// @param channel 通道编码(来自 [cn.daxpay.open.platform.core.enums.pay.channel.ChannelEnum]) - /// @param channelMchNo 通道商户号 - public void cleanup(String channel, String channelMchNo) { - SpringUtil.getBeansOfType(ChannelMerchantCleanupStrategy.class) - .values().stream() - .filter(strategy -> strategy.getChannel().equals(channel)) - .forEach(strategy -> strategy.deleteByChannelMchNo(channelMchNo)); - } -} diff --git a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantService.java b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantService.java index c73117c32..280ea27c5 100644 --- a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantService.java +++ b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/merchant/service/channel/ChannelMerchantService.java @@ -29,6 +29,8 @@ import cn.daxpay.open.payment.route.dao.basic.PayRouteBasicConfigManager; import cn.daxpay.open.payment.route.dao.scene.PayRouteSceneConfigManager; import cn.daxpay.open.payment.route.entity.basic.PayRouteBasicConfig; import cn.daxpay.open.payment.route.entity.scene.PayRouteSceneConfig; +import cn.daxpay.open.payment.strategy.PaymentStrategyFactory; +import cn.daxpay.open.payment.strategy.merchant.ChannelMerchantCleanupStrategy; import cn.daxpay.open.payment.trade.order.dao.GatewayPayOrderManager; import cn.daxpay.open.payment.trade.order.dao.NormalPayOrderManager; import cn.daxpay.open.payment.trade.order.dao.PayTradeManager; @@ -115,7 +117,8 @@ public class ChannelMerchantService { /// 策略: /// - **交易类数据存在则拒删**(资金交易/订单/退款硬引用,必须可追溯) /// - 通过校验后,按 `channelMchNo` 级联逻辑删除所有平台配置类子表 - /// - 各通道子模块扩展数据通过 [ChannelMerchantCleanupStrategyFactory] 策略清理(未实现的通道跳过) + /// - 各通道子模块扩展数据通过 [PaymentStrategyFactory#findOptionallyByProduct] 按产品查找 + /// [ChannelMerchantCleanupStrategy] 策略清理(未实现的通道跳过) /// /// 设计权衡: /// - 路由 `pay_route_*` 与 `gateway_*` 子表均按 `channelMchNo` 强关联,主表删除后必须清理避免脏数据 @@ -154,29 +157,14 @@ public class ChannelMerchantService { gatewayAggregateClientEnvManager.deleteByField(GatewayAggregateClientEnv::getChannelMchNo, channelMchNo); channelTerminalManager.deleteByField(ChannelTerminal::getChannelMchNo, channelMchNo); - // 3. 通道扩展表 + KeyConfig 清理(策略工厂按 channel 反查实现) - String channel = resolveChannelByProduct(mchInfo.getProduct()); - if (channel != null) { - ChannelMerchantCleanupStrategyFactory.cleanup(channel, channelMchNo); - } + // 3. 通道扩展表 + KeyConfig 清理(按 product 一对一,未实现策略的通道静默跳过) + PaymentStrategyFactory.findOptionallyByProduct(mchInfo.getProduct(), ChannelMerchantCleanupStrategy.class) + .ifPresent(strategy -> strategy.deleteByChannelMchNo(channelMchNo)); // 4. 主表逻辑删 channelMerchantManager.deleteById(id); } - /// 通过支付产品编码反查通道编码 - /// - /// 用于删除通道商户时定位通道扩展清理 SPI 实现。 - /// 不存在则返回 null(跳过 SPI 清理,仅删主表与平台配置)。 - private String resolveChannelByProduct(String product) { - if (product == null || product.isBlank()) { - return null; - } - return payProductManager.findByField(PayProduct::getCode, product) - .map(PayProduct::getChannel) - .orElse(null); - } - /// 根据商户和支付产品查询通道商户号列表, 多数支付通道配置使用 public List dropdown(String mchNo, String product){ return channelMerchantManager.findAllByMchNoAndProduct(mchNo, product).stream() diff --git a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/PaymentStrategyFactory.java b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/PaymentStrategyFactory.java index 7bb8da63e..ce83ef494 100644 --- a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/PaymentStrategyFactory.java +++ b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/PaymentStrategyFactory.java @@ -10,6 +10,7 @@ import lombok.experimental.UtilityClass; import java.util.ArrayList; import java.util.List; +import java.util.Optional; /// # 策略工厂工具类 /// @@ -30,6 +31,17 @@ public class PaymentStrategyFactory { .orElseThrow(() -> new UnsupportedAbilityException("pay.error.unsupportedAbilityWithDetail", product)); } + /// 软查找: 未匹配返回 [Optional#empty], 不抛异常 + /// + /// 用于"未实现策略的 product 静默跳过"场景(如通道商户清理 SPI, + /// 未实现清理策略的通道留孤儿数据,业务无影响)。 + public Optional findOptionallyByProduct(String product, Class clazz) { + var beansOfType = SpringUtil.getBeansOfType(clazz); + return beansOfType.values().stream() + .filter(strategy -> strategy.getProduct().getCode().equals(product)) + .findFirst(); + } + /// 判断传入产品的策略是否存在 public boolean existsByProduct(String product, Class clazz) { var beansOfType = SpringUtil.getBeansOfType(clazz); diff --git a/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/merchant/ChannelMerchantCleanupStrategy.java b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/merchant/ChannelMerchantCleanupStrategy.java new file mode 100644 index 000000000..56f97dd5d --- /dev/null +++ b/daxpay-payment/daxpay-payment-core/src/main/java/cn/daxpay/open/payment/strategy/merchant/ChannelMerchantCleanupStrategy.java @@ -0,0 +1,37 @@ +package cn.daxpay.open.payment.strategy.merchant; + +import cn.daxpay.open.payment.strategy.PaymentStrategy; + +/// # 通道商户扩展数据清理策略 +/// +/// 用于通道商户删除时的级联清理:各通道子模块(daxpay-channel-*)实现此策略, +/// 在主表 `mch_channel_merchant` 删除时同步清理通道私有数据(通道扩展表、密钥配置等)。 +/// +/// 设计要点: +/// - 继承 [PaymentStrategy], 通过 [PaymentStrategyFactory#findOptionallyByProduct] 按 `product` 反查实现, +/// 与既有支付策略(Pay/Refund/Sync 等)共用同一套工厂体系, 形式完全对齐; +/// - 按 `product` 一对一查找, 区别于支付策略的"通道分组遍历"——每个通道商户记录只对应一个 product, +/// 删除时只触发对应 product 的清理策略, 不影响同 channel 其他 product 的扩展数据; +/// - 未实现策略的 product 静默跳过([PaymentStrategyFactory#findOptionallyByProduct] 返回空 Optional), +/// 留孤儿数据(主表已删、路由不再命中), 业务无影响; +/// - 实现类使用 `@Service`/`@Component` 注册到 Spring 容器, 由工厂通过 +/// [cn.hutool.extra.spring.SpringUtil#getBeansOfType] 统一收集。 +/// +/// 命名约定:实现类命名为 `{Channel}{Mode}ChannelMerchantCleanupStrategy`, +/// 放在各通道子模块的 `strategy/direct|isv/merchant/`(alipay/wechat 三层) +/// 或 `strategy/merchant/`(其他 11 个通道二层)子包下, +/// 与支付策略(`strategy/direct|isv/{pay,refund,sync,product}/`)按业务子域物理隔离。 +/// +/// 特殊场景:同一通道多 product 共享同一份扩展表的(如 UMS 的 6 个支付方式 product +/// 共享 `ums_direct_key_config`), 用抽象父类封装共享删除逻辑 + N 个产品子类各自 +/// `@Override getProduct()` 返回对应 [cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum]。 +public interface ChannelMerchantCleanupStrategy extends PaymentStrategy { + + /// 清理指定通道商户的扩展数据 + /// + /// 仅清理通道私有数据(扩展表 + KeyConfig 等),通用主表 `mch_channel_merchant` 由主应用负责删除。 + /// 实现应保证幂等:同一 channelMchNo 重复调用不应产生副作用。 + /// + /// @param channelMchNo 通道商户号(平台侧生成的全局唯一号) + void deleteByChannelMchNo(String channelMchNo); +}