端口说明: 📱 小程序 | 🖥 管理后台 | 📋 规划师端 | ⚙️ 系统自动
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
classDef portMiniApp fill:#e3f2fd,stroke:#1565c0,stroke-width:1px,stroke-dasharray:3 2
classDef portAdmin fill:#fce4ec,stroke:#c62828,stroke-width:1px,stroke-dasharray:3 2
classDef portGuide fill:#fff8e1,stroke:#f57f17,stroke-width:1px,stroke-dasharray:3 2
classDef portSystem fill:#f3e5f5,stroke:#6a1b9a,stroke-width:1px,stroke-dasharray:3 2
subgraph 积分概览
A1(("👤 家长/孩子")):::portMiniApp --> A2[📱 获取积分余额 /balance]:::portMiniApp
A2 --> A3[📱 获取积分流水 /logs]:::portMiniApp
A3 --> A4[📱 按分类查询 /logs-by-category]:::portMiniApp
A4 --> A5[📱 管理系统余额 /system-balance]:::portMiniApp
end
subgraph 积分调整
A5 --> B1[📱 手动调整积分 /adjust]:::portMiniApp
end
subgraph 兑换商城
A2 --> C1[📱 获取兑换商品列表 /product/list]:::portMiniApp
C1 --> C2[📱 获取商品详情 /product/detail]:::portMiniApp
C2 --> C3[📱 提交兑换 /submit]:::portMiniApp
C3 --> C4[📱 获取兑换记录 /records]:::portMiniApp
C4 --> C5[📱 获取兑换统计 /stats]:::portMiniApp
end
subgraph 奖励系统
A4 --> D1[📱 创建奖励 /create]:::portMiniApp
D1 --> D2[📱 获取奖励模板 /templates]:::portMiniApp
D2 --> D3[📱 兑换奖励 /:id/exchange]:::portMiniApp
D3 --> D4[📱 审批奖励 /:id/approve]:::portMiniApp
D4 --> D5[📱 兑换历史 /exchange-history]:::portMiniApp
end
R1(("👤 家长/孩子")):::actor
R2(("💎 积分引擎")):::system
A1 -.- R1
A3 -.- R2
| 端点 | 说明 | 端口 |
|---|---|---|
/api/points/balance |
获取积分余额 | 📱小程序 |
/api/points/logs |
获取积分流水 | 📱小程序 |
/api/points/adjust |
手动调整积分 | 📱小程序 |
/api/points/system-balance |
系统余额 | 📱小程序 |
/api/points/logs-by-category |
按分类查询流水 | 📱小程序 |
/api/points/exchange/product/list |
兑换商品列表 | 📱小程序 |
/api/points/exchange/product/detail |
商品详情 | 📱小程序 |
/api/points/exchange/submit |
提交兑换 | 📱小程序 |
/api/points/exchange/records |
兑换记录 | 📱小程序 |
/api/points/exchange/stats |
兑换统计 | 📱小程序 |
/api/rewards/create |
创建奖励 | 📱小程序 |
/api/rewards/wishlist |
奖励清单 | 📱小程序 |
/api/rewards/{id}/exchange |
兑换奖励 | 📱小程序 |
/api/rewards/{id}/approve |
审批奖励 | 📱小程序 |
/api/rewards/templates |
奖励模板 | 📱小程序 |
/api/rewards/exchange-history |
兑换历史 | 📱小程序 |