代码初始化
This commit is contained in:
29
controller/copydata/population_report_controller.go
Normal file
29
controller/copydata/population_report_controller.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user