package copydata import ( "context" dto "dataengine/model/dto/copydata" service "dataengine/service/copydata" "gitea.redpowerfuture.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) }