From d8eaa16682cf180e9563d6be05fb43057daf6c07 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期一, 12 十月 2026 10:34:14 +0800
Subject: [PATCH] feat(merchant): 后台纳管外部进件商户并支持解绑

---
 talent-card-server/src/main/java/com/talentcard/server/business/merchant/MerchantSettlementService.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/talent-card-server/src/main/java/com/talentcard/server/business/merchant/MerchantSettlementService.java b/talent-card-server/src/main/java/com/talentcard/server/business/merchant/MerchantSettlementService.java
index cfc209b..2e7c25e 100644
--- a/talent-card-server/src/main/java/com/talentcard/server/business/merchant/MerchantSettlementService.java
+++ b/talent-card-server/src/main/java/com/talentcard/server/business/merchant/MerchantSettlementService.java
@@ -82,7 +82,10 @@
         List<Map<String,Object>> records=rows("select * from merchant_onboarding_application where id=? and initial_bank_card_id is not null",applicationId);
         if(records.isEmpty()) throw new BusinessException(ErrorCode.NOT_FOUND,"Onboarding application not found");
         String applicationNo=clean(records.get(0).get("applicationNo"));
-        if (!applicationNo.isBlank()) continuePostOnboardingProvisioning(applicationNo);
+        // 后台纳管的进件(source=managed)只查询不下发:业务开通与微信配置都是下发类操作,而外部商户的
+        // 口径已由业务要求保持一致,纳管只需核实;连锁多店共用同一个汇付商户号时各自下发还会重复下发。
+        // 判定只认 MerchantOnboardingProgressService.isManaged 那一处定义。
+        if (!applicationNo.isBlank() && !MerchantOnboardingProgressService.isManaged(records.get(0))) continuePostOnboardingProvisioning(applicationNo);
         return onboardingProgressService.refresh(applicationId,retry);
     }
 

--
Gitblit v1.7.1