# 用户使用流程图 — 积分兑换 ```mermaid flowchart TD %% ============ 颜色定义 ============ classDef actor fill:#e1f5fe,stroke:#0288d1,stroke-width:2px classDef action fill:#fff3e0,stroke:#f57c00,stroke-width:1px classDef system fill:#e8f5e9,stroke:#388e3c,stroke-width:1px classDef decision fill:#fce4ec,stroke:#d32f2f,stroke-width:1px classDef role fill:#f3e5f5,stroke:#7b1fa2,stroke-width:1px classDef endpoint fill:#f5f5f5,stroke:#616161,stroke-width:1px,shape:box subgraph 积分概览 A1(("家长/孩子")) --> A2[获取积分余额 /balance] A2 --> A3[获取积分流水 /logs] A3 --> A4[按分类查询 /logs-by-category] A4 --> A5[管理系统余额 /system-balance] end subgraph 积分调整 A5 --> B1[手动调整积分 /adjust] end subgraph 兑换商城 A2 --> C1[获取兑换商品列表 /product/list] C1 --> C2[获取商品详情 /product/detail] C2 --> C3[提交兑换 /submit] C3 --> C4[获取兑换记录 /records] C4 --> C5[获取兑换统计 /stats] end subgraph 奖励系统 A4 --> D1[创建奖励 /create] D1 --> D2[获取奖励模板 /templates] D2 --> D3[兑换奖励 /{id}/exchange] D3 --> D4[审批奖励 /{id}/approve] D4 --> D5[兑换历史 /exchange-history] end R1(("👤 家长/孩子")):::actor R2(("💎 积分引擎")):::system A1 -.- R1 A3 -.- R2 ``` ## 端点明细 | 端点 | 控制器 | 说明 | |------|--------|------| | `/api/points/balance` | PointsController | 获取积分余额 | | `/api/points/logs` | PointsController | 获取积分流水 | | `/api/points/adjust` | PointsController | 手动调整积分 | | `/api/points/system-balance` | PointsController | 系统余额 | | `/api/points/logs-by-category` | PointsController | 按分类查询流水 | | `/api/points/exchange/product/list` | PointsExchangeController | 兑换商品列表 | | `/api/points/exchange/product/detail` | PointsExchangeController | 商品详情 | | `/api/points/exchange/submit` | PointsExchangeController | 提交兑换 | | `/api/points/exchange/records` | PointsExchangeController | 兑换记录 | | `/api/points/exchange/stats` | PointsExchangeController | 兑换统计 | | `/api/rewards/create` | RewardController | 创建奖励 | | `/api/rewards/wishlist` | RewardController | 奖励清单 | | `/api/rewards/{id}/exchange` | RewardController | 兑换奖励 | | `/api/rewards/{id}/approve` | RewardController | 审批奖励 | | `/api/rewards/templates` | RewardController | 奖励模板 | | `/api/rewards/exchange-history` | RewardController | 兑换历史 |