forked from all_user/stat_center
75 lines
2.8 KiB
Go
75 lines
2.8 KiB
Go
package advertiseSer
|
|
|
|
import (
|
|
"stat/common"
|
|
"time"
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
)
|
|
|
|
type AdvertiseStatSummary struct {
|
|
TotalClick int64 `json:"totalClick"` // 总点击
|
|
}
|
|
|
|
type AdvertiseStatInfo struct {
|
|
Id primitive.ObjectID `json:"id" bson:"_id,omitempty"`
|
|
AdsId int64 `json:"adsId" bson:"adsId"` //广告ID
|
|
AdsName string `json:"adsName" bson:"adsName"` //广告名称
|
|
AppId int32 `json:"appId" bson:"appId"` //应用ID
|
|
AppName string `json:"appName" bson:"appName"` //应用名称
|
|
LocId int32 `json:"locId" bson:"locId"` //位置ID
|
|
LocName string `json:"locName" bson:"locName"` //位置名称
|
|
SumDate time.Time `json:"sumDate" bson:"sumDate"` //记录时间
|
|
Total int64 `json:"total" bson:"total"` //当日点击
|
|
HourData []int64 `json:"hourData" bson:"hourData"` //小时数据
|
|
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //创建时间
|
|
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` //更新时间
|
|
}
|
|
|
|
// GetAdvertiseStatReq 获取app点击统计请求
|
|
type GetAdvertiseStatReq struct {
|
|
common.Page
|
|
Start *time.Time `json:"start"` // 开始时间
|
|
End *time.Time `json:"end"` // 结束时间
|
|
AdsId *int64 `json:"adsId"` // 广告ID
|
|
AppId *[]int64 `json:"appId"` // 应用ID
|
|
AdsName *string `json:"adsName"` // 广告名称
|
|
}
|
|
|
|
type GetAdvertiseStatResp struct {
|
|
Total int64 `json:"total"`
|
|
List []*AdvertiseStatInfo `json:"list"`
|
|
Summary AdvertiseStatSummary `json:"summary"`
|
|
}
|
|
|
|
type AdvertiseTempInfo struct {
|
|
AdsId int64 `json:"id" bson:"_id"` //广告ID
|
|
Total int64 `json:"total" bson:"total"` //当日点击
|
|
}
|
|
|
|
// GetAdvertiseTotalStatReq 获取app点击统计请求
|
|
type GetAdvertiseTotalStatReq struct {
|
|
common.Page
|
|
Start *time.Time `json:"start"` // 开始时间
|
|
End *time.Time `json:"end"` // 结束时间
|
|
AppId *[]int64 `json:"appId"` // 应用ID
|
|
AdsId *int64 `json:"adsId"` // 广告ID
|
|
AdsName *string `json:"adsName"` // 广告名称
|
|
}
|
|
|
|
type AdvertiseTotalStatInfo struct {
|
|
AdsId int64 `json:"adsId" bson:"adsId"` //广告ID
|
|
AdsName string `json:"adsName" bson:"adsName"` //广告名称
|
|
AppId int32 `json:"appId" bson:"appId"` //应用ID
|
|
AppName string `json:"appName" bson:"appName"` //应用名称
|
|
LocId int64 `json:"locId" bson:"locId"` //位置ID
|
|
LocName string `json:"locName" bson:"locName"` //位置名称
|
|
Total int64 `json:"total" bson:"total"` //当日点击
|
|
}
|
|
|
|
type GetAdvertiseTotalStatResp struct {
|
|
Total int64 `json:"total"`
|
|
List []*AdvertiseTotalStatInfo `json:"list"`
|
|
Summary AdvertiseStatSummary `json:"summary"`
|
|
}
|