代码初始化
This commit is contained in:
27
controller/copydata/material_report_controller.go
Normal file
27
controller/copydata/material_report_controller.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package copydata
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/copydata"
|
||||
service "cid/service/copydata"
|
||||
"context"
|
||||
)
|
||||
|
||||
type materialReport struct{}
|
||||
|
||||
// MaterialReport 素材报表数据控制器
|
||||
var MaterialReport = new(materialReport)
|
||||
|
||||
// CreateMaterialReport 创建素材报表数据
|
||||
func (c *materialReport) CreateMaterialReport(ctx context.Context, req *dto.CreateMaterialReportReq) (res *dto.CreateMaterialReportRes, err error) {
|
||||
return service.MaterialReport.Create(ctx, req.MaterialReportItem)
|
||||
}
|
||||
|
||||
// BatchCreateMaterialReport 批量创建素材报表数据
|
||||
func (c *materialReport) BatchCreateMaterialReport(ctx context.Context, req *dto.BatchCreateMaterialReportReq) (res *dto.BatchCreateMaterialReportRes, err error) {
|
||||
return service.MaterialReport.BatchCreate(ctx, req)
|
||||
}
|
||||
|
||||
// ListMaterialReport 获取素材报表数据列表
|
||||
func (c *materialReport) ListMaterialReport(ctx context.Context, req *dto.ListMaterialReportReq) (res *dto.ListMaterialReportRes, err error) {
|
||||
return service.MaterialReport.List(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user