端口说明: 📱 小程序 | 🖥 管理后台 | 📋 规划师端 | ⚙️ 系统自动
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[📱 获取启用的勋章列表 /list]:::portMiniApp
A2 --> A3[📱 获取勋章详情 /detail]:::portMiniApp
A3 --> A4[📱 收藏/取消收藏 /favorite]:::portMiniApp
end
subgraph 勋章获得
A4 --> B1[📱 获取孩子勋章列表 /child/list]:::portMiniApp
B1 --> B2[📱 孩子勋章统计 /statistics/child]:::portMiniApp
B2 --> B3[📱 家庭勋章排行 /ranking/family]:::portMiniApp
end
subgraph 管理员授勋
B3 --> C1[🖥 获取所有勋章 /all]:::portAdmin
C1 --> C2[🖥 创建勋章 /create]:::portAdmin
C2 --> C3[🖥 更新勋章 /update]:::portAdmin
C3 --> C4[🖥 删除勋章 /delete]:::portAdmin
C4 --> C5[🖥 手动授予勋章 /grant]:::portAdmin
end
subgraph 微行动
A1 --> D1[📱 获取所有微行动列表 /micro-action/list]:::portMiniApp
D1 --> D2[📱 获取今日推荐 /micro-action/today]:::portMiniApp
D2 --> D3[📱 完成微行动 /micro-action/complete]:::portMiniApp
D3 --> D4[📱 检查今日完成 /micro-action/check-today]:::portMiniApp
end
R1(("👤 用户")):::actor
R2(("🔧 管理员")):::role
A1 -.- R1
C1 -.- R2
| 端点 | 说明 | 端口 |
|---|---|---|
/api/badges/list |
启用的勋章列表 | 📱小程序 |
/api/badges/detail |
勋章详情 | 📱小程序 |
/api/badges/child/list |
孩子勋章列表 | 📱小程序 |
/api/badges/favorite |
收藏/取消 | 📱小程序 |
/api/badges/statistics/child |
孩子勋章统计 | 📱小程序 |
/api/badges/ranking/family |
家庭勋章排行 | 📱小程序 |
/api/micro-action/list |
微行动列表 | 📱小程序 |
/api/micro-action/today |
今日推荐 | 📱小程序 |
/api/micro-action/complete |
完成微行动 | 📱小程序 |
/api/micro-action/check-today |
检查今日完成 | 📱小程序 |
/api/badges/all |
所有勋章 | 🖥管理后台 |
/api/badges/create |
创建勋章 | 🖥管理后台 |
/api/badges/update |
更新勋章 | 🖥管理后台 |
/api/badges/delete |
删除勋章 | 🖥管理后台 |
/api/badges/grant |
手动授予勋章 | 🖥管理后台 |