feat: add batch content governance actions

This commit is contained in:
2026-01-16 14:19:43 +08:00
parent e5f40287c3
commit daaacc3fa4
11 changed files with 431 additions and 3 deletions

View File

@@ -543,6 +543,40 @@ const docTemplate = `{
}
}
},
"/super/v1/contents/status/batch": {
"post": {
"description": "Batch unpublish or block contents",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Content"
],
"summary": "Batch update content status",
"parameters": [
{
"description": "Batch status form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperContentBatchStatusForm"
}
}
],
"responses": {
"200": {
"description": "Updated",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/contents/{id}/review": {
"post": {
"description": "Review content",
@@ -8013,6 +8047,39 @@ const docTemplate = `{
}
}
},
"dto.SuperContentBatchStatusForm": {
"type": "object",
"required": [
"content_ids",
"status"
],
"properties": {
"content_ids": {
"description": "ContentIDs 待处置内容ID列表。",
"type": "array",
"minItems": 1,
"items": {
"type": "integer"
}
},
"reason": {
"description": "Reason 处置说明(可选,用于审计与通知作者)。",
"type": "string"
},
"status": {
"description": "Status 目标内容状态unpublished/blocked。",
"enum": [
"unpublished",
"blocked"
],
"allOf": [
{
"$ref": "#/definitions/consts.ContentStatus"
}
]
}
}
},
"dto.SuperContentReportItem": {
"type": "object",
"properties": {

View File

@@ -537,6 +537,40 @@
}
}
},
"/super/v1/contents/status/batch": {
"post": {
"description": "Batch unpublish or block contents",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Content"
],
"summary": "Batch update content status",
"parameters": [
{
"description": "Batch status form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperContentBatchStatusForm"
}
}
],
"responses": {
"200": {
"description": "Updated",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/contents/{id}/review": {
"post": {
"description": "Review content",
@@ -8007,6 +8041,39 @@
}
}
},
"dto.SuperContentBatchStatusForm": {
"type": "object",
"required": [
"content_ids",
"status"
],
"properties": {
"content_ids": {
"description": "ContentIDs 待处置内容ID列表。",
"type": "array",
"minItems": 1,
"items": {
"type": "integer"
}
},
"reason": {
"description": "Reason 处置说明(可选,用于审计与通知作者)。",
"type": "string"
},
"status": {
"description": "Status 目标内容状态unpublished/blocked。",
"enum": [
"unpublished",
"blocked"
],
"allOf": [
{
"$ref": "#/definitions/consts.ContentStatus"
}
]
}
}
},
"dto.SuperContentReportItem": {
"type": "object",
"properties": {

View File

@@ -1376,6 +1376,28 @@ definitions:
- action
- content_ids
type: object
dto.SuperContentBatchStatusForm:
properties:
content_ids:
description: ContentIDs 待处置内容ID列表。
items:
type: integer
minItems: 1
type: array
reason:
description: Reason 处置说明(可选,用于审计与通知作者)。
type: string
status:
allOf:
- $ref: '#/definitions/consts.ContentStatus'
description: Status 目标内容状态unpublished/blocked
enum:
- unpublished
- blocked
required:
- content_ids
- status
type: object
dto.SuperContentReportItem:
properties:
content_id:
@@ -3617,6 +3639,28 @@ paths:
summary: Content statistics
tags:
- Content
/super/v1/contents/status/batch:
post:
consumes:
- application/json
description: Batch unpublish or block contents
parameters:
- description: Batch status form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.SuperContentBatchStatusForm'
produces:
- application/json
responses:
"200":
description: Updated
schema:
type: string
summary: Batch update content status
tags:
- Content
/super/v1/coupon-grants:
get:
consumes: