- 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.
34 lines
782 B
Go
34 lines
782 B
Go
package super
|
|
|
|
import (
|
|
"quyun/v2/app/http/super/dto"
|
|
"quyun/v2/app/requests"
|
|
"quyun/v2/app/services"
|
|
|
|
"github.com/gofiber/fiber/v3"
|
|
)
|
|
|
|
// content provides superadmin content endpoints.
|
|
//
|
|
// @provider
|
|
type content struct{}
|
|
|
|
// list
|
|
//
|
|
// @Summary 内容列表(平台侧汇总)
|
|
// @Tags Super
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param filter query dto.SuperContentPageFilter true "Filter"
|
|
// @Success 200 {object} requests.Pager{items=dto.SuperContentItem}
|
|
//
|
|
// @Router /super/v1/contents [get]
|
|
// @Bind filter query
|
|
func (*content) list(ctx fiber.Ctx, filter *dto.SuperContentPageFilter) (*requests.Pager, error) {
|
|
if filter == nil {
|
|
filter = &dto.SuperContentPageFilter{}
|
|
}
|
|
filter.Pagination.Format()
|
|
return services.Content.SuperContentPage(ctx, filter)
|
|
}
|