Skip to content

Python Platform 平台管理

路由:app/api/v1/platform.py
服务:app/services/platform_service.py

与 System RBAC 共用前缀 /api/v1/system,契约见 contracts/openapi/platform-api.yaml

资源一览

资源主要端点权限前缀
DeptsGET/POST /deptsGET/PUT/DELETE /depts/{id}system:dept:*
PostsGET/POST /postsGET /posts/allGET/PUT/DELETE /posts/{id}system:post:*
Dict TypesGET/POST /dict/types,…system:dict:*
Dict DataGET/POST /dict/dataGET /dict/data/type/{dict_type},…system:dict:*
ConfigsGET/POST /configsGET /configs/key/{configKey},…system:config:*
NoticesGET/POST /notices,…system:notice:*
FilesGET /filesPOST /files/uploadDELETE /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_serviceexport_users_excel / import_users_from_excel),由 system 用户接口调用

字典与分页配置

字典 type用途
sys_page_size前端分页可选条数 10/30/50/100
参数 key用途
sys.page.defaultSize列表默认每页条数

相关文档

Xichen Full Stack 内部文档