初始化项目
This commit is contained in:
@@ -12,15 +12,14 @@ type AddAdvertisementReq struct {
|
||||
g.Meta `path:"/add" method:"post" tags:"广告管理" summary:"添加广告" dc:"添加新的广告"`
|
||||
|
||||
// 广告基本信息
|
||||
Title string `json:"title" v:"required"` // 广告标题
|
||||
Description string `json:"description"` // 广告描述
|
||||
AdvertiserId string `json:"advertiserId" v:"required"` // 广告主ID
|
||||
AdPositionId string `json:"adPositionId" v:"required"` // 广告位ID
|
||||
AdType string `json:"adType" v:"required"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `json:"adFormat" v:"required"` // 广告格式
|
||||
MaterialUrl string `json:"materialUrl" v:"required"` // 广告素材URL
|
||||
LinkUrl string `json:"linkUrl"` // 点击跳转链接
|
||||
LandingPageUrl string `json:"landingPageUrl"` // 落地页URL
|
||||
Title string `json:"title" v:"required"` // 广告标题
|
||||
Description string `json:"description"` // 广告描述
|
||||
AdvertiserId string `json:"advertiserId" v:"required"` // 广告主ID
|
||||
AdPositionId string `json:"adPositionId" v:"required"` // 广告位ID
|
||||
AdType string `json:"adType" v:"required"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `json:"adFormat" v:"required"` // 广告格式
|
||||
MaterialUrl string `json:"materialUrl" v:"required"` // 广告素材URL
|
||||
TargetUrl string `json:"targetUrl" v:"required"` // 目标链接
|
||||
|
||||
// 投放设置
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始投放时间
|
||||
@@ -45,15 +44,14 @@ type UpdateAdvertisementReq struct {
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 广告基本信息
|
||||
Title string `json:"title"` // 广告标题
|
||||
Description string `json:"description"` // 广告描述
|
||||
AdvertiserId string `json:"advertiserId"` // 广告主ID
|
||||
AdPositionId string `json:"adPositionId"` // 广告位ID
|
||||
AdType string `json:"adType"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `json:"adFormat"` // 广告格式
|
||||
MaterialUrl string `json:"materialUrl"` // 广告素材URL
|
||||
LinkUrl string `json:"linkUrl"` // 点击跳转链接
|
||||
LandingPageUrl string `json:"landingPageUrl"` // 落地页URL
|
||||
Title string `json:"title"` // 广告标题
|
||||
Description string `json:"description"` // 广告描述
|
||||
AdvertiserId string `json:"advertiserId"` // 广告主ID
|
||||
AdPositionId string `json:"adPositionId"` // 广告位ID
|
||||
AdType string `json:"adType"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `json:"adFormat"` // 广告格式
|
||||
MaterialUrl string `json:"materialUrl"` // 广告素材URL
|
||||
TargetUrl string `json:"targetUrl"` // 目标链接
|
||||
|
||||
// 投放设置
|
||||
StartDate *int64 `json:"startDate"` // 开始投放时间
|
||||
@@ -67,8 +65,8 @@ type UpdateAdvertisementReq struct {
|
||||
Targeting *entity.Targeting `json:"targeting"` // 定向条件
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告状态:待审核、已审核、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态
|
||||
Status *string `json:"status"` // 广告状态:待审核、审核中、已通过、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态:通过、拒绝
|
||||
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidservice/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// CreateReportReq 创建报表请求
|
||||
type CreateReportReq struct {
|
||||
g.Meta `path:"/create" method:"post" tags:"广告报表" summary:"创建报表" dc:"创建新的广告报表"`
|
||||
|
||||
// 报表信息
|
||||
ReportName string `json:"reportName" v:"required"` // 报表名称
|
||||
ReportType string `json:"reportType" v:"required"` // 报表类型:日报、周报、月报、自定义
|
||||
ReportPeriod string `json:"reportPeriod" v:"required"` // 报表周期
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
ReportConfig map[string]interface{} `json:"reportConfig"` // 报表配置
|
||||
|
||||
// 其他信息
|
||||
FileFormat string `json:"fileFormat"` // 文件格式:CSV、Excel、PDF
|
||||
EmailRecipients []string `json:"emailRecipients"` // 邮件接收人列表
|
||||
Schedule string `json:"schedule"` // 定时设置
|
||||
}
|
||||
|
||||
type CreateReportRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// GetReportReq 获取报表详情请求
|
||||
type GetReportReq struct {
|
||||
g.Meta `path:"/getOne" method:"get" tags:"广告报表" summary:"获取报表详情" dc:"根据ID获取单个报表详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetReportRes struct {
|
||||
*entity.AdReport
|
||||
}
|
||||
|
||||
// ListReportReq 获取报表列表请求
|
||||
type ListReportReq struct {
|
||||
g.Meta `path:"/list" method:"get" tags:"广告报表" summary:"获取报表列表" dc:"分页查询报表列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
ReportName string `json:"reportName"` // 报表名称模糊查询
|
||||
ReportType string `json:"reportType"` // 报表类型
|
||||
Status string `json:"status"` // 报表状态
|
||||
Operator string `json:"operator"` // 操作人
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListReportRes struct {
|
||||
List []*entity.AdReport `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// UpdateReportReq 更新报表请求
|
||||
type UpdateReportReq struct {
|
||||
g.Meta `path:"/update" method:"post" tags:"广告报表" summary:"更新报表" dc:"更新报表信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 报表信息
|
||||
ReportName string `json:"reportName"` // 报表名称
|
||||
ReportType string `json:"reportType"` // 报表类型:日报、周报、月报、自定义
|
||||
ReportPeriod string `json:"reportPeriod"` // 报表周期
|
||||
StartDate *int64 `json:"startDate"` // 开始日期
|
||||
EndDate *int64 `json:"endDate"` // 结束日期
|
||||
ReportConfig map[string]interface{} `json:"reportConfig"` // 报表配置
|
||||
|
||||
// 其他信息
|
||||
FileFormat string `json:"fileFormat"` // 文件格式:CSV、Excel、PDF
|
||||
EmailRecipients []string `json:"emailRecipients"` // 邮件接收人列表
|
||||
Schedule string `json:"schedule"` // 定时设置
|
||||
}
|
||||
|
||||
// DeleteReportReq 删除报表请求
|
||||
type DeleteReportReq struct {
|
||||
g.Meta `path:"/delete" method:"post" tags:"广告报表" summary:"删除报表" dc:"删除指定的报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
|
||||
// DownloadReportReq 下载报表请求
|
||||
type DownloadReportReq struct {
|
||||
g.Meta `path:"/download" method:"get" tags:"广告报表" summary:"下载报表" dc:"下载指定的报表文件"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
|
||||
type DownloadReportRes struct {
|
||||
DownloadUrl string `json:"downloadUrl"` // 下载链接
|
||||
FileSize int64 `json:"fileSize"` // 文件大小(字节)
|
||||
FileFormat string `json:"fileFormat"` // 文件格式
|
||||
}
|
||||
|
||||
// GenerateReportReq 生成报表请求
|
||||
type GenerateReportReq struct {
|
||||
g.Meta `path:"/generate" method:"post" tags:"广告报表" summary:"生成报表" dc:"手动生成报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
@@ -7,7 +7,7 @@ type ReportGenerateReq struct {
|
||||
g.Meta `path:"/generateReport" method:"post"`
|
||||
TenantID int64 `json:"tenant_id" v:"required"`
|
||||
AppID int64 `json:"app_id"`
|
||||
ReportType string `json:"report_type" v:"required|in:daily,monthly,quarterly,yearly"`
|
||||
ReportType string `json:"report_type" v:"required|in:daily,weekly,monthly,quarterly,yearly"`
|
||||
Date string `json:"date"` // 格式: 2024-01-01 (daily), 2024-01 (monthly), 2024-Q1 (quarterly), 2024 (yearly)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@ type Advertisement struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 广告基本信息
|
||||
Title string `bson:"title" json:"title"` // 广告标题
|
||||
Description string `bson:"description" json:"description"` // 广告描述
|
||||
AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID
|
||||
AdPositionId string `bson:"adPositionId" json:"adPositionId"` // 广告位ID
|
||||
AdType string `bson:"adType" json:"adType"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `bson:"adFormat" json:"adFormat"` // 广告格式
|
||||
MaterialUrl string `bson:"materialUrl" json:"materialUrl"` // 广告素材URL
|
||||
LinkUrl string `bson:"linkUrl" json:"linkUrl"` // 点击跳转链接
|
||||
LandingPageUrl string `bson:"landingPageUrl" json:"landingPageUrl"` // 落地页URL
|
||||
Title string `bson:"title" json:"title"` // 广告标题
|
||||
Description string `bson:"description" json:"description"` // 广告描述
|
||||
AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID
|
||||
AdPositionId string `bson:"adPositionId" json:"adPositionId"` // 广告位ID
|
||||
AdType string `bson:"adType" json:"adType"` // 广告类型:图片、视频、文字等
|
||||
AdFormat string `bson:"adFormat" json:"adFormat"` // 广告格式
|
||||
MaterialUrl string `bson:"materialUrl" json:"materialUrl"` // 广告素材URL
|
||||
TargetUrl string `bson:"targetUrl" json:"targetUrl"` // 目标链接(点击跳转或落地页)
|
||||
|
||||
// 投放设置
|
||||
StartDate int64 `bson:"startDate" json:"startDate"` // 开始投放时间
|
||||
@@ -33,21 +32,16 @@ type Advertisement struct {
|
||||
Targeting *Targeting `bson:"targeting" json:"targeting"` // 定向条件
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告状态:待审核、已审核、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
|
||||
Status string `bson:"status" json:"status"` // 广告状态:待审核、审核中、已通过、已拒绝、投放中、已暂停、已结束
|
||||
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
|
||||
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
|
||||
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
|
||||
|
||||
// 统计信息
|
||||
Impressions int64 `bson:"impressions" json:"impressions"` // 展示次数
|
||||
Clicks int64 `bson:"clicks" json:"clicks"` // 点击次数
|
||||
Conversions int64 `bson:"conversions" json:"conversions"` // 转化次数
|
||||
Cost int64 `bson:"cost" json:"cost"` // 消耗(分)
|
||||
CTR float64 `bson:"ctr" json:"ctr"` // 点击率
|
||||
CVR float64 `bson:"cvr" json:"cvr"` // 转化率
|
||||
CPM int64 `bson:"cpm" json:"cpm"` // 千次展示成本
|
||||
CPC int64 `bson:"cpc" json:"cpc"` // 单次点击成本
|
||||
// 基础统计信息(比率字段通过计算得到,不持久化存储)
|
||||
Impressions int64 `bson:"impressions" json:"impressions"` // 展示次数
|
||||
Clicks int64 `bson:"clicks" json:"clicks"` // 点击次数
|
||||
Conversions int64 `bson:"conversions" json:"conversions"` // 转化次数
|
||||
Cost int64 `bson:"cost" json:"cost"` // 消耗(分)
|
||||
}
|
||||
|
||||
// Targeting 广告定向条件
|
||||
|
||||
@@ -37,8 +37,7 @@ type Advertiser struct {
|
||||
ExpireDate int64 `bson:"expireDate" json:"expireDate"` // 到期日期
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告主状态:待审核、已审核、已拒绝、已冻结
|
||||
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
|
||||
Status string `bson:"status" json:"status"` // 广告主状态:待审核、审核中、已通过、已拒绝、已冻结
|
||||
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
|
||||
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
|
||||
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
|
||||
|
||||
@@ -15,7 +15,7 @@ type StatReport struct {
|
||||
IsDeleted bool `json:"isDeleted"` // 是否删除
|
||||
|
||||
// 报表基本信息
|
||||
AppID int64 `json:"appId"` // 应用ID
|
||||
AppID int64 `json:"appId"` // 应用ID (0表示所有应用)
|
||||
ReportType string `json:"reportType"` // 报表类型:daily, weekly, monthly, quarterly, yearly
|
||||
ReportDate time.Time `json:"reportDate"` // 报表日期
|
||||
GeneratedAt time.Time `json:"generatedAt"` // 生成时间
|
||||
|
||||
Reference in New Issue
Block a user