更新+mock部分

This commit is contained in:
2026-04-16 18:12:09 +08:00
parent d5c06eca28
commit adadb3bf1d
40 changed files with 884 additions and 174 deletions

View File

@@ -1,7 +1,7 @@
# API 设计(基础架构 + 业务功能)
## 1. API 设计原则
- 对外统一前缀:`/api/*`
- 统一响应结构:`code/message/data/traceId`
- 统一响应结构:`code/message/data/traceId`,其中 `code=0` 表示成功,非 0 表示业务失败
- 认证策略JWT + RBAC网关做统一鉴权透传。
- API 冻结点:
- 基础架构 API 在 M3 冻结。
@@ -9,16 +9,16 @@
## 2. 基础架构 APIM3
### 2.1 认证域auth
- `POST /api/auth/login`
- `POST /api/auth/refresh`
- `GET /api/auth/current-user`
- `POST /api/auth/tokens`(登录)
- `POST /api/auth/tokens/refresh`(刷新)
- `GET /api/auth/users/current`(当前用户)
### 2.2 权限与组织域upms
- `GET /api/upms/routes`
- `GET /api/upms/current-user`
- `GET /api/upms/areas/tree`
- `GET /api/upms/tenants/tree`
- `GET /api/upms/depts/tree`
- `GET /api/upms/users/current`
- `GET /api/upms/areas`
- `GET /api/upms/tenants`
- `GET /api/upms/departments`
### 2.3 基础扩展 API建议补充
- 文件域

View File

@@ -55,9 +55,9 @@ graph TD
## 3. 主链路视角
### 3.1 基础架构链路
- 登录:`frontend/app -> /api/auth/login -> auth -> token`
- 登录:`frontend/app -> /api/auth/tokens -> auth -> token`
- 权限与路由:`frontend/app -> /api/upms/routes -> upms`
- 组织数据:`/api/upms/areas/tree|tenants/tree|depts/tree`
- 组织数据:`/api/upms/areas|tenants|departments`
### 3.2 教学业务链路
- 教师发作业:题库/试卷/作业配置 -> 投放班级。

View File

@@ -1,6 +1,6 @@
<mxfile host="65bd71144e">
<diagram id="full-business-flow-v3" name="完整业务流程图">
<mxGraphModel dx="1312" dy="773" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="5600" pageHeight="2300" math="0" shadow="0">
<mxGraphModel dx="1658" dy="703" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="5600" pageHeight="2300" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
@@ -35,13 +35,13 @@
<mxGeometry x="30" y="110" width="5400" height="220" as="geometry"/>
</mxCell>
<mxCell id="11" value="学生主线" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8f9fa;strokeColor=#b7c3d0;fontSize=13;fontStyle=1;align=left;spacingLeft=10;" parent="1" vertex="1">
<mxGeometry x="30" y="360" width="5400" height="260" as="geometry"/>
<mxGeometry x="20" y="370" width="5400" height="260" as="geometry"/>
</mxCell>
<mxCell id="12" value="AI/系统主线" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8f9fa;strokeColor=#b7c3d0;fontSize=13;fontStyle=1;align=left;spacingLeft=10;" parent="1" vertex="1">
<mxGeometry x="30" y="660" width="5400" height="620" as="geometry"/>
<mxGeometry x="50" y="670" width="5400" height="620" as="geometry"/>
</mxCell>
<mxCell id="13" value="管理运营主线" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8f9fa;strokeColor=#b7c3d0;fontSize=13;fontStyle=1;align=left;spacingLeft=10;" parent="1" vertex="1">
<mxGeometry x="30" y="1320" width="5400" height="300" as="geometry"/>
<mxGeometry y="1330" width="5400" height="300" as="geometry"/>
</mxCell>
<mxCell id="20" value="开始" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;" parent="1" vertex="1">
<mxGeometry x="70" y="470" width="110" height="64" as="geometry"/>