云
18 小时以前 d9a5ba1de2fce6bd8c50dace505e4bf7864043ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package cn.iocoder.yudao.module.system.api.agent.imports;
 
import cn.iocoder.yudao.module.system.framework.agent.AgentPrincipal;
 
/**
 * 业务模块导入适配器:system 模块负责幂等、逐行事务与回执,适配器只负责单行校验和写入。
 */
public interface AgentImportModuleAdapter {
 
    /** 与 Python 侧 ModuleSpec.module_id 对齐,如 srm.supplier。 */
    String moduleId();
 
    /** 提交该模块所需的业务权限。 */
    String permission();
 
    /** 只读预检;必须返回稳定的 preflightHash 供提交时比对。 */
    AgentImportPreflightRespVO preflight(AgentPrincipal principal, AgentImportPreflightReqVO request);
 
    /** 单行写入;失败时抛出异常,由编排层写入 FAILED 回执。 */
    AgentImportRowReceipt commitRow(AgentPrincipal principal, AgentImportCommitReqVO request,
                                    AgentImportPreflightRespVO.Row planned,
                                    AgentImportPreflightReqVO.Row row);
}