Эх сурвалжийг харах

refactor: secondary_partner_info从EnterpriseEntity取而非法前端传入

- 去掉前端 partner_identity/partner_name 输入框
- createOnboard 从 EnterpriseEntity 取 identity/identity_type/name
- Controller 去掉 alipay_user_id 参数
alphaH 1 өдөр өмнө
parent
commit
566f2ce8b3

+ 0 - 1
frontend/src/api/module_payment/account.ts

@@ -71,7 +71,6 @@ export const AccountAPI = {
     scene_directions: string;
     scene_image: string;
     sites?: string;
-    alipay_user_id: string;
   }) {
     return request<ApiResponse<{ order_id: string; out_biz_no: string; status: string }>>({
       url: `${API_PATH}/onboard/create`,

+ 0 - 1
frontend/src/views/module_payment/account/index.vue

@@ -949,7 +949,6 @@ async function handleOnboardSubmit() {
         scene_directions: onboardForm.scene_directions,
         scene_image: onboardImageIds.value.join(","),
         sites,
-        alipay_user_id: enterpriseStore.getCurrentEnterprise?.identity || "",
       });
       const data = res.data.data;
       if (data?.order_id) {

+ 1 - 2
java/src/main/java/com/payment/platform/module/payment/account/controller/AccountController.java

@@ -128,8 +128,7 @@ public class AccountController {
                 (String) b.get("scene_code"),
                 (String) b.get("scene_directions"),
                 (String) b.get("scene_image"),
-                (String) b.get("sites"),
-                (String) b.get("alipay_user_id")));
+                (String) b.get("sites")));
     }
 
     @PreAuthorize("@perm.hasAny('module_payment:account:authorize')")

+ 6 - 3
java/src/main/java/com/payment/platform/module/payment/account/service/AlipayTransferService.java

@@ -247,7 +247,7 @@ public class AlipayTransferService {
     /** alipay.fund.expandindirect.create — 创建进件单 */
     public Map<String, String> createOnboard(String enterpriseId, String sceneCode,
                                               String sceneDirections, String sceneImageKeys,
-                                              String sites, String alipayUserId) {
+                                              String sites) {
         if (sceneCode == null || sceneCode.isBlank())
             throw new BusinessException(400, "转账场景码不能为空");
         if (sceneDirections == null || sceneDirections.isBlank())
@@ -265,9 +265,12 @@ public class AlipayTransferService {
             model.setSceneDirections(sceneDirections);
             model.setSceneImage(sceneImageKeys);
             if (sites != null && !sites.isBlank()) model.setSites(sites);
+            EnterpriseEntity ent = enterpriseMapper.selectByEnterpriseIdIgnoreTenant(enterpriseId);
+            if (ent == null) throw new BusinessException(400, "企业不存在");
             SecondaryPartnerInfo partner = new SecondaryPartnerInfo();
-            partner.setIdentity(alipayUserId);
-            partner.setIdentityType("ALIPAY_USER_ID");
+            partner.setIdentity(ent.getIdentity() != null ? ent.getIdentity() : enterpriseId);
+            partner.setIdentityType(ent.getIdentityType() != null ? ent.getIdentityType() : "ALIPAY_USER_ID");
+            if (ent.getName() != null) partner.setName(ent.getName());
             model.setSecondaryPartnerInfo(partner);
 
             AlipayFundExpandindirectCreateRequest request = new AlipayFundExpandindirectCreateRequest();

+ 29 - 0
logs/payment-platform.log

@@ -1853,3 +1853,32 @@ Caused by: java.io.EOFException: null
 2026-07-15 14:38:16.080 [tomcat-handler-7] INFO  sdk.biz.info - Summary^_^10000^_^null^_^ProtocalMustParams:charset=UTF-8&method=alipay.fund.expandindirect.image.upload&sign=ZRW8JLn9MFWtr9tSafxOFVMt6TBahJxrdg2tp4ORy2OPdQvaP6jB7gl1cHYeiRmNQy8s03856MSsyOqOYbPhuFX3cBgpqHaqGuDRRJDc15Tj6xwHZpumJH+YLgWL7QYA9j2mPnFPiVys4CpzaaseQjzVKzUmq70ct3eXeM0VptP2d2bJ4vLhAnOZbosGqcnmHuShk7b0tDcRDkwlxhmS3E0TjbQN88ejq0Flo+ySE8pHpzJg0uB/7kSiXAkLlvYR1LmCtcfLHm3PiJZvRmkxjkEytSAlOevYUOZ0RiCuSJAiQLAmlyvMazFT4eoAfOgi1hzL4+zc+KefVfq2A5FCiA==&version=1.0&app_id=2021006160682088&sign_type=RSA2&timestamp=2026-07-15 14:38:15^_^ProtocalOptParams:alipay_sdk=alipay-sdk-java-4.40.865.ALL&format=JSON^_^ApplicationParams:traceId=218a0f9f17840974956398387e4b10&product_code=MERCHANT_TRANSFER_EXPAND_INDIRECT&biz_scene=ENTRUST_SATF_TRANSFER&image_type=png^_^9ms,857ms,10ms^_^trace_id:218a0f9f17840974956398387e4b10
 2026-07-15 14:44:10.296 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ...
 2026-07-15 14:44:10.298 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
+2026-07-15 14:44:15.529 [background-preinit] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator 8.0.1.Final
+2026-07-15 14:44:15.599 [main] INFO  c.p.platform.PaymentApplication - Starting PaymentApplication using Java 21.0.11 with PID 38804 (D:\project2\payment-platform\java\target\classes started by 1 in D:\project2\payment-platform)
+2026-07-15 14:44:15.600 [main] INFO  c.p.platform.PaymentApplication - The following 1 profile is active: "dev"
+2026-07-15 14:44:16.551 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
+2026-07-15 14:44:16.553 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
+2026-07-15 14:44:16.605 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 41 ms. Found 0 Redis repository interfaces.
+2026-07-15 14:44:17.185 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8001 (http)
+2026-07-15 14:44:17.193 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"]
+2026-07-15 14:44:17.194 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
+2026-07-15 14:44:17.194 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.20]
+2026-07-15 14:44:17.238 [main] INFO  o.a.c.c.C.[.[localhost].[/api/v1] - Initializing Spring embedded WebApplicationContext
+2026-07-15 14:44:17.238 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1499 ms
+2026-07-15 14:44:17.262 [main] INFO  c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource
+2026-07-15 14:44:18.644 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
+2026-07-15 14:44:19.363 [main] WARN  c.p.p.c.alipay.AlipayClientFactory - 支付宝默认配置不完整,将仅使用服务商/租户专属客户端
+2026-07-15 14:44:19.506 [main] INFO  c.p.platform.core.oss.OssService - OSS client initialized: bucket=hunanxiaojunzioss, endpoint=oss-cn-beijing.aliyuncs.com
+2026-07-15 14:44:19.805 [main] INFO  c.p.p.m.p.e.s.EnterpriseNameSyncScheduler - [企业名称同步] 调度器启动
+2026-07-15 14:44:20.070 [main] INFO  c.p.p.m.p.n.s.NotificationService - 已注册 7 个通知处理器: [AccountHandler, BillHandler, EmployeeHandler, EnterpriseHandler, InstitutionHandler, OrderHandler, VoucherHandler]
+2026-07-15 14:44:20.579 [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@6939f18a, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@8bd9d08, org.springframework.security.web.context.SecurityContextHolderFilter@701da311, org.springframework.security.web.header.HeaderWriterFilter@732bb49d, org.springframework.web.filter.CorsFilter@189f3ccd, org.springframework.security.web.authentication.logout.LogoutFilter@44c54463, com.payment.platform.core.security.JwtAuthFilter@682fe17b, com.payment.platform.core.security.TenantApiKeyAuthFilter@531bec12, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5de14222, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6fb51e17, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@2eb0932c, org.springframework.security.web.session.SessionManagementFilter@19a4cdea, org.springframework.security.web.access.ExceptionTranslationFilter@45e68fac, org.springframework.security.web.access.intercept.AuthorizationFilter@41041c31]
+2026-07-15 14:44:20.985 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"]
+2026-07-15 14:44:20.996 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8001 (http) with context path '/api/v1'
+2026-07-15 14:44:21.118 [main] INFO  c.p.platform.PaymentApplication - Started PaymentApplication in 6.169 seconds (process running for 6.753)
+2026-07-15 14:44:23.041 [main] INFO  c.p.p.core.config.AppStartupRunner - 系统配置缓存初始化完成
+2026-07-15 14:44:24.700 [main] INFO  c.p.p.core.config.AppStartupRunner - 数据字典缓存初始化完成 (10 个字典类型)
+2026-07-15 14:44:39.279 [tomcat-handler-0] INFO  o.a.c.c.C.[.[localhost].[/api/v1] - Initializing Spring DispatcherServlet 'dispatcherServlet'
+2026-07-15 14:44:39.279 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
+2026-07-15 14:44:39.282 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 2 ms
+2026-07-15 14:44:55.755 [tomcat-handler-7] INFO  c.p.p.c.alipay.AlipayClientFactory - 服务商[3]客户端创建成功, appId=2021006160682088, name=跨境服务商
+2026-07-15 14:44:56.638 [tomcat-handler-7] INFO  sdk.biz.info - Summary^_^10000^_^null^_^ProtocalMustParams:charset=UTF-8&method=alipay.fund.expandindirect.image.upload&sign=JrQgUi94/Cl4gWV3W/O7/GkT8DWC0XSbxLICXeiw7dEIvbfucj9d23DDkUWrIGiz9OtMdAwTODjIA48TlGwTrqYkjm2Zc3j/BqAj3N5zNnyn7Y7OTVStmjcDXobefJJaG6N9Edz9HPf1k+ajF8iAq2XoAgRKyC11A4JQKQi0dusKD57t5Zwf9J+BvSuORnLl1BC7aLT++NHrJQ/zyJczbvSgKmOn8s9ajXaFDnolVgM2CiWRIja8s4ZpXkTmO7ldaYDQhXOiykr/wQC8pj868U3Cm7mTZ9eEzf8LwZxCv3/9Ru92CykhsXgn4yo1uS2uJJpKfuZm5tOvksssS7VK0g==&version=1.0&app_id=2021006160682088&sign_type=RSA2&timestamp=2026-07-15 14:44:55^_^ProtocalOptParams:alipay_sdk=alipay-sdk-java-4.40.865.ALL&format=JSON^_^ApplicationParams:traceId=2197054a17840978963616807eb098&product_code=MERCHANT_TRANSFER_EXPAND_INDIRECT&biz_scene=ENTRUST_SATF_TRANSFER&image_type=png^_^24ms,840ms,18ms^_^trace_id:2197054a17840978963616807eb098