gomod引用
This commit is contained in:
@@ -173,128 +173,13 @@ type TestAdSourceReq struct {
|
||||
}
|
||||
|
||||
type TestAdSourceRes struct {
|
||||
Success bool `json:"success"` // 测试是否成功
|
||||
ResponseTime int64 `json:"responseTime"` // 响应时间(毫秒)
|
||||
ErrorMessage string `json:"errorMessage"` // 错误信息
|
||||
SupportedFormats []string `json:"supportedFormats"` // 支持的广告格式
|
||||
QualityMetrics *AdSourceTestMetrics `json:"qualityMetrics"` // 质量指标
|
||||
Success bool `json:"success"` // 测试是否成功
|
||||
ResponseTime int64 `json:"responseTime"` // 响应时间(毫秒)
|
||||
ErrorMessage string `json:"errorMessage"` // 错误信息
|
||||
SupportedFormats []string `json:"supportedFormats"` // 支持的广告格式
|
||||
}
|
||||
|
||||
// DeleteAdSourceRes 删除广告源响应
|
||||
type DeleteAdSourceRes struct {
|
||||
Success bool `json:"success"` // 删除是否成功
|
||||
}
|
||||
|
||||
// AdSourceTestMetrics 广告源测试质量指标
|
||||
type AdSourceTestMetrics struct {
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
AverageResponseTime float64 `json:"averageResponseTime"` // 平均响应时间(毫秒)
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
}
|
||||
|
||||
// GetAdSourceStatisticsReq 获取广告源统计数据请求
|
||||
type GetAdSourceStatisticsReq struct {
|
||||
// g.Meta `path:"/adsource-statistics" method:"get" tags:"广告源管理" summary:"获取广告源统计数据" dc:"获取广告源的详细统计数据"` // 暂时注释,缺少对应的controller方法
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告源ID
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
Dimension string `json:"dimension"` // 统计维度:day、week、month
|
||||
}
|
||||
|
||||
type GetAdSourceStatisticsRes struct {
|
||||
// 概览数据
|
||||
Overview AdSourceOverviewStats `json:"overview"`
|
||||
|
||||
// 趋势数据
|
||||
Trends []AdSourceTrendData `json:"trends"`
|
||||
|
||||
// 性能数据
|
||||
Performance AdSourcePerformanceStats `json:"performance"`
|
||||
|
||||
// 错误统计
|
||||
Errors []AdSourceErrorStats `json:"errors"`
|
||||
}
|
||||
|
||||
// AdSourceOverviewStats 广告源概览统计
|
||||
type AdSourceOverviewStats struct {
|
||||
TotalRequests int64 `json:"totalRequests"` // 总请求数
|
||||
SuccessfulRequests int64 `json:"successfulRequests"` // 成功请求数
|
||||
FailedRequests int64 `json:"failedRequests"` // 失败请求数
|
||||
TotalImpressions int64 `json:"totalImpressions"` // 总展示次数
|
||||
TotalClicks int64 `json:"totalClicks"` // 总点击次数
|
||||
TotalConversions int64 `json:"totalConversions"` // 总转化次数
|
||||
TotalRevenue int64 `json:"totalRevenue"` // 总收入(分)
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
ErrorRate float64 `json:"errorRate"` // 错误率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
eCPM int64 `json:"ecpm"` // 有效千次展示成本(分)
|
||||
eCPC int64 `json:"ecpc"` // 有效点击成本(分)
|
||||
AverageResponseTime float64 `json:"averageResponseTime"` // 平均响应时间(毫秒)
|
||||
Uptime float64 `json:"uptime"` // 可用性(百分比)
|
||||
}
|
||||
|
||||
// AdSourceTrendData 广告源趋势数据
|
||||
type AdSourceTrendData struct {
|
||||
Date int64 `json:"date"` // 日期
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Conversions int64 `json:"conversions"` // 转化次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
ErrorRate float64 `json:"errorRate"` // 错误率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
eCPM int64 `json:"ecpm"` // 有效千次展示成本(分)
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
// AdSourcePerformanceStats 广告源性能统计
|
||||
type AdSourcePerformanceStats struct {
|
||||
// 响应时间分布
|
||||
ResponseTimeDistribution map[string]int64 `json:"responseTimeDistribution"` // 响应时间分布
|
||||
|
||||
// 错误类型统计
|
||||
ErrorTypes map[string]int64 `json:"errorTypes"` // 错误类型统计
|
||||
|
||||
// 地区性能
|
||||
RegionalPerformance map[string]AdSourceRegionalStats `json:"regionalPerformance"` // 地区性能
|
||||
|
||||
// 设备性能
|
||||
DevicePerformance map[string]AdSourceDeviceStats `json:"devicePerformance"` // 设备性能
|
||||
}
|
||||
|
||||
// AdSourceErrorStats 广告源错误统计
|
||||
type AdSourceErrorStats struct {
|
||||
ErrorType string `json:"errorType"` // 错误类型
|
||||
Count int64 `json:"count"` // 错误次数
|
||||
Percentage float64 `json:"percentage"` // 占比
|
||||
LastOccurred int64 `json:"lastOccurred"` // 最后发生时间
|
||||
}
|
||||
|
||||
// AdSourceRegionalStats 广告源地区统计
|
||||
type AdSourceRegionalStats struct {
|
||||
Region string `json:"region"` // 地区
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
// AdSourceDeviceStats 广告源设备统计
|
||||
type AdSourceDeviceStats struct {
|
||||
Device string `json:"device"` // 设备类型
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
117
model/dto/ad_source_statistics_dto.go
Normal file
117
model/dto/ad_source_statistics_dto.go
Normal file
@@ -0,0 +1,117 @@
|
||||
package dto
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// GetAdSourceStatisticsReq 获取广告源统计数据请求
|
||||
type GetAdSourceStatisticsReq struct {
|
||||
g.Meta `path:"/adsource-statistics" method:"get" tags:"广告源管理" summary:"获取广告源统计数据" dc:"获取广告源的详细统计数据"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告源ID
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
Dimension string `json:"dimension"` // 统计维度:day、week、month
|
||||
}
|
||||
|
||||
type GetAdSourceStatisticsRes struct {
|
||||
// 概览数据
|
||||
Overview AdSourceOverviewStats `json:"overview"`
|
||||
|
||||
// 趋势数据
|
||||
Trends []AdSourceTrendData `json:"trends"`
|
||||
|
||||
// 性能数据
|
||||
Performance AdSourcePerformanceStats `json:"performance"`
|
||||
|
||||
// 错误统计
|
||||
Errors []AdSourceErrorStats `json:"errors"`
|
||||
}
|
||||
|
||||
// AdSourceOverviewStats 广告源概览统计
|
||||
type AdSourceOverviewStats struct {
|
||||
TotalRequests int64 `json:"totalRequests"` // 总请求数
|
||||
SuccessfulRequests int64 `json:"successfulRequests"` // 成功请求数
|
||||
FailedRequests int64 `json:"failedRequests"` // 失败请求数
|
||||
TotalImpressions int64 `json:"totalImpressions"` // 总展示次数
|
||||
TotalClicks int64 `json:"totalClicks"` // 总点击次数
|
||||
TotalConversions int64 `json:"totalConversions"` // 总转化次数
|
||||
TotalRevenue int64 `json:"totalRevenue"` // 总收入(分)
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
ErrorRate float64 `json:"errorRate"` // 错误率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
ECPM int64 `json:"ecpm"` // 有效千次展示成本(分)
|
||||
ECPC int64 `json:"ecpc"` // 有效点击成本(分)
|
||||
AverageResponseTime float64 `json:"averageResponseTime"` // 平均响应时间(毫秒)
|
||||
Uptime float64 `json:"uptime"` // 可用性(百分比)
|
||||
}
|
||||
|
||||
// AdSourceTrendData 广告源趋势数据
|
||||
type AdSourceTrendData struct {
|
||||
Date int64 `json:"date"` // 日期
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Conversions int64 `json:"conversions"` // 转化次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
ErrorRate float64 `json:"errorRate"` // 错误率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
ECPM int64 `json:"ecpm"` // 有效千次展示成本(分)
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
// AdSourcePerformanceStats 广告源性能统计
|
||||
type AdSourcePerformanceStats struct {
|
||||
// 响应时间分布
|
||||
ResponseTimeDistribution map[string]int64 `json:"responseTimeDistribution"` // 响应时间分布
|
||||
|
||||
// 错误类型统计
|
||||
ErrorTypes map[string]int64 `json:"errorTypes"` // 错误类型统计
|
||||
|
||||
// 地区性能
|
||||
RegionalPerformance map[string]AdSourceRegionalStats `json:"regionalPerformance"` // 地区性能
|
||||
|
||||
// 设备性能
|
||||
DevicePerformance map[string]AdSourceDeviceStats `json:"devicePerformance"` // 设备性能
|
||||
}
|
||||
|
||||
// AdSourceErrorStats 广告源错误统计
|
||||
type AdSourceErrorStats struct {
|
||||
ErrorType string `json:"errorType"` // 错误类型
|
||||
Count int64 `json:"count"` // 错误次数
|
||||
Percentage float64 `json:"percentage"` // 占比
|
||||
LastOccurred int64 `json:"lastOccurred"` // 最后发生时间
|
||||
}
|
||||
|
||||
// AdSourceRegionalStats 广告源地区统计
|
||||
type AdSourceRegionalStats struct {
|
||||
Region string `json:"region"` // 地区
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
// AdSourceDeviceStats 广告源设备统计
|
||||
type AdSourceDeviceStats struct {
|
||||
Device string `json:"device"` // 设备类型
|
||||
Requests int64 `json:"requests"` // 请求数
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
ResponseTime float64 `json:"responseTime"` // 平均响应时间(毫秒)
|
||||
}
|
||||
|
||||
// AdSourceTestMetrics 广告源测试质量指标
|
||||
type AdSourceTestMetrics struct {
|
||||
SuccessRate float64 `json:"successRate"` // 成功率
|
||||
AverageResponseTime float64 `json:"averageResponseTime"` // 平均响应时间(毫秒)
|
||||
FillRate float64 `json:"fillRate"` // 填充率
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
}
|
||||
Reference in New Issue
Block a user