36 lines
1.5 KiB
Go
36 lines
1.5 KiB
Go
package copydata
|
|
|
|
import (
|
|
dto "cid/model/dto/copydata"
|
|
service "cid/service/copydata"
|
|
"context"
|
|
|
|
"gitea.com/red-future/common/beans"
|
|
)
|
|
|
|
type campaignReport struct{}
|
|
|
|
var CampaignReport = new(campaignReport)
|
|
|
|
// CreateCampaignReportSum 创建广告计划效果指标表
|
|
func (c *campaignReport) CreateCampaignReportSum(ctx context.Context, req *dto.CreateCampaignReportSumReq) (res *dto.CreateCampaignReportSumRes, err error) {
|
|
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
return service.CampaignReportSum.Create(ctx, req.CampaignReportSumItem)
|
|
}
|
|
|
|
// BatchCreateCampaignReportSum 批量创建广告计划效果指标表
|
|
func (c *campaignReport) BatchCreateCampaignReportSum(ctx context.Context, req *dto.BatchCreateCampaignReportSumReq) (res *dto.BatchCreateCampaignReportSumRes, err error) {
|
|
return service.CampaignReportSum.BatchCreate(ctx, req)
|
|
}
|
|
|
|
// CreateCampaignReportDetail 创建广告效果指标表
|
|
func (c *campaignReport) CreateCampaignReportDetail(ctx context.Context, req *dto.CreateCampaignReportDetailReq) (res *dto.CreateCampaignReportDetailRes, err error) {
|
|
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
return service.CampaignReportSum.CreateDetail(ctx, req.CampaignReportDetailItem)
|
|
}
|
|
|
|
// BatchCreateCampaignReportDetail 批量创建广告效果指标表
|
|
func (c *campaignReport) BatchCreateCampaignReportDetail(ctx context.Context, req *dto.BatchCreateCampaignReportDetailReq) (res *dto.BatchCreateCampaignReportDetailRes, err error) {
|
|
return service.CampaignReportSum.BatchCreateDetail(ctx, req)
|
|
}
|