P2-1: 移植 EIP3 组织/用户/角色/OTP 模块进保真层(原样,包名签名不动)

framework/com.dsasp.server.organize/src 的 5 个 impl 原样移入 platform-legacy-core:
OrganizationServiceImpl / UserFindServiceImpl / RoleServiceImpl /
UserOtpServiceImpl / AssignmentHandlerImpl(Activator 不移植,见手册 §5.17)。

补齐依赖闭包(legacy-core 原无):
- common 接口 5 个:OrganizationService / UserFindService / RoleService /
  UserOtpService / AssignmentHandler
- AssignmentHandlerImpl 的 workflow 依赖:ProcessDefinitionService + WFMould

OTP 库 jotpverify.jar(ft.otp.verify.OTPVerify,无公网坐标)经
platform-legacy-core/local-libs 模块内私有仓库解析(file://),
父 pom 不动,构建可复现(手册 §5.OTP)。

LegacyXmlWiring 补 4 个 impl 的 setter 注入(等价原 organize service.xml
<property>,旧类零修改,手册 §4.1)。

privilege 模块 diff 核查:除 OSGi Activator 外已全部在仓库,无需再搬。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 13:38:37 +08:00
parent 33d793b825
commit 0ebe6d692b
16 changed files with 1436 additions and 1 deletions

View File

@@ -13,11 +13,20 @@ import com.dsasp.server.common.log.service.SystemLogManager;
import com.dsasp.server.core.service.FlowServiceImpl;
import com.dsasp.server.dataDic.service.POJOCRUDServiceImpl;
import com.dsasp.server.dataDic.service.POJOServiceImpl;
import com.dsasp.server.organize.service.AssignmentHandlerImpl;
import com.dsasp.server.organize.service.OrganizationServiceImpl;
import com.dsasp.server.organize.service.UserFindServiceImpl;
import com.dsasp.server.organize.service.UserOtpServiceImpl;
/**
* 等价替代原 com.dsasp.server.dataDic/META-INF/spring/service.xml 的
* <property> setter 装配:systemLogManager / dataOperatorLog 在旧代码中
* 不是 @Autowired 字段,而是 XML 注入。这里集中补齐,旧类零修改。
*
* <p>P2 组织/用户:OrganizationServiceImpl / UserFindServiceImpl / UserOtpServiceImpl /
* AssignmentHandlerImpl 的依赖(pojoCRUDService、jdbcTemplate、organizationService、userFindService)
* 在 framework 同样是 XML &lt;property&gt; setter 注入(非 @Autowired 字段),这里一并补齐
* (旧类零修改,见迁移手册 §4.1)。RoleServiceImpl.jdbcTemplate 是 @Autowired,无需手工补。
*/
@Configuration
public class LegacyXmlWiring implements SmartInitializingSingleton {
@@ -28,19 +37,31 @@ public class LegacyXmlWiring implements SmartInitializingSingleton {
private final DataOperatorLog dataOperatorLog;
private final FlowServiceImpl flowService;
private final JdbcTemplate jdbcTemplate;
private final OrganizationServiceImpl organizationService;
private final UserFindServiceImpl userFindService;
private final UserOtpServiceImpl userOtpService;
private final AssignmentHandlerImpl assignmentHandler;
public LegacyXmlWiring(POJOCRUDServiceImpl pojoCRUDService,
POJOServiceImpl pojoService,
SystemLogManager systemLogManager,
DataOperatorLog dataOperatorLog,
FlowServiceImpl flowService,
JdbcTemplate jdbcTemplate) {
JdbcTemplate jdbcTemplate,
OrganizationServiceImpl organizationService,
UserFindServiceImpl userFindService,
UserOtpServiceImpl userOtpService,
AssignmentHandlerImpl assignmentHandler) {
this.pojoCRUDService = pojoCRUDService;
this.pojoService = pojoService;
this.systemLogManager = systemLogManager;
this.dataOperatorLog = dataOperatorLog;
this.flowService = flowService;
this.jdbcTemplate = jdbcTemplate;
this.organizationService = organizationService;
this.userFindService = userFindService;
this.userOtpService = userOtpService;
this.assignmentHandler = assignmentHandler;
}
@Override
@@ -51,6 +72,17 @@ public class LegacyXmlWiring implements SmartInitializingSingleton {
// 服务流引擎:FlowServiceImpl.jdbcTemplate 在 framework 经 XML <property> 注入,非 @Autowired 字段。
// 等价补齐(见迁移手册 §4.1)。仅 isExistEntityFlow/addDefaultFlowService 用到,执行路径不依赖。
flowService.setJdbcTemplate(jdbcTemplate);
// P2 组织/用户:等价原 com.dsasp.server.organize/META-INF/spring/*.xml 的 <property> 注入
organizationService.setPojoCRUDService(pojoCRUDService);
organizationService.setJdbcTemplate(jdbcTemplate);
userFindService.setPojoCRUDService(pojoCRUDService);
userFindService.setJdbcTemplate(jdbcTemplate);
userFindService.setOrganizationService(organizationService);
userOtpService.setPojoCRUDService(pojoCRUDService);
userOtpService.setJdbcTemplate(jdbcTemplate);
assignmentHandler.setOrganizationService(organizationService);
assignmentHandler.setUserFindService(userFindService);
}
/** 引擎字段值含 joda DateTime(CREATETIME 等),Boot 3 需显式注册序列化模块。 */