代码初始化

This commit is contained in:
2026-04-02 11:51:44 +08:00
commit b87244638f
83 changed files with 13084 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package copydata
import (
dto "cid/model/dto/copydata"
service "cid/service/copydata"
"context"
)
type AccountReport struct{}
// AccountReportDetail CidAccountReportDetail 广告数据报表详情控制器
var AccountReportDetail = new(AccountReport)
// CreateCidAccountReportDetail 创建广告数据报表详情
func (c *AccountReport) CreateCidAccountReportDetail(ctx context.Context, req *dto.CreateCidAccountReportDetailReq) (res *dto.CreateCidAccountReportDetailRes, err error) {
return service.CidAccountReportDetail.Create(ctx, req.CidAccountReportDetailItem)
}
// BatchCreateCidAccountReportDetail 批量创建广告数据报表详情
func (c *AccountReport) BatchCreateCidAccountReportDetail(ctx context.Context, req *dto.BatchCreateCidAccountReportDetailReq) (res *dto.BatchCreateCidAccountReportDetailRes, err error) {
return service.CidAccountReportDetail.BatchCreate(ctx, req)
}
// CreateCidAccountReportSum 创建广告数据报表汇总
func (c *AccountReport) CreateCidAccountReportSum(ctx context.Context, req *dto.CreateCidAccountReportSumReq) (res *dto.CreateCidAccountReportSumRes, err error) {
return service.CidAccountReportDetail.CreateSum(ctx, req.CidAccountReportSumItem)
}
// BatchCreateCidAccountReportSum 批量创建广告数据报表汇总
func (c *AccountReport) BatchCreateCidAccountReportSum(ctx context.Context, req *dto.BatchCreateCidAccountReportSumReq) (res *dto.BatchCreateCidAccountReportSumRes, err error) {
return service.CidAccountReportDetail.BatchCreateSum(ctx, req)
}

View File

@@ -0,0 +1,30 @@
package copydata
import (
dto "cid/model/dto/copydata"
service "cid/service/copydata"
"context"
)
type creativeReport struct{}
// CreativeReport 广告效果指标表控制器
var CreativeReport = new(creativeReport)
// CreateCreativeReportSum 创建广告效果指标表
func (c *creativeReport) CreateCreativeReportSum(ctx context.Context, req *dto.CreateCreativeReportSumReq) (res *dto.CreateCreativeReportSumRes, err error) {
return service.CreativeReportSum.Create(ctx, req.CreativeReportSumItem)
}
// BatchCreateCreativeReportSum 批量创建广告效果指标表
func (c *creativeReport) BatchCreateCreativeReportSum(ctx context.Context, req *dto.BatchCreateCreativeReportSumReq) (res *dto.BatchCreateCreativeReportSumRes, err error) {
return service.CreativeReportSum.BatchCreate(ctx, req)
}
func (c *creativeReport) CreateCreativeReportDetail(ctx context.Context, req *dto.CreateCreativeReportDetailReq) (res *dto.CreateCreativeReportDetailRes, err error) {
return service.CreativeReportSum.CreateDetail(ctx, req.CreativeReportDetailItem)
}
func (c *creativeReport) BatchCreateCreativeReportDetail(ctx context.Context, req *dto.BatchCreateCreativeReportDetailReq) (res *dto.BatchCreateCreativeReportDetailRes, err error) {
return service.CreativeReportSum.BatchCreateDetail(ctx, req)
}

View 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)
}

View File

@@ -0,0 +1,29 @@
package copydata
import (
dto "cid/model/dto/copydata"
service "cid/service/copydata"
"context"
"gitea.com/red-future/common/beans"
)
var PopulationReport = new(populationReport)
type populationReport struct{}
// CreatePopulationReport 创建人群报表数据
func (c *populationReport) CreatePopulationReport(ctx context.Context, req *dto.CreatePopulationReportReq) (*dto.CreatePopulationReportRes, error) {
return service.PopulationReportService.Create(ctx, req.PopulationReportItem)
}
// BatchCreatePopulationReport 批量创建人群报表数据
func (c *populationReport) BatchCreatePopulationReport(ctx context.Context, req *dto.BatchCreatePopulationReportReq) (*dto.BatchCreatePopulationReportRes, error) {
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
return service.PopulationReportService.BatchCreate(ctx, req.Items)
}
// ListPopulationReport 查询人群报表数据列表
func (c *populationReport) ListPopulationReport(ctx context.Context, req *dto.ListPopulationReportReq) (*dto.ListPopulationReportRes, error) {
return service.PopulationReportService.List(ctx, req)
}

View File

@@ -0,0 +1,32 @@
package copydata
import (
dto "cid/model/dto/copydata"
service "cid/service/copydata"
"context"
)
type storewideReport struct{}
// StorewideReport 广告效果指标控制器
var StorewideReport = new(storewideReport)
// CreateStorewideReport 创建广告效果指标表
func (c *storewideReport) CreateStorewideReport(ctx context.Context, req *dto.CreateStorewideReportSumReq) (res *dto.CreateStorewideReportSumRes, err error) {
return service.StorewideReportSum.Create(ctx, req.StorewideReportSumItem)
}
// BatchCreateStorewideReport 批量创建广告效果指标表
func (c *storewideReport) BatchCreateStorewideReport(ctx context.Context, req *dto.BatchCreateStorewideReportSumReq) (res *dto.BatchCreateStorewideReportSumRes, err error) {
return service.StorewideReportSum.BatchCreate(ctx, req)
}
// CreateStorewideReportDetail 创建广告效果指标表
func (c *storewideReport) CreateStorewideReportDetail(ctx context.Context, req *dto.CreateStorewideReportDetailReq) (res *dto.CreateStorewideReportDetailRes, err error) {
return service.StorewideReportSum.CreateDetail(ctx, req.StorewideReportDetailItem)
}
// BatchCreateStorewideReportDetail 批量创建广告效果指标表
func (c *storewideReport) BatchCreateStorewideReportDetail(ctx context.Context, req *dto.BatchCreateStorewideReportDetailReq) (res *dto.BatchCreateStorewideReportDetailRes, err error) {
return service.StorewideReportSum.BatchCreateDetail(ctx, req)
}

View 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)
}

View 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)
}