75 lines
2.0 KiB
Go
75 lines
2.0 KiB
Go
package admin
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
"nl-video-api/internal/service"
|
|
)
|
|
|
|
// AttachmentController 管理员附件管理控制器
|
|
type AttachmentController struct{}
|
|
|
|
// NewAttachmentController 创建管理员附件管理控制器实例
|
|
func NewAttachmentController() *AttachmentController {
|
|
return &AttachmentController{}
|
|
}
|
|
|
|
// GetList 获取附件列表
|
|
func (c *AttachmentController) GetList(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminGetList(r)
|
|
}
|
|
|
|
// GetDetail 获取附件详情
|
|
func (c *AttachmentController) GetDetail(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminGetDetail(r)
|
|
}
|
|
|
|
// Update 更新附件
|
|
func (c *AttachmentController) Update(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminUpdate(r)
|
|
}
|
|
|
|
// Delete 删除附件
|
|
func (c *AttachmentController) Delete(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminDelete(r)
|
|
}
|
|
|
|
// BatchDelete 批量删除附件
|
|
func (c *AttachmentController) BatchDelete(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminBatchDelete(r)
|
|
}
|
|
|
|
// Download 下载附件
|
|
func (c *AttachmentController) Download(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminDownload(r)
|
|
}
|
|
|
|
// Move 移动附件
|
|
func (c *AttachmentController) Move(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminMove(r)
|
|
}
|
|
|
|
// Copy 复制附件
|
|
func (c *AttachmentController) Copy(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminCopy(r)
|
|
}
|
|
|
|
// Rename 重命名附件
|
|
func (c *AttachmentController) Rename(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminRename(r)
|
|
}
|
|
|
|
// Search 搜索附件
|
|
func (c *AttachmentController) Search(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminSearch(r)
|
|
}
|
|
|
|
// GetCategoryList 获取附件分类列表
|
|
func (c *AttachmentController) GetCategoryList(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminGetCategoryList(r)
|
|
}
|
|
|
|
// GetStatistics 获取附件统计
|
|
func (c *AttachmentController) GetStatistics(r *ghttp.Request) {
|
|
service.NewAttachmentService().AdminGetStatistics(r)
|
|
}
|