17 lines
810 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 请求生命周期维护备注
HTML 主入口需要把一次请求从入口到响应讲完整,不能只列 Controller 或 URL。
建议顺序:
1. HTTP Request路径、方法、认证信息和请求体。
2. Version / Auth`X-API-Version: 1`、登录态、RBAC、owner、tenant。
3. Controller DTO参数校验、DTO 转换、统一响应包装。
4. Application事务、幂等、跨模块 facade、任务或外部编排。
5. Domain状态机、不变式、revision / expectedVersion / expectedStatus。
6. DB / AdapterMapper、外部 adapter、outbox、任务执行器。
7. Assembler读模型和 OpenAPI response DTO。
8. CommonResult对外 JSON 字段 `code/data/msg`
每个节点需要给出常见问题、定位证据和下一步,方便初级工程师按层排障。