修正 SuperAgent 来源消息 ID 契约
This commit is contained in:
@@ -89,7 +89,7 @@ Controller、Service、Service 实现类的方法必须有中文注释。Entity
|
||||
目标:
|
||||
|
||||
- 建立 AI 接收批次表和 AI 过渡表。
|
||||
- 保存 `source_message_id + ai_task_results[] + extraction_warnings[]`。
|
||||
- 保存外部 `source_message_id + ai_task_results[] + extraction_warnings[]`,并将外部来源消息 ID 反查为内部 SourceMessage Inbox ID 后落业务表。
|
||||
- 实现系统生成幂等键,保证重复提交不重复创建记录。
|
||||
|
||||
建议范围:
|
||||
@@ -98,13 +98,13 @@ Controller、Service、Service 实现类的方法必须有中文注释。Entity
|
||||
- Entity、Mapper、Repository。
|
||||
- 批次幂等键生成。
|
||||
- item 幂等键生成。
|
||||
- `source_message_id` 存在性校验。
|
||||
- 外部 `source_message_id` 存在性校验:通过 `hotel_id + provider + channel + external_message_id` 查找 SourceMessage Inbox。
|
||||
- 保存 AI 原始 JSON 和常用物理列。
|
||||
|
||||
验收标准:
|
||||
|
||||
- 同一请求重复提交返回幂等重放,不重复插入。
|
||||
- 同一 `source_message_id` 不同请求体第一版返回 `409`。
|
||||
- 同一外部 `source_message_id` 不同请求体第一版返回 `409`。
|
||||
- 每个 item 保存 `array_index`、`source_event_index` 和 `execution_order`。
|
||||
- 保存 `ai_payload_json`,用户后续修改不得覆盖该字段。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user