feat: add super admin health review

This commit is contained in:
2026-01-13 15:02:05 +08:00
parent 19b15bf20a
commit 5ac2ea028c
10 changed files with 1208 additions and 0 deletions

View File

@@ -879,6 +879,20 @@ definitions:
description: Likes 累计点赞数。
type: integer
type: object
dto.SuperContentReviewForm:
properties:
action:
description: Action 审核动作approve/reject
enum:
- approve
- reject
type: string
reason:
description: Reason 审核说明(驳回时填写,便于作者修正)。
type: string
required:
- action
type: object
dto.SuperContentTenantLite:
properties:
code:
@@ -1093,6 +1107,64 @@ definitions:
required:
- duration
type: object
dto.TenantHealthItem:
properties:
alerts:
description: Alerts 异常提示列表(用于运营侧提示)。
items:
type: string
type: array
code:
description: Code 租户编码。
type: string
content_count:
description: ContentCount 内容总数。
type: integer
health_level:
description: HealthLevel 健康等级healthy/warning/risk
type: string
last_paid_at:
description: LastPaidAt 最近成交时间RFC3339空代表暂无成交
type: string
member_count:
description: MemberCount 租户成员数量(包含管理员)。
type: integer
name:
description: Name 租户名称。
type: string
owner:
allOf:
- $ref: '#/definitions/dto.TenantOwnerUserLite'
description: Owner 租户所有者信息。
paid_amount:
description: PaidAmount 已支付金额(分)。
type: integer
paid_orders:
description: PaidOrders 已支付订单数(内容购买)。
type: integer
published_content_count:
description: PublishedContentCount 已发布内容数量。
type: integer
refund_amount:
description: RefundAmount 已退款金额(分)。
type: integer
refund_orders:
description: RefundOrders 已退款订单数(内容购买)。
type: integer
refund_rate:
description: RefundRate 退款率(退款订单数 / 已支付订单数)。
type: number
status:
allOf:
- $ref: '#/definitions/consts.TenantStatus'
description: Status 租户状态。
status_description:
description: StatusDescription 租户状态描述(用于展示)。
type: string
tenant_id:
description: TenantID 租户ID。
type: integer
type: object
dto.TenantInviteAcceptForm:
properties:
code:
@@ -1827,6 +1899,34 @@ paths:
summary: List contents
tags:
- Content
/super/v1/contents/{id}/review:
post:
consumes:
- application/json
description: Review content
parameters:
- description: Content ID
format: int64
in: path
name: id
required: true
type: integer
- description: Review form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.SuperContentReviewForm'
produces:
- application/json
responses:
"200":
description: Reviewed
schema:
type: string
summary: Review content
tags:
- Content
/super/v1/orders:
get:
consumes:
@@ -2164,6 +2264,37 @@ paths:
summary: List tenant users
tags:
- Tenant
/super/v1/tenants/health:
get:
consumes:
- application/json
description: Tenant health overview
parameters:
- description: Page number
in: query
name: page
type: integer
- description: Page size
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
items:
$ref: '#/definitions/dto.TenantHealthItem'
type: array
type: object
summary: Tenant health overview
tags:
- Tenant
/super/v1/tenants/statuses:
get:
consumes: