Appearance
Python Platform 平台管理
路由:app/api/v1/platform.py
服务:app/services/platform_service.py
与 System RBAC 共用前缀 /api/v1/system,契约见 contracts/openapi/platform-api.yaml。
资源一览
| 资源 | 主要端点 | 权限前缀 |
|---|---|---|
| Depts | GET/POST /depts,GET/PUT/DELETE /depts/{id} | system:dept:* |
| Posts | GET/POST /posts,GET /posts/all,GET/PUT/DELETE /posts/{id} | system:post:* |
| Dict Types | GET/POST /dict/types,… | system:dict:* |
| Dict Data | GET/POST /dict/data,GET /dict/data/type/{dict_type},… | system:dict:* |
| Configs | GET/POST /configs,GET /configs/key/{configKey},… | system:config:* |
| Notices | GET/POST /notices,… | system:notice:* |
| Files | GET /files,POST /files/upload,DELETE /files/{id} | system:file:* |
GET /files/download/{date_dir}/{file_name} | 公开(无需登录) |
文件上传
- 存储目录:
UPLOAD_PATH(默认./uploads,Docker 镜像默认/app/uploads) - 上传:
POST /files/upload(multipart) - 静态访问:
main.py挂载/uploads;下载 API 路径见上表 - 用户 Excel 导入导出逻辑在
platform_service(export_users_excel/import_users_from_excel),由 system 用户接口调用
字典与分页配置
| 字典 type | 用途 |
|---|---|
sys_page_size | 前端分页可选条数 10/30/50/100 |
| 参数 key | 用途 |
|---|---|
sys.page.defaultSize | 列表默认每页条数 |