代码初始化
This commit is contained in:
27
controller/copydata/task_report_controller.go
Normal file
27
controller/copydata/task_report_controller.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package copydata
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/copydata"
|
||||
service "cid/service/copydata"
|
||||
"context"
|
||||
)
|
||||
|
||||
type taskReport struct{}
|
||||
|
||||
// TaskReport 调控任务数据控制器
|
||||
var TaskReport = new(taskReport)
|
||||
|
||||
// CreateTaskReport 创建调控任务数据
|
||||
func (c *taskReport) CreateTaskReport(ctx context.Context, req *dto.CreateTaskReportReq) (res *dto.CreateTaskReportRes, err error) {
|
||||
return service.TaskReport.Create(ctx, req.TaskReportItem)
|
||||
}
|
||||
|
||||
// BatchCreateTaskReport 批量创建调控任务数据
|
||||
func (c *taskReport) BatchCreateTaskReport(ctx context.Context, req *dto.BatchCreateTaskReportReq) (res *dto.BatchCreateTaskReportRes, err error) {
|
||||
return service.TaskReport.BatchCreate(ctx, req)
|
||||
}
|
||||
|
||||
// ListTaskReport 获取调控任务数据列表
|
||||
func (c *taskReport) ListTaskReport(ctx context.Context, req *dto.ListTaskReportReq) (res *dto.ListTaskReportRes, err error) {
|
||||
return service.TaskReport.List(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user