# 用户使用流程图 — 成长规划师体系 ```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{是否已注册} A2 -->|否| A3[规划师注册 /register] A3 --> A4[提交申请 /application/submit] A4 --> A5[管理员审批] A5 --> A6{审批结果} A6 -->|通过| A7[规划师激活] A6 -->|驳回| A8[撤回申请 /withdraw] A8 --> A9[重新提交 /resubmit] A7 --> A10[获取申请记录 /applications] end subgraph 团队管理 A10 --> B1[获取我的团队 /my-team] B1 --> B2[获取邀请码 /invite-code] B2 --> B3[生成邀请码 /invite-code/generate] B3 --> B4[获取成员列表 /members] B4 --> B5[通过邀请码加入 /join-by-invite] B5 --> B6[检查邀请状态 /check-status] B6 --> B7[离开团队 /leave] B7 --> B8[获取团队统计 /stats] end subgraph 绑定家庭 A10 --> C1[生成绑定邀请 /invite] C1 --> C2[校验邀请 /validate] C2 --> C3[家长审批绑定] C3 --> C4[获取绑定家庭列表 /bound-families] end subgraph 任务模板管理 C4 --> D1[获取我的模板 /my] D1 --> D2[创建模板 /create] D2 --> D3[更新模板 /update] D3 --> D4[更新状态 /update-status] D4 --> D5[删除模板 /delete] D5 --> D6[增加销量 /increment-sales] D6 --> D7[获取模板列表 /templates] end subgraph 训练方案 C4 --> E1[获取方案列表 /list] E1 --> E2[创建方案 /create] E2 --> E3[添加项目 /items/add] E3 --> E4[从推荐生成 /generate-from-recommendations] E4 --> E5[下发方案 /deploy] E5 --> E6[执行看板 /execution-board] E6 --> E7[删除方案 /delete] end subgraph 咨询消息 C4 --> F1[家长发送咨询 /send] F1 --> F2[规划师回复 /{messageId}/reply] F2 --> F3[咨询列表 /list] F3 --> F4[未读消息数 /unread-count] end subgraph 订单佣金 C4 --> G1[获取订单列表 /list] G1 --> G2[获取订单统计 /stats] G2 --> G3[获取订单详情 /detail] end R1(("📋 成长规划师")):::actor R2(("👤 家长")):::role R3(("🔧 管理员")):::role A1 -.- R1 C3 -.- R2 A5 -.- R3 ``` ## 端点明细 | 端点 | 说明 | |------|------| | `/api/guide/register` | 规划师注册 | | `/api/guide/application/submit` | 提交申请 | | `/api/guide/application/withdraw` | 撤回申请 | | `/api/guide/application/resubmit` | 重新提交 | | `/api/guide/applications` | 申请列表 | | `/api/guide/invite-code/generate` | 生成邀请码 | | `/api/guide/invite-codes` | 邀请码列表 | | `/api/guide/invite-code/validate` | 验证邀请码 | | `/api/guide/child-guides` | 下级规划师列表 | | `/api/guide/parent-guide` | 上级规划师 | | `/api/guide/package/add` | 添加任务模板 | | `/api/guide/package/{packageId}` | 查看模板定价 | | `/api/guide/team/my-team` | 获取团队 | | `/api/guide/team/invite-code` | 团队邀请码 | | `/api/guide/team/members` | 团队成员 | | `/api/guide/team/join-by-invite` | 通过邀请码加入 | | `/api/guide/team/leave` | 离开团队 | | `/api/guide/team/stats` | 团队统计 | | `/api/guide/bind/invite` | 生成绑定邀请 | | `/api/guide/bind/validate` | 校验邀请 | | `/api/guide/families/bound-families` | 绑定家庭列表 | | `/api/guide/families/{familyId}/overview` | 家庭概览 | | `/api/guide/families/{familyId}/children/{childId}/tasks` | 孩子任务 | | `/api/guide/packages/my` | 我的模板 | | `/api/guide/packages/create` | 创建模板 | | `/api/guide/packages/update` | 更新模板 | | `/api/guide/packages/delete` | 删除模板 | | `/api/guide/training-plans/list` | 方案列表 | | `/api/guide/training-plans/create` | 创建方案 | | `/api/guide/training-plans/items/add` | 添加项目 | | `/api/guide/training-plans/deploy` | 下发方案 | | `/api/guide/training-plans/execution-board` | 执行看板 | | `/api/guide/orders/list` | 订单列表 | | `/api/guide/orders/stats` | 订单统计 | | `/api/guide/messages/send` | 发送咨询 | | `/api/guide/messages/list` | 咨询列表 | | `/api/guide/messages/{messageId}/reply` | 回复咨询 | | `/api/guide/assessment/materials` | 可用测评资料 | | `/api/guide/assessment/family/enable` | 启用家庭测评 |