初始化项目
This commit is contained in:
52
controller/report_controller.go
Normal file
52
controller/report_controller.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
|
||||
"cidService/model/dto"
|
||||
"cidService/service"
|
||||
)
|
||||
|
||||
type report struct{}
|
||||
|
||||
var Report = &report{}
|
||||
|
||||
// Create 创建报表
|
||||
func (c *report) Create(ctx context.Context, req *dto.CreateReportReq) (res *dto.CreateReportRes, err error) {
|
||||
return service.Report.Create(ctx, req)
|
||||
}
|
||||
|
||||
// GetOne 获取报表详情
|
||||
func (c *report) GetOne(ctx context.Context, req *dto.GetReportReq) (res *dto.GetReportRes, err error) {
|
||||
return service.Report.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// List 获取报表列表
|
||||
func (c *report) List(ctx context.Context, req *dto.ListReportReq) (res *dto.ListReportRes, err error) {
|
||||
return service.Report.List(ctx, req)
|
||||
}
|
||||
|
||||
// Update 更新报表
|
||||
func (c *report) Update(ctx context.Context, req *dto.UpdateReportReq) (res *http.ResponseEmpty, err error) {
|
||||
err = service.Report.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete 删除报表
|
||||
func (c *report) Delete(ctx context.Context, req *dto.DeleteReportReq) (res *http.ResponseEmpty, err error) {
|
||||
err = service.Report.Delete(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Download 下载报表
|
||||
func (c *report) Download(ctx context.Context, req *dto.DownloadReportReq) (res *dto.DownloadReportRes, err error) {
|
||||
return service.Report.Download(ctx, req)
|
||||
}
|
||||
|
||||
// Generate 生成报表
|
||||
func (c *report) Generate(ctx context.Context, req *dto.GenerateReportReq) (res *http.ResponseEmpty, err error) {
|
||||
err = service.Report.Generate(ctx, req)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user