# Order

> <!-- GENERATED BY AUTO-WIKI SCANNER -->

- Skill: `woaillr-crypto/order-3` (Agent Skill, multi-file: 11 files)
- Install (CLI): `npx skillmds@latest add woaillr-crypto/order-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/woaillr-crypto/order-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: woaillr-crypto (https://skillmd.com/u/woaillr-crypto)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/woaillr-crypto/order-3

---

<!-- GENERATED BY AUTO-WIKI SCANNER -->
# order 业务域

## 何时使用

当需求、缺陷或排查涉及以下关键词时使用本域文档：`order`、`/api/order/create`, `/api/order/{order_id}`, `/api/order/{order_id}/status`

## 文件统计

入口 API 1, 数据模型 1, 业务服务 1，共 3 个文件

## API 入口

- `/api/order/create`
- `/api/order/{order_id}`
- `/api/order/{order_id}/status`

## 关联数据表

`t_order`

## MQ 消费者

- 未检测到 MQ 消费者

## MQ 发送

- 未检测到 MQ 发送

## 定时任务

- 未检测到定时任务

## RPC 依赖

- 未检测到 RPC 依赖

## 风险信号

async/await 异步路径, 事务边界（@atomic / transaction）, 缓存读写

## 核心文件清单

| 角色 | 类 | 说明 | 文件 |
| --- | --- | --- | --- |
| 入口 API | - | Order REST API — handles order creation and queries. | app/order/api.py |
| 业务服务 | OrderService | Order business service — orchestrates persistence, cache and async tasks. | app/order/service.py |
| 数据模型 | Base | SQLAlchemy models for the order domain. | app/order/models.py |

## 修改前检查

- **权限**：检查 Controller 的拦截器、注解和用户上下文
- **事务**：优先阅读带 `@Transactional` 的 Service/Manager
- **幂等**：检查唯一键、业务单号、回调/消息重复消费
- **并发**：检查锁、状态流转、库存/余额/次数类扣减
- **缓存**：检查 Redis、Cache 注解和缓存失效时机
- **兼容性**：检查枚举、状态码、历史数据和外部接口契约

