代码初始化
This commit is contained in:
35
controller/copydata/unit_report_controller.go
Normal file
35
controller/copydata/unit_report_controller.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package copydata
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/copydata"
|
||||
"cid/service/copydata"
|
||||
"context"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type unitReport struct{}
|
||||
|
||||
// UnitReport 获取广告单元数据控制器
|
||||
var UnitReport = new(unitReport)
|
||||
|
||||
// Create 创建广告效果指标
|
||||
func (c *unitReport) Create(ctx context.Context, req *dto.CreateUnitReportSumReq) (res *dto.CreateUnitReportSumRes, err error) {
|
||||
return copydata.UnitReportSumService.Create(ctx, req.UnitReportSumItem)
|
||||
}
|
||||
|
||||
// BatchCreate 批量创建广告效果指标
|
||||
func (c *unitReport) BatchCreate(ctx context.Context, req *dto.BatchCreateUnitReportSumReq) (res *dto.BatchCreateUnitReportSumRes, err error) {
|
||||
return copydata.UnitReportSumService.BatchCreate(ctx, req)
|
||||
}
|
||||
|
||||
// CreateDetail 创建广告效果指标详情
|
||||
func (c *unitReport) CreateDetail(ctx context.Context, req *dto.CreateUnitReportDetailReq) (res *dto.CreateUnitReportDetailRes, err error) {
|
||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
||||
return copydata.UnitReportSumService.CreateDetail(ctx, req.UnitReportDetailItem)
|
||||
}
|
||||
|
||||
// BatchCreateDetail 批量创建广告效果指标详情
|
||||
func (c *unitReport) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateUnitReportDetailReq) (res *dto.BatchCreateUnitReportDetailRes, err error) {
|
||||
return copydata.UnitReportSumService.BatchCreateDetail(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user