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:
@@ -67,6 +67,17 @@ type RemovePermissionParams struct {
|
||||
PermID uint `path:"perm_id" required:"true" description:"权限ID"`
|
||||
}
|
||||
|
||||
// BatchRemovePermissionsRequest 批量移除权限请求
|
||||
type BatchRemovePermissionsRequest struct {
|
||||
PermIDs []uint `json:"perm_ids" validate:"required,min=1" required:"true" minItems:"1" description:"权限ID列表"`
|
||||
}
|
||||
|
||||
// BatchRemovePermissionsParams 批量移除权限参数聚合
|
||||
type BatchRemovePermissionsParams struct {
|
||||
RoleID uint `path:"role_id" required:"true" description:"角色ID"`
|
||||
BatchRemovePermissionsRequest
|
||||
}
|
||||
|
||||
// UpdateRoleStatusRequest 更新角色状态请求
|
||||
type UpdateRoleStatusRequest struct {
|
||||
Status *int `json:"status" validate:"required,min=0,max=1" description:"状态 (0:禁用, 1:启用)"`
|
||||
|
||||
Reference in New Issue
Block a user