chore: 落地 eip4-platform 多模块骨架基线(PoC→工程化)
从 eip4-poc 迁入双层制模块化单体:保真层 platform-legacy-core (com.dsasp 引擎原样)+ 现代层 platform-metadata/auth/flow-gateway/ converter/ai + platform-app 启动器。ArchUnit 纪律固化(保真层禁依赖现代层)。 此为 C1 对拍工作的编译通过基线。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
18
platform-auth/pom.xml
Normal file
18
platform-auth/pom.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.eip4</groupId>
|
||||
<artifactId>eip4-platform</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>platform-auth</artifactId>
|
||||
<name>platform-auth</name>
|
||||
<description>P2:组织/权限/数据权限真实现(当前为 PoC 桩 + C2 数据权限最小真实现)</description>
|
||||
<dependencies>
|
||||
<dependency><groupId>com.eip4</groupId><artifactId>platform-legacy-core</artifactId></dependency>
|
||||
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.dataDic.bean.GeneralPOJO;
|
||||
import com.dsasp.server.common.log.bean.DataLogItem;
|
||||
import com.dsasp.server.common.log.service.DataOperatorLog;
|
||||
|
||||
/**
|
||||
* WS1 桩:数据操作审计日志。原版写库记录字段级变更,PoC 降级为 slf4j。
|
||||
*/
|
||||
@Service("dataOperatorLog")
|
||||
public class StubDataOperatorLog implements DataOperatorLog {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger("eip3.datalog");
|
||||
|
||||
@Override
|
||||
public DataLogItem insertData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("insert {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataLogItem updateData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("update {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataLogItem deleteData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("delete {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.privilege.bean.DataFilterRule;
|
||||
import com.dsasp.server.common.privilege.service.DataPrivilegeService;
|
||||
|
||||
/**
|
||||
* WS1 桩:数据行级权限。PoC 阶段不过滤(返回 null 等价于 admin 视角),
|
||||
* 接口签名原样保留,P2 阶段以 EIP3 真实现替换。
|
||||
*/
|
||||
@Service("dataPrivilegeService")
|
||||
public class StubDataPrivilegeService implements DataPrivilegeService {
|
||||
|
||||
@Override
|
||||
public String getWhereClause(Properties ctx, String tableName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveOrUpdateDataPrivilege(String entityId, List<DataFilterRule> list, Properties ctx) {
|
||||
// PoC 不持久化权限规则
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataFilterRule> getEntityDataFilterRule(String entityId) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.dataDic.bean.GeneralPOJO;
|
||||
import com.dsasp.server.common.file.service.FileService;
|
||||
|
||||
/**
|
||||
* WS1 桩:附件服务。PoC 选定功能不含附件操作,全部 no-op;
|
||||
* 接口签名原样保留,P2 阶段以 EIP3 真实现替换。
|
||||
*/
|
||||
@Service("fileService")
|
||||
public class StubFileService implements FileService {
|
||||
|
||||
@Override
|
||||
public String save(String tempFile, String fileName, int size, String tableName, String businessKey, Properties ctx) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDoc(String relativePath, String fileName, int size, String tableName, String businessKey, Properties ctx) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDocFile(String relativePath, String fileName, boolean isZip) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> fileIds, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String fileId, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAttatchmentByBusinessKey(String businessKey, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAttatchmentByBusinessKey(List<String> businessKeys, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearDeletedDocument() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearDumpFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GeneralPOJO> getDoc(List<String> businessKeys) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPicPath(String tablename, String businesskey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveDecoderBase64File(String base64Code, String userId, String tableName, Properties ctx) throws Exception {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.viewframework.service.ProjectSwitchService;
|
||||
|
||||
/**
|
||||
* WS1 桩:项目切换服务。PoC 测试用户不挂项目。
|
||||
*/
|
||||
@Service("projectSwitchService")
|
||||
public class StubProjectSwitchService implements ProjectSwitchService {
|
||||
|
||||
@Override
|
||||
public boolean isUserInProjects(String userId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> findAllProjectByUserId(String userId) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProjectOrgId(String projectId) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.log.bean.SysLogItem;
|
||||
import com.dsasp.server.common.log.service.SystemLogManager;
|
||||
|
||||
/**
|
||||
* WS1 桩:系统日志。原版写库(操作日志审计),PoC 阶段降级为 slf4j 输出。
|
||||
*/
|
||||
@Service("systemLogManager")
|
||||
public class StubSystemLogManager implements SystemLogManager {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger("eip3.syslog");
|
||||
|
||||
@Override
|
||||
public void log(LogType logType, String logContent) {
|
||||
LOG.info("[{}] {}", logType, logContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByType(String type) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(List<SysLogItem> items) {
|
||||
if (items != null) {
|
||||
items.forEach(i -> LOG.info("[batch] {}", i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByLoginTime(List<String> userIds, DateTime[] loginTimes) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user