feat: add content management feature for superadmin

- Implemented API endpoint for fetching content list with filtering, sorting, and pagination.
- Added DTOs for content items and tenant information.
- Created frontend components for content management, including search and data table functionalities.
- Updated routing to include content management page.
- Enhanced the superadmin menu to navigate to the new content management section.
- Included necessary styles and scripts for the new content management interface.
This commit is contained in:
2025-12-24 16:24:50 +08:00
parent 568f5cda43
commit d60c1e9312
14 changed files with 1373 additions and 8 deletions

View File

@@ -651,6 +651,30 @@ definitions:
description: Order is the created or existing order record (may be nil for
owner/free-path without order).
type: object
dto.SuperContentItem:
properties:
content:
$ref: '#/definitions/models.Content'
owner:
$ref: '#/definitions/dto.SuperUserLite'
price:
$ref: '#/definitions/models.ContentPrice'
status_description:
type: string
tenant:
$ref: '#/definitions/dto.SuperContentTenantLite'
visibility_description:
type: string
type: object
dto.SuperContentTenantLite:
properties:
code:
type: string
id:
type: integer
name:
type: string
type: object
dto.SuperOrderDetail:
properties:
buyer:
@@ -1557,6 +1581,109 @@ paths:
$ref: '#/definitions/dto.LoginResponse'
tags:
- Super
/super/v1/contents:
get:
consumes:
- application/json
parameters:
- description: Asc specifies comma-separated field names to sort ascending by.
in: query
name: asc
type: string
- in: query
name: created_at_from
type: string
- in: query
name: created_at_to
type: string
- description: Desc specifies comma-separated field names to sort descending
by.
in: query
name: desc
type: string
- in: query
name: id
type: integer
- in: query
name: keyword
type: string
- description: Limit is page size; only values in {10,20,50,100} are accepted
(otherwise defaults to 10).
in: query
name: limit
type: integer
- description: Page is 1-based page index; values <= 0 are normalized to 1.
in: query
name: page
type: integer
- in: query
name: price_amount_max
type: integer
- in: query
name: price_amount_min
type: integer
- in: query
name: published_at_from
type: string
- in: query
name: published_at_to
type: string
- enum:
- draft
- reviewing
- published
- unpublished
- blocked
in: query
name: status
type: string
x-enum-varnames:
- ContentStatusDraft
- ContentStatusReviewing
- ContentStatusPublished
- ContentStatusUnpublished
- ContentStatusBlocked
- in: query
name: tenant_code
type: string
- in: query
name: tenant_id
type: integer
- in: query
name: tenant_name
type: string
- in: query
name: user_id
type: integer
- in: query
name: username
type: string
- enum:
- public
- tenant_only
- private
in: query
name: visibility
type: string
x-enum-varnames:
- ContentVisibilityPublic
- ContentVisibilityTenantOnly
- ContentVisibilityPrivate
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/dto.SuperContentItem'
type: object
summary: 内容列表(平台侧汇总)
tags:
- Super
/super/v1/orders:
get:
consumes: