端口说明: 📱 小程序 | 🖥 管理后台 | 📋 规划师端 | ⚙️ 系统自动
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{📱 打卡类型}:::portMiniApp
A4 -->|综合打卡| B1[📱 创建打卡 /create]:::portMiniApp
A4 -->|运动打卡| B2[📱 创建运动打卡 /create]:::portMiniApp
A4 -->|饮食打卡| B3[📱 创建饮食打卡 /create]:::portMiniApp
A4 -->|睡眠打卡| B4[📱 创建睡眠打卡 /create]:::portMiniApp
A4 -->|喝水打卡| B5[📱 创建喝水打卡 /create]:::portMiniApp
A4 -->|冥想打卡| B6[📱 创建冥想打卡 /create]:::portMiniApp
end
subgraph 打卡管理
B1 --> C1[📱 更新打卡 /update]:::portMiniApp
C1 --> C2[📱 删除打卡 /delete]:::portMiniApp
end
subgraph 连续打卡
C2 --> D1[📱 获取打卡进度 /progress/:childId]:::portMiniApp
D1 --> D2[📱 获取打卡统计 /stats]:::portMiniApp
D2 --> D3{📱 打卡中断?}:::portMiniApp
D3 -->|是| D4[📱 重置中断打卡 /reset]:::portMiniApp
D3 -->|否| D5[📱 保持连续]:::portMiniApp
end
subgraph 健康积分
D5 --> E1[📱 获取健康积分信息 /info]:::portMiniApp
E1 --> E2[📱 获取连续打卡天数 /streak]:::portMiniApp
end
subgraph 健康时间线
C2 --> F1[📱 获取健康时间线 /list]:::portMiniApp
F1 --> F2[📱 查看历史故事]:::portMiniApp
end
subgraph 健康预警
F2 --> G1[📱 获取活跃预警 /list]:::portMiniApp
G1 --> G2[📱 关闭预警 /dismiss]:::portMiniApp
end
R1(("👤 家长/孩子")):::actor
R2(("🔥 连续打卡系统")):::system
A1 -.- R1
D1 -.- R2
| 端点 | 说明 | 端口 |
|---|---|---|
/api/health/checkin/list |
获取打卡列表 | 📱小程序 |
/api/health/checkin/create |
创建打卡记录 | 📱小程序 |
/api/health/checkin/delete |
删除打卡记录 | 📱小程序 |
/api/health/checkin/stats |
打卡统计 | 📱小程序 |
/api/daily/checkin/list |
获取打卡列表 | 📱小程序 |
/api/daily/checkin/detail |
获取打卡详情 | 📱小程序 |
/api/daily/checkin/create |
创建打卡 | 📱小程序 |
/api/daily/checkin/update |
更新打卡 | 📱小程序 |
/api/daily/checkin/delete |
删除打卡 | 📱小程序 |
/api/health/exercise/list |
运动打卡列表 | 📱小程序 |
/api/health/exercise/create |
创建运动打卡 | 📱小程序 |
/api/health/meal/list |
饮食打卡列表 | 📱小程序 |
/api/health/meal/create |
创建饮食打卡 | 📱小程序 |
/api/health/sleep/list |
睡眠打卡列表 | 📱小程序 |
/api/health/sleep/create |
创建睡眠打卡 | 📱小程序 |
/api/health/water/list |
喝水打卡列表 | 📱小程序 |
/api/health/water/create |
创建喝水打卡 | 📱小程序 |
/api/health/meditation/list |
冥想打卡列表 | 📱小程序 |
/api/health/meditation/create |
创建冥想打卡 | 📱小程序 |
/api/streak/progress/{childId} |
打卡进度 | 📱小程序 |
/api/streak/reset |
重置中断打卡 | 📱小程序 |
/api/health/score/info |
健康积分信息 | 📱小程序 |
/api/health/score/streak |
连续天数 | 📱小程序 |
/api/health/alert/list |
活跃预警列表 | 📱小程序 |
/api/health/alert/dismiss |
关闭预警 | 📱小程序 |
/api/health/timeline/list |
健康时间线 | 📱小程序 |