All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m28s
- 修复所有 DTO 文件的 description 标签(10 个文件) - 枚举字段统一使用中文说明(用户类型、角色类型、权限类型等) - 状态字段明确说明 0/1 含义 - validate 标签与 OpenAPI 标签保持一致 - 在 AGENTS.md 和 CLAUDE.md 添加 DTO 规范章节 - AI 助手必须执行的 7 项检查清单 - 常见枚举字段标准值参考 - 确保未来 AI 助手自动遵循规范 - 创建规范文档 - docs/code-review-checklist.md(Code Review 检查清单) - docs/dto-improvement-summary.md(DTO 改进总结) - docs/ai-dto-guidelines-update.md(AI 指引更新说明) - 重新生成 OpenAPI 文档(375 个 description 标签) 影响:所有 API 字段现在都有清晰的中文说明,前端开发更友好
2431 lines
88 KiB
YAML
2431 lines
88 KiB
YAML
components:
|
||
schemas:
|
||
ErrorResponse:
|
||
properties:
|
||
code:
|
||
description: 错误码
|
||
type: integer
|
||
message:
|
||
description: 错误消息
|
||
type: string
|
||
timestamp:
|
||
description: 时间戳
|
||
format: date-time
|
||
type: string
|
||
required:
|
||
- code
|
||
- message
|
||
- timestamp
|
||
type: object
|
||
ModelAccountPageResult:
|
||
properties:
|
||
items:
|
||
description: 账号列表
|
||
items:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
nullable: true
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
size:
|
||
description: 每页数量
|
||
type: integer
|
||
total:
|
||
description: 总记录数
|
||
type: integer
|
||
type: object
|
||
ModelAccountResponse:
|
||
properties:
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
creator:
|
||
description: 创建人ID
|
||
minimum: 0
|
||
type: integer
|
||
enterprise_id:
|
||
description: 关联企业ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
id:
|
||
description: 账号ID
|
||
minimum: 0
|
||
type: integer
|
||
phone:
|
||
description: 手机号
|
||
type: string
|
||
shop_id:
|
||
description: 关联店铺ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
type: integer
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
updater:
|
||
description: 更新人ID
|
||
minimum: 0
|
||
type: integer
|
||
user_type:
|
||
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||
type: integer
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
type: object
|
||
ModelAssignPermissionsParams:
|
||
properties:
|
||
perm_ids:
|
||
description: 权限ID列表
|
||
items:
|
||
minimum: 0
|
||
type: integer
|
||
minItems: 1
|
||
nullable: true
|
||
type: array
|
||
required:
|
||
- perm_ids
|
||
type: object
|
||
ModelAssignRolesParams:
|
||
properties:
|
||
role_ids:
|
||
description: 角色ID列表,传空数组可清空所有角色
|
||
items:
|
||
minimum: 0
|
||
type: integer
|
||
nullable: true
|
||
type: array
|
||
type: object
|
||
ModelChangePasswordRequest:
|
||
properties:
|
||
new_password:
|
||
type: string
|
||
old_password:
|
||
type: string
|
||
type: object
|
||
ModelCreateAccountRequest:
|
||
properties:
|
||
enterprise_id:
|
||
description: 关联企业ID(企业账号必填)
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
password:
|
||
description: 密码
|
||
maxLength: 32
|
||
minLength: 8
|
||
type: string
|
||
phone:
|
||
description: 手机号
|
||
maxLength: 11
|
||
minLength: 11
|
||
type: string
|
||
shop_id:
|
||
description: 关联店铺ID(代理账号必填)
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
user_type:
|
||
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||
maximum: 4
|
||
minimum: 1
|
||
type: integer
|
||
username:
|
||
description: 用户名
|
||
maxLength: 50
|
||
minLength: 3
|
||
type: string
|
||
required:
|
||
- username
|
||
- phone
|
||
- password
|
||
- user_type
|
||
type: object
|
||
ModelCreatePermissionRequest:
|
||
properties:
|
||
parent_id:
|
||
description: 父权限ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
perm_code:
|
||
description: 权限编码
|
||
maxLength: 100
|
||
minLength: 1
|
||
type: string
|
||
perm_name:
|
||
description: 权限名称
|
||
maxLength: 50
|
||
minLength: 1
|
||
type: string
|
||
perm_type:
|
||
description: 权限类型 (1:菜单, 2:按钮)
|
||
maximum: 2
|
||
minimum: 1
|
||
type: integer
|
||
platform:
|
||
description: 适用端口 (all:全部, web:Web后台, h5:H5端),默认为 all
|
||
type: string
|
||
sort:
|
||
description: 排序值
|
||
minimum: 0
|
||
type: integer
|
||
url:
|
||
description: 请求路径
|
||
maxLength: 255
|
||
type: string
|
||
required:
|
||
- perm_name
|
||
- perm_code
|
||
- perm_type
|
||
type: object
|
||
ModelCreateRoleRequest:
|
||
properties:
|
||
role_desc:
|
||
description: 角色描述
|
||
maxLength: 255
|
||
type: string
|
||
role_name:
|
||
description: 角色名称
|
||
maxLength: 50
|
||
minLength: 1
|
||
type: string
|
||
role_type:
|
||
description: 角色类型 (1:平台角色, 2:客户角色)
|
||
maximum: 2
|
||
minimum: 1
|
||
type: integer
|
||
required:
|
||
- role_name
|
||
- role_type
|
||
type: object
|
||
ModelLoginRequest:
|
||
properties:
|
||
device:
|
||
type: string
|
||
password:
|
||
type: string
|
||
username:
|
||
type: string
|
||
type: object
|
||
ModelLoginResponse:
|
||
properties:
|
||
access_token:
|
||
type: string
|
||
expires_in:
|
||
type: integer
|
||
permissions:
|
||
items:
|
||
type: string
|
||
nullable: true
|
||
type: array
|
||
refresh_token:
|
||
type: string
|
||
user:
|
||
$ref: '#/components/schemas/ModelUserInfo'
|
||
type: object
|
||
ModelPermission:
|
||
properties:
|
||
available_for_role_types:
|
||
type: string
|
||
creator:
|
||
minimum: 0
|
||
type: integer
|
||
parent_id:
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
perm_code:
|
||
type: string
|
||
perm_name:
|
||
type: string
|
||
perm_type:
|
||
type: integer
|
||
platform:
|
||
type: string
|
||
sort:
|
||
type: integer
|
||
status:
|
||
type: integer
|
||
updater:
|
||
minimum: 0
|
||
type: integer
|
||
url:
|
||
type: string
|
||
type: object
|
||
ModelPermissionPageResult:
|
||
properties:
|
||
items:
|
||
description: 权限列表
|
||
items:
|
||
$ref: '#/components/schemas/ModelPermissionResponse'
|
||
nullable: true
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
size:
|
||
description: 每页数量
|
||
type: integer
|
||
total:
|
||
description: 总记录数
|
||
type: integer
|
||
type: object
|
||
ModelPermissionResponse:
|
||
properties:
|
||
available_for_role_types:
|
||
description: 可用角色类型 (1:平台角色, 2:客户角色)
|
||
type: string
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
creator:
|
||
description: 创建人ID
|
||
minimum: 0
|
||
type: integer
|
||
id:
|
||
description: 权限ID
|
||
minimum: 0
|
||
type: integer
|
||
parent_id:
|
||
description: 父权限ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
perm_code:
|
||
description: 权限编码
|
||
type: string
|
||
perm_name:
|
||
description: 权限名称
|
||
type: string
|
||
perm_type:
|
||
description: 权限类型 (1:菜单, 2:按钮)
|
||
type: integer
|
||
platform:
|
||
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
|
||
type: string
|
||
sort:
|
||
description: 排序值
|
||
type: integer
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
type: integer
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
updater:
|
||
description: 更新人ID
|
||
minimum: 0
|
||
type: integer
|
||
url:
|
||
description: 请求路径
|
||
type: string
|
||
type: object
|
||
ModelPermissionTreeNode:
|
||
properties:
|
||
available_for_role_types:
|
||
description: 可用角色类型 (1:平台角色, 2:客户角色)
|
||
type: string
|
||
children:
|
||
description: 子权限列表
|
||
items:
|
||
$ref: '#/components/schemas/ModelPermissionTreeNode'
|
||
type: array
|
||
id:
|
||
description: 权限ID
|
||
minimum: 0
|
||
type: integer
|
||
perm_code:
|
||
description: 权限编码
|
||
type: string
|
||
perm_name:
|
||
description: 权限名称
|
||
type: string
|
||
perm_type:
|
||
description: 权限类型 (1:菜单, 2:按钮)
|
||
type: integer
|
||
platform:
|
||
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
|
||
type: string
|
||
sort:
|
||
description: 排序值
|
||
type: integer
|
||
url:
|
||
description: 请求路径
|
||
type: string
|
||
type: object
|
||
ModelRefreshTokenRequest:
|
||
properties:
|
||
refresh_token:
|
||
type: string
|
||
type: object
|
||
ModelRefreshTokenResponse:
|
||
properties:
|
||
access_token:
|
||
type: string
|
||
expires_in:
|
||
type: integer
|
||
type: object
|
||
ModelRole:
|
||
properties:
|
||
creator:
|
||
minimum: 0
|
||
type: integer
|
||
role_desc:
|
||
type: string
|
||
role_name:
|
||
type: string
|
||
role_type:
|
||
type: integer
|
||
status:
|
||
type: integer
|
||
updater:
|
||
minimum: 0
|
||
type: integer
|
||
type: object
|
||
ModelRolePageResult:
|
||
properties:
|
||
items:
|
||
description: 角色列表
|
||
items:
|
||
$ref: '#/components/schemas/ModelRoleResponse'
|
||
nullable: true
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
size:
|
||
description: 每页数量
|
||
type: integer
|
||
total:
|
||
description: 总记录数
|
||
type: integer
|
||
type: object
|
||
ModelRoleResponse:
|
||
properties:
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
creator:
|
||
description: 创建人ID
|
||
minimum: 0
|
||
type: integer
|
||
id:
|
||
description: 角色ID
|
||
minimum: 0
|
||
type: integer
|
||
role_desc:
|
||
description: 角色描述
|
||
type: string
|
||
role_name:
|
||
description: 角色名称
|
||
type: string
|
||
role_type:
|
||
description: 角色类型 (1:平台角色, 2:客户角色)
|
||
type: integer
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
type: integer
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
updater:
|
||
description: 更新人ID
|
||
minimum: 0
|
||
type: integer
|
||
type: object
|
||
ModelUpdateAccountParams:
|
||
properties:
|
||
password:
|
||
description: 密码
|
||
maxLength: 32
|
||
minLength: 8
|
||
nullable: true
|
||
type: string
|
||
phone:
|
||
description: 手机号
|
||
maxLength: 11
|
||
minLength: 11
|
||
nullable: true
|
||
type: string
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
username:
|
||
description: 用户名
|
||
maxLength: 50
|
||
minLength: 3
|
||
nullable: true
|
||
type: string
|
||
type: object
|
||
ModelUpdatePasswordParams:
|
||
properties:
|
||
new_password:
|
||
description: 新密码(8-32位)
|
||
maxLength: 32
|
||
minLength: 8
|
||
type: string
|
||
required:
|
||
- new_password
|
||
type: object
|
||
ModelUpdatePermissionParams:
|
||
properties:
|
||
parent_id:
|
||
description: 父权限ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
perm_code:
|
||
description: 权限编码
|
||
maxLength: 100
|
||
minLength: 1
|
||
nullable: true
|
||
type: string
|
||
perm_name:
|
||
description: 权限名称
|
||
maxLength: 50
|
||
minLength: 1
|
||
nullable: true
|
||
type: string
|
||
platform:
|
||
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
|
||
nullable: true
|
||
type: string
|
||
sort:
|
||
description: 排序值
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
url:
|
||
description: 请求路径
|
||
maxLength: 255
|
||
nullable: true
|
||
type: string
|
||
type: object
|
||
ModelUpdateRoleParams:
|
||
properties:
|
||
role_desc:
|
||
description: 角色描述
|
||
maxLength: 255
|
||
nullable: true
|
||
type: string
|
||
role_name:
|
||
description: 角色名称
|
||
maxLength: 50
|
||
minLength: 1
|
||
nullable: true
|
||
type: string
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
type: object
|
||
ModelUpdateRoleStatusParams:
|
||
properties:
|
||
status:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
type: integer
|
||
required:
|
||
- status
|
||
type: object
|
||
ModelUpdateStatusParams:
|
||
properties:
|
||
status:
|
||
description: 状态(0:禁用,1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
type: integer
|
||
required:
|
||
- status
|
||
type: object
|
||
ModelUserInfo:
|
||
properties:
|
||
enterprise_id:
|
||
description: 企业ID
|
||
minimum: 0
|
||
type: integer
|
||
enterprise_name:
|
||
description: 企业名称
|
||
type: string
|
||
id:
|
||
description: 用户ID
|
||
minimum: 0
|
||
type: integer
|
||
phone:
|
||
description: 手机号
|
||
type: string
|
||
shop_id:
|
||
description: 店铺ID
|
||
minimum: 0
|
||
type: integer
|
||
shop_name:
|
||
description: 店铺名称
|
||
type: string
|
||
user_type:
|
||
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||
type: integer
|
||
user_type_name:
|
||
description: 用户类型名称
|
||
type: string
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
type: object
|
||
securitySchemes:
|
||
BearerAuth:
|
||
bearerFormat: JWT
|
||
scheme: bearer
|
||
type: http
|
||
info:
|
||
title: Admin API
|
||
version: "1.0"
|
||
openapi: 3.0.3
|
||
paths:
|
||
/api/admin/accounts:
|
||
get:
|
||
parameters:
|
||
- description: 页码
|
||
in: query
|
||
name: page
|
||
schema:
|
||
description: 页码
|
||
minimum: 1
|
||
type: integer
|
||
- description: 每页数量
|
||
in: query
|
||
name: page_size
|
||
schema:
|
||
description: 每页数量
|
||
maximum: 100
|
||
minimum: 1
|
||
type: integer
|
||
- description: 用户名模糊查询
|
||
in: query
|
||
name: username
|
||
schema:
|
||
description: 用户名模糊查询
|
||
maxLength: 50
|
||
type: string
|
||
- description: 手机号模糊查询
|
||
in: query
|
||
name: phone
|
||
schema:
|
||
description: 手机号模糊查询
|
||
maxLength: 20
|
||
type: string
|
||
- description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||
in: query
|
||
name: user_type
|
||
schema:
|
||
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||
maximum: 4
|
||
minimum: 1
|
||
nullable: true
|
||
type: integer
|
||
- description: 状态 (0:禁用, 1:启用)
|
||
in: query
|
||
name: status
|
||
schema:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountPageResult'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 账号列表
|
||
tags:
|
||
- 账号相关
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelCreateAccountRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 创建账号
|
||
tags:
|
||
- 账号相关
|
||
/api/admin/accounts/{account_id}/roles/{role_id}:
|
||
delete:
|
||
parameters:
|
||
- description: 账号ID
|
||
in: path
|
||
name: account_id
|
||
required: true
|
||
schema:
|
||
description: 账号ID
|
||
minimum: 0
|
||
type: integer
|
||
- description: 角色ID
|
||
in: path
|
||
name: role_id
|
||
required: true
|
||
schema:
|
||
description: 角色ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 移除角色
|
||
tags:
|
||
- 账号相关
|
||
/api/admin/accounts/{id}:
|
||
delete:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 删除账号
|
||
tags:
|
||
- 账号相关
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取账号详情
|
||
tags:
|
||
- 账号相关
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdateAccountParams'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 更新账号
|
||
tags:
|
||
- 账号相关
|
||
/api/admin/accounts/{id}/roles:
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
items:
|
||
$ref: '#/components/schemas/ModelRole'
|
||
type: array
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取账号角色
|
||
tags:
|
||
- 账号相关
|
||
post:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAssignRolesParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
summary: 分配角色
|
||
tags:
|
||
- 账号相关
|
||
/api/admin/login:
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelLoginRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelLoginResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
summary: 后台登录
|
||
tags:
|
||
- 认证
|
||
/api/admin/logout:
|
||
post:
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 登出
|
||
tags:
|
||
- 认证
|
||
/api/admin/me:
|
||
get:
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUserInfo'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取当前用户信息
|
||
tags:
|
||
- 认证
|
||
/api/admin/password:
|
||
put:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelChangePasswordRequest'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 修改密码
|
||
tags:
|
||
- 认证
|
||
/api/admin/permissions:
|
||
get:
|
||
parameters:
|
||
- description: 页码
|
||
in: query
|
||
name: page
|
||
schema:
|
||
description: 页码
|
||
minimum: 1
|
||
type: integer
|
||
- description: 每页数量
|
||
in: query
|
||
name: page_size
|
||
schema:
|
||
description: 每页数量
|
||
maximum: 100
|
||
minimum: 1
|
||
type: integer
|
||
- description: 权限名称模糊查询
|
||
in: query
|
||
name: perm_name
|
||
schema:
|
||
description: 权限名称模糊查询
|
||
maxLength: 50
|
||
type: string
|
||
- description: 权限编码模糊查询
|
||
in: query
|
||
name: perm_code
|
||
schema:
|
||
description: 权限编码模糊查询
|
||
maxLength: 100
|
||
type: string
|
||
- description: 权限类型 (1:菜单, 2:按钮)
|
||
in: query
|
||
name: perm_type
|
||
schema:
|
||
description: 权限类型 (1:菜单, 2:按钮)
|
||
maximum: 2
|
||
minimum: 1
|
||
nullable: true
|
||
type: integer
|
||
- description: 适用端口 (all:全部, web:Web后台, h5:H5端)
|
||
in: query
|
||
name: platform
|
||
schema:
|
||
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
|
||
type: string
|
||
- description: 可用角色类型 (1:平台角色, 2:客户角色)
|
||
in: query
|
||
name: available_for_role_type
|
||
schema:
|
||
description: 可用角色类型 (1:平台角色, 2:客户角色)
|
||
maximum: 2
|
||
minimum: 1
|
||
nullable: true
|
||
type: integer
|
||
- description: 父权限ID
|
||
in: query
|
||
name: parent_id
|
||
schema:
|
||
description: 父权限ID
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
- description: 状态 (0:禁用, 1:启用)
|
||
in: query
|
||
name: status
|
||
schema:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelPermissionPageResult'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 权限列表
|
||
tags:
|
||
- 权限
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelCreatePermissionRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelPermissionResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 创建权限
|
||
tags:
|
||
- 权限
|
||
/api/admin/permissions/{id}:
|
||
delete:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 删除权限
|
||
tags:
|
||
- 权限
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelPermissionResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取权限详情
|
||
tags:
|
||
- 权限
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdatePermissionParams'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelPermissionResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 更新权限
|
||
tags:
|
||
- 权限
|
||
/api/admin/permissions/tree:
|
||
get:
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
items:
|
||
$ref: '#/components/schemas/ModelPermissionTreeNode'
|
||
type: array
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取权限树
|
||
tags:
|
||
- 权限
|
||
/api/admin/platform-accounts:
|
||
get:
|
||
parameters:
|
||
- description: 页码
|
||
in: query
|
||
name: page
|
||
schema:
|
||
description: 页码
|
||
minimum: 1
|
||
type: integer
|
||
- description: 每页数量
|
||
in: query
|
||
name: page_size
|
||
schema:
|
||
description: 每页数量
|
||
maximum: 100
|
||
minimum: 1
|
||
type: integer
|
||
- description: 用户名模糊查询
|
||
in: query
|
||
name: username
|
||
schema:
|
||
description: 用户名模糊查询
|
||
maxLength: 50
|
||
type: string
|
||
- description: 手机号模糊查询
|
||
in: query
|
||
name: phone
|
||
schema:
|
||
description: 手机号模糊查询
|
||
maxLength: 20
|
||
type: string
|
||
- description: 状态 (0:禁用, 1:启用)
|
||
in: query
|
||
name: status
|
||
schema:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountPageResult'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 平台账号列表
|
||
tags:
|
||
- 平台账号
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelCreateAccountRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 新增平台账号
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/platform-accounts/{account_id}/roles/{role_id}:
|
||
delete:
|
||
parameters:
|
||
- description: 账号ID
|
||
in: path
|
||
name: account_id
|
||
required: true
|
||
schema:
|
||
description: 账号ID
|
||
minimum: 0
|
||
type: integer
|
||
- description: 角色ID
|
||
in: path
|
||
name: role_id
|
||
required: true
|
||
schema:
|
||
description: 角色ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 移除角色
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/platform-accounts/{id}:
|
||
delete:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 删除平台账号
|
||
tags:
|
||
- 平台账号
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取平台账号详情
|
||
tags:
|
||
- 平台账号
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdateAccountParams'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAccountResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 编辑平台账号
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/platform-accounts/{id}/password:
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdatePasswordParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 修改密码
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/platform-accounts/{id}/roles:
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
items:
|
||
$ref: '#/components/schemas/ModelRole'
|
||
type: array
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取账号角色
|
||
tags:
|
||
- 平台账号
|
||
post:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAssignRolesParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 分配角色
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/platform-accounts/{id}/status:
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdateStatusParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 启用/禁用账号
|
||
tags:
|
||
- 平台账号
|
||
/api/admin/refresh-token:
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRefreshTokenRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRefreshTokenResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
summary: 刷新 Token
|
||
tags:
|
||
- 认证
|
||
/api/admin/roles:
|
||
get:
|
||
parameters:
|
||
- description: 页码
|
||
in: query
|
||
name: page
|
||
schema:
|
||
description: 页码
|
||
minimum: 1
|
||
type: integer
|
||
- description: 每页数量
|
||
in: query
|
||
name: page_size
|
||
schema:
|
||
description: 每页数量
|
||
maximum: 100
|
||
minimum: 1
|
||
type: integer
|
||
- description: 角色名称模糊查询
|
||
in: query
|
||
name: role_name
|
||
schema:
|
||
description: 角色名称模糊查询
|
||
maxLength: 50
|
||
type: string
|
||
- description: 角色类型 (1:平台角色, 2:客户角色)
|
||
in: query
|
||
name: role_type
|
||
schema:
|
||
description: 角色类型 (1:平台角色, 2:客户角色)
|
||
maximum: 2
|
||
minimum: 1
|
||
nullable: true
|
||
type: integer
|
||
- description: 状态 (0:禁用, 1:启用)
|
||
in: query
|
||
name: status
|
||
schema:
|
||
description: 状态 (0:禁用, 1:启用)
|
||
maximum: 1
|
||
minimum: 0
|
||
nullable: true
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRolePageResult'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 角色列表
|
||
tags:
|
||
- 角色
|
||
post:
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelCreateRoleRequest'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRoleResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 创建角色
|
||
tags:
|
||
- 角色
|
||
/api/admin/roles/{id}:
|
||
delete:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 删除角色
|
||
tags:
|
||
- 角色
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRoleResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取角色详情
|
||
tags:
|
||
- 角色
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdateRoleParams'
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelRoleResponse'
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 更新角色
|
||
tags:
|
||
- 角色
|
||
/api/admin/roles/{id}/permissions:
|
||
get:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
items:
|
||
$ref: '#/components/schemas/ModelPermission'
|
||
type: array
|
||
description: OK
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 获取角色权限
|
||
tags:
|
||
- 角色
|
||
post:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelAssignPermissionsParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 分配权限
|
||
tags:
|
||
- 角色
|
||
/api/admin/roles/{id}/status:
|
||
put:
|
||
parameters:
|
||
- description: ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
schema:
|
||
description: ID
|
||
minimum: 0
|
||
type: integer
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelUpdateRoleStatusParams'
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 更新角色状态
|
||
tags:
|
||
- 角色
|
||
/api/admin/roles/{role_id}/permissions/{perm_id}:
|
||
delete:
|
||
parameters:
|
||
- description: 角色ID
|
||
in: path
|
||
name: role_id
|
||
required: true
|
||
schema:
|
||
description: 角色ID
|
||
minimum: 0
|
||
type: integer
|
||
- description: 权限ID
|
||
in: path
|
||
name: perm_id
|
||
required: true
|
||
schema:
|
||
description: 权限ID
|
||
minimum: 0
|
||
type: integer
|
||
responses:
|
||
"400":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 请求参数错误
|
||
"401":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 未认证或认证已过期
|
||
"403":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 无权访问
|
||
"500":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
description: 服务器内部错误
|
||
security:
|
||
- BearerAuth: []
|
||
summary: 移除权限
|
||
tags:
|
||
- 角色
|