用户使用流程图 — 营养与饮食推荐
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[获取食谱推荐 /meal/recommend]
A2 --> A3{对推荐满意?}
A3 -->|不满意| A4[替换指定食材(一换一菜) /meal/replace]
A4 --> A3
A3 -->|满意| A5[记录饮食日志 /meal/log]
end
subgraph 饮食记录查询
A5 --> B1[获取近期日志 /meal/logs]
B1 --> B2[获取营养摄入统计 /meal/nutrition-summary]
end
subgraph 食材推荐指数
B2 --> C1[获取食材推荐指数 /food/recommendation/index]
C1 --> C2[获取指数变更历史 /food/recommendation/history]
C2 --> C3[按家庭分组获取 /food/recommendation/by-family]
end
subgraph 营养偏好
C3 --> D1[获取营养偏好 /nutrition/profile/get]
D1 --> D2[保存营养偏好 /nutrition/profile/save]
end
subgraph 营养师服务
D2 --> E1[申请营养师 /nutritionist/apply]
E1 --> E2[获取申请状态 /nutritionist/status]
end
subgraph 推荐商品
E2 --> F1[获取维度页推荐 /recommend/dimension-products]
F1 --> F2[获取复购提醒 /recommend/repurchase-reminders/list]
F2 --> F3[标记已点击 /repurchase-reminders/click]
F3 --> F4[标记已购买 /repurchase-reminders/purchased]
end
R1(("👤 用户")):::actor
R2(("🥗 食谱引擎")):::system
A1 -.- R1
A2 -.- R2
端点明细
| 端点 |
说明 |
/api/meal/recommend |
获取食谱推荐 |
/api/meal/replace |
替换指定食材 |
/api/meal/log |
记录饮食日志 |
/api/meal/logs |
获取近期日志 |
/api/meal/nutrition-summary |
营养摄入统计 |
/api/food/recommendation/index |
食材推荐指数 |
/api/food/recommendation/history |
指数变更历史 |
/api/food/recommendation/by-family |
按家庭分组 |
/api/nutrition/profile/get |
获取营养偏好 |
/api/nutrition/profile/save |
保存营养偏好 |
/api/nutritionist/apply |
申请营养师 |
/api/nutritionist/status |
申请状态 |
/api/recommend/dimension-products |
维度推荐商品 |
/api/recommend/repurchase-reminders/list |
复购提醒列表 |
/api/recommend/repurchase-reminders/click |
标记已点击 |
/api/recommend/repurchase-reminders/purchased |
标记已购买 |