初始化项目
This commit is contained in:
@@ -81,35 +81,6 @@ func (s *adPosition) List(ctx context.Context, req *dto.ListAdPositionReq) (res
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatistics 获取广告位统计数据
|
||||
func (s *adPosition) GetStatistics(ctx context.Context, req *dto.GetAdPositionStatisticsReq) (res *dto.GetAdPositionStatisticsRes, err error) {
|
||||
statReq := &dto.GetAdStatisticsReq{
|
||||
StatType: "adPosition",
|
||||
StatDimension: req.StatType,
|
||||
TargetId: req.Id,
|
||||
StartDate: req.StartDate,
|
||||
EndDate: req.EndDate,
|
||||
DeviceType: "",
|
||||
Platform: "",
|
||||
Region: "",
|
||||
Gender: "",
|
||||
AgeGroup: "",
|
||||
SortBy: "",
|
||||
SortDirection: "",
|
||||
}
|
||||
|
||||
list, total, err := dao.AdStatistics.GetStatistics(ctx, statReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = &dto.GetAdPositionStatisticsRes{
|
||||
Statistics: list,
|
||||
Total: int(total),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetByCode 根据编码获取广告位
|
||||
func (s *adPosition) GetByCode(ctx context.Context, code string) (adPosition *entity.AdPosition, err error) {
|
||||
return dao.AdPosition.GetByCode(ctx, code)
|
||||
|
||||
Reference in New Issue
Block a user