feat: 新增批量移除角色权限接口
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
- 新增 DELETE /api/admin/roles/:role_id/permissions 接口 - Store 层新增 BatchDelete 方法,单次 SQL 批量软删除 - Service 层新增 BatchRemovePermissions 方法 - Handler 层新增 BatchRemovePermissions 处理函数 - DTO 新增 BatchRemovePermissionsRequest/Params - 修复 openapi generator 对 DELETE 方法 requestBody 不生成的问题 - RouteSpec 新增 Body 字段,支持显式指定 JSON 请求体 💘 Generated with Crush Assisted-by: Claude Sonnet 4.6 via Crush <crush@charm.land>
This commit is contained in:
@@ -1356,6 +1356,19 @@ components:
|
||||
description: 跳过原因
|
||||
type: string
|
||||
type: object
|
||||
DtoBatchRemovePermissionsRequest:
|
||||
properties:
|
||||
perm_ids:
|
||||
description: 权限ID列表
|
||||
items:
|
||||
minimum: 0
|
||||
type: integer
|
||||
minItems: 1
|
||||
nullable: true
|
||||
type: array
|
||||
required:
|
||||
- perm_ids
|
||||
type: object
|
||||
DtoBatchSetCardSeriesBindngRequest:
|
||||
properties:
|
||||
iccids:
|
||||
@@ -6641,6 +6654,9 @@ components:
|
||||
data_usage_mb:
|
||||
description: 累计流量使用(MB)
|
||||
type: integer
|
||||
device_virtual_no:
|
||||
description: 绑定设备的虚拟号(未绑定时为空字符串)
|
||||
type: string
|
||||
enable_polling:
|
||||
description: 是否参与轮询
|
||||
type: boolean
|
||||
@@ -14541,13 +14557,13 @@ paths:
|
||||
description: 卡接入号(模糊查询)
|
||||
maxLength: 20
|
||||
type: string
|
||||
- description: 虚拟号(模糊查询)
|
||||
- description: 是否为独立卡(true:仅返回未绑定设备的卡, false:仅返回已绑定设备的卡, 不传:返回全部)
|
||||
in: query
|
||||
name: virtual_no
|
||||
name: is_standalone
|
||||
schema:
|
||||
description: 虚拟号(模糊查询)
|
||||
maxLength: 50
|
||||
type: string
|
||||
description: 是否为独立卡(true:仅返回未绑定设备的卡, false:仅返回已绑定设备的卡, 不传:返回全部)
|
||||
nullable: true
|
||||
type: boolean
|
||||
- description: 批次号
|
||||
in: query
|
||||
name: batch_no
|
||||
@@ -19500,6 +19516,52 @@ paths:
|
||||
summary: 更新角色状态
|
||||
tags:
|
||||
- 角色
|
||||
/api/admin/roles/{role_id}/permissions:
|
||||
delete:
|
||||
parameters:
|
||||
- description: 角色ID
|
||||
in: path
|
||||
name: role_id
|
||||
required: true
|
||||
schema:
|
||||
description: 角色ID
|
||||
minimum: 0
|
||||
type: integer
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DtoBatchRemovePermissionsRequest'
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user