Переглянути джерело

feat: 企业转账功能开关 transferEnabled — DB迁移+实体+DTO+Service

- V1.3: ALTER pay_enterprise ADD transfer_enabled BOOLEAN
- EnterpriseEntity/UpdateDTO/VO 加 transferEnabled 字段
- EnterpriseService.update 处理 transferEnabled
- toListVO/toVO 映射 transferEnabled
alphaH 1 день тому
батько
коміт
4831759576

+ 3 - 0
java/src/main/java/com/payment/platform/module/payment/enterprise/dto/EnterpriseVO.java

@@ -93,4 +93,7 @@ public class EnterpriseVO {
     @Schema(description = "万里汇uid")
     @com.fasterxml.jackson.annotation.JsonProperty("wanlihui_uid")
     private String wanlihuiUid;
+
+    @Schema(description = "是否开通转账功能")
+    private Boolean transferEnabled;
 }

+ 3 - 0
java/src/main/java/com/payment/platform/module/payment/enterprise/service/EnterpriseService.java

@@ -110,6 +110,7 @@ public class EnterpriseService {
         if (dto.getBusinessContracts() != null) e.setBusinessContracts(dto.getBusinessContracts());
         if (dto.getLegalRepIdPhoto() != null) e.setLegalRepIdPhoto(dto.getLegalRepIdPhoto());
         if (dto.getWanlihuiUid() != null) e.setWanlihuiUid(dto.getWanlihuiUid());
+        if (dto.getTransferEnabled() != null) e.setTransferEnabled(dto.getTransferEnabled());
         enterpriseMapper.updateById(e);
 
         // 对应 Python: 当状态为已激活或认证时,从支付宝同步企业信息
@@ -145,6 +146,7 @@ public class EnterpriseService {
         vo.setBusinessContracts(e.getBusinessContracts());
         vo.setLegalRepIdPhoto(e.getLegalRepIdPhoto());
         vo.setWanlihuiUid(e.getWanlihuiUid());
+        vo.setTransferEnabled(e.getTransferEnabled());
         return vo;
     }
 
@@ -179,6 +181,7 @@ public class EnterpriseService {
         vo.setBusinessContracts(e.getBusinessContracts());
         vo.setLegalRepIdPhoto(e.getLegalRepIdPhoto());
         vo.setWanlihuiUid(e.getWanlihuiUid());
+        vo.setTransferEnabled(e.getTransferEnabled());
         return vo;
     }
 }

+ 2 - 0
java/src/main/resources/db/migration/V1.3__pay_enterprise_transfer_enabled.sql

@@ -0,0 +1,2 @@
+-- V1.3: 企业转账功能开关
+ALTER TABLE pay_enterprise ADD COLUMN IF NOT EXISTS transfer_enabled BOOLEAN DEFAULT false;

+ 2 - 0
logs/payment-platform.log

@@ -2385,3 +2385,5 @@ java.io.IOException: 你的主机中的软件中止了一个已建立的连接
 2026-07-15 16:10:07.126 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
 2026-07-15 16:10:07.128 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 2 ms
 2026-07-15 16:10:07.512 [tomcat-handler-0] INFO  c.p.p.c.alipay.AlipayClientFactory - 服务商[3]客户端创建成功, appId=2021006160682088, name=跨境服务商
+2026-07-15 16:50:45.456 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ...
+2026-07-15 16:50:45.459 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed