初始化项目
This commit is contained in:
163
model/dto/ad_position_dto.go
Normal file
163
model/dto/ad_position_dto.go
Normal file
@@ -0,0 +1,163 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdPositionReq 添加广告位请求
|
||||
type AddAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/add" method:"post" tags:"广告位管理" summary:"添加广告位" dc:"添加新的广告位"`
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name" v:"required"` // 广告位名称
|
||||
Description string `json:"description"` // 广告位描述
|
||||
PositionCode string `json:"positionCode" v:"required"` // 广告位编码,用于标识
|
||||
AdFormat string `json:"adFormat" v:"required"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width int `json:"width" v:"required"` // 宽度(px)
|
||||
Height int `json:"height" v:"required"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `json:"page" v:"required"` // 所属页面
|
||||
Section string `json:"section" v:"required"` // 页面区域
|
||||
Location string `json:"location" v:"required"` // 具体位置
|
||||
|
||||
// 展示设置
|
||||
MaxAds int `json:"maxAds"` // 最大广告数量
|
||||
RefreshInterval int `json:"refreshInterval"` // 刷新间隔(秒)
|
||||
IsLazyLoad bool `json:"isLazyLoad"` // 是否懒加载
|
||||
|
||||
// 定价设置
|
||||
PricingModel string `json:"pricingModel" v:"required"` // 计费模型:CPC、CPM、CPA等
|
||||
BasePrice int64 `json:"basePrice" v:"required"` // 基础价格(分)
|
||||
FloorPrice int64 `json:"floorPrice" v:"required"` // 底价(分)
|
||||
PriceUnit string `json:"priceUnit" v:"required"` // 价格单位:千次展示、单次点击、单次转化等
|
||||
|
||||
// 展示规则
|
||||
DisplayRules *entity.DisplayRules `json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status string `json:"status" v:"required"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive bool `json:"isExclusive"` // 是否独占广告位
|
||||
}
|
||||
|
||||
type AddAdPositionRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAdPositionReq 更新广告位请求
|
||||
type UpdateAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/update" method:"post" tags:"广告位管理" summary:"更新广告位" dc:"更新广告位信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name"` // 广告位名称
|
||||
Description string `json:"description"` // 广告位描述
|
||||
PositionCode string `json:"positionCode"` // 广告位编码,用于标识
|
||||
AdFormat string `json:"adFormat"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width *int `json:"width"` // 宽度(px)
|
||||
Height *int `json:"height"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `json:"page"` // 所属页面
|
||||
Section string `json:"section"` // 页面区域
|
||||
Location string `json:"location"` // 具体位置
|
||||
|
||||
// 展示设置
|
||||
MaxAds *int `json:"maxAds"` // 最大广告数量
|
||||
RefreshInterval *int `json:"refreshInterval"` // 刷新间隔(秒)
|
||||
IsLazyLoad *bool `json:"isLazyLoad"` // 是否懒加载
|
||||
|
||||
// 定价设置
|
||||
PricingModel string `json:"pricingModel"` // 计费模型:CPC、CPM、CPA等
|
||||
BasePrice *int64 `json:"basePrice"` // 基础价格(分)
|
||||
FloorPrice *int64 `json:"floorPrice"` // 底价(分)
|
||||
PriceUnit string `json:"priceUnit"` // 价格单位:千次展示、单次点击、单次转化等
|
||||
|
||||
// 展示规则
|
||||
DisplayRules *entity.DisplayRules `json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive *bool `json:"isExclusive"` // 是否独占广告位
|
||||
}
|
||||
|
||||
// GetAdPositionReq 获取广告位详情请求
|
||||
type GetAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/one" method:"get" tags:"广告位管理" summary:"获取广告位详情" dc:"根据ID获取单个广告位详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdPositionRes struct {
|
||||
*entity.AdPosition
|
||||
}
|
||||
|
||||
// ListAdPositionReq 获取广告位列表请求
|
||||
type ListAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/list" method:"get" tags:"广告位管理" summary:"获取广告位列表" dc:"分页查询广告位列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
Name string `json:"name"` // 广告位名称模糊查询
|
||||
PositionCode string `json:"positionCode"` // 广告位编码
|
||||
PageName string `json:"pageName"` // 所属页面
|
||||
Section string `json:"section"` // 页面区域
|
||||
Status string `json:"status"` // 广告位状态
|
||||
AdFormat string `json:"adFormat"` // 广告格式
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListAdPositionRes struct {
|
||||
List []*entity.AdPosition `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// UpdateAdPositionStatusReq 更新广告位状态请求
|
||||
type UpdateAdPositionStatusReq struct {
|
||||
g.Meta `path:"/adposition/status" method:"post" tags:"广告位管理" summary:"更新广告位状态" dc:"更新广告位状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告位ID
|
||||
Status string `json:"status" v:"required"` // 广告位状态:启用、禁用、测试
|
||||
}
|
||||
|
||||
// GetAdPositionStatisticsReq 获取广告位统计数据请求
|
||||
type GetAdPositionStatisticsReq struct {
|
||||
g.Meta `path:"/adposition/statistics" method:"get" tags:"广告位管理" summary:"获取广告位统计数据" dc:"获取广告位的统计数据"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告位ID
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:天、周、月
|
||||
StartDate int64 `json:"startDate"` // 开始日期
|
||||
EndDate int64 `json:"endDate"` // 结束日期
|
||||
}
|
||||
|
||||
type GetAdPositionStatisticsRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// GetAvailableAdPositionsReq 获取可用广告位请求
|
||||
type GetAvailableAdPositionsReq struct {
|
||||
g.Meta `path:"/adposition/available" method:"get" tags:"广告位管理" summary:"获取可用广告位列表" dc:"获取所有启用的广告位列表"`
|
||||
}
|
||||
|
||||
type GetAvailableAdPositionsRes struct {
|
||||
List []*entity.AdPosition `json:"list"`
|
||||
}
|
||||
|
||||
// MatchAdReq 匹配广告请求
|
||||
type MatchAdReq struct {
|
||||
g.Meta `path:"/adposition/match" method:"post" tags:"广告位管理" summary:"匹配广告" dc:"根据广告位编码和用户信息匹配适合的广告"`
|
||||
|
||||
PositionCode string `json:"positionCode" v:"required"` // 广告位编码
|
||||
UserInfo map[string]interface{} `json:"userInfo"` // 用户信息
|
||||
}
|
||||
|
||||
type MatchAdRes struct {
|
||||
*entity.Advertisement `json:"advertisement"`
|
||||
}
|
||||
113
model/dto/ad_statistics_dto.go
Normal file
113
model/dto/ad_statistics_dto.go
Normal file
@@ -0,0 +1,113 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// GetAdStatisticsReq 获取广告统计数据请求
|
||||
type GetAdStatisticsReq struct {
|
||||
g.Meta `path:"/statistics/list" method:"get" tags:"广告统计" summary:"获取广告统计数据" dc:"获取广告的统计数据"`
|
||||
|
||||
// 分页参数
|
||||
http.Page
|
||||
|
||||
// 维度信息
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:广告主、广告、广告位等
|
||||
StatDimension string `json:"statDimension" v:"required"` // 统计维度:小时、天、周、月
|
||||
TargetId string `json:"targetId"` // 目标ID:广告主ID、广告ID、广告位ID等
|
||||
|
||||
// 时间范围
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
|
||||
// 筛选条件
|
||||
DeviceType string `json:"deviceType"` // 设备类型
|
||||
Platform string `json:"platform"` // 平台
|
||||
Region string `json:"region"` // 地区
|
||||
Gender string `json:"gender"` // 性别
|
||||
AgeGroup string `json:"ageGroup"` // 年龄段
|
||||
|
||||
// 排序
|
||||
SortBy string `json:"sortBy"` // 排序字段
|
||||
SortDirection string `json:"sortDirection"` // 排序方向:asc、desc
|
||||
}
|
||||
|
||||
type GetAdStatisticsRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// GetDashboardReq 获取仪表盘数据请求
|
||||
type GetDashboardReq struct {
|
||||
g.Meta `path:"/dashboard" method:"get" tags:"广告仪表盘" summary:"获取仪表盘数据" dc:"获取广告系统的仪表盘统计数据"`
|
||||
|
||||
// 时间范围
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
|
||||
// 维度
|
||||
Dimension string `json:"dimension"` // 统计维度:天、周、月
|
||||
}
|
||||
|
||||
type GetDashboardRes struct {
|
||||
// 总览数据
|
||||
Overview OverviewData `json:"overview"`
|
||||
|
||||
// 趋势数据
|
||||
Trends []TrendData `json:"trends"`
|
||||
|
||||
// 排行数据
|
||||
TopAdvertisers []RankData `json:"topAdvertisers"` // 广告主排行
|
||||
TopAds []RankData `json:"topAds"` // 广告排行
|
||||
TopPositions []RankData `json:"topPositions"` // 广告位排行
|
||||
}
|
||||
|
||||
// OverviewData 总览数据
|
||||
type OverviewData struct {
|
||||
TotalAdvertisers int64 `json:"totalAdvertisers"` // 广告主总数
|
||||
TotalAds int64 `json:"totalAds"` // 广告总数
|
||||
TotalPositions int64 `json:"totalPositions"` // 广告位总数
|
||||
TotalImpressions int64 `json:"totalImpressions"` // 总展示次数
|
||||
TotalClicks int64 `json:"totalClicks"` // 总点击次数
|
||||
TotalCost int64 `json:"totalCost"` // 总消耗(分)
|
||||
TotalRevenue int64 `json:"totalRevenue"` // 总收入(分)
|
||||
AverageCTR float64 `json:"averageCTR"` // 平均点击率
|
||||
AverageCVR float64 `json:"averageCVR"` // 平均转化率
|
||||
}
|
||||
|
||||
// TrendData 趋势数据
|
||||
type TrendData struct {
|
||||
Date int64 `json:"date"` // 日期
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Conversions int64 `json:"conversions"` // 转化次数
|
||||
Cost int64 `json:"cost"` // 消耗(分)
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
}
|
||||
|
||||
// RankData 排行数据
|
||||
type RankData struct {
|
||||
Id string `json:"id"` // ID
|
||||
Name string `json:"name"` // 名称
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Cost int64 `json:"cost"` // 消耗(分)
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
}
|
||||
|
||||
// GenerateDailyStatisticsReq 生成每日统计数据请求
|
||||
type GenerateDailyStatisticsReq struct {
|
||||
g.Meta `path:"/statistics/generate-daily" method:"post" tags:"广告统计" summary:"生成每日统计数据" dc:"手动生成指定日期的广告统计数据"`
|
||||
|
||||
Date int64 `json:"date" v:"required"` // 日期时间戳
|
||||
}
|
||||
|
||||
type GenerateDailyStatisticsRes struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
133
model/dto/advertisement_dto.go
Normal file
133
model/dto/advertisement_dto.go
Normal file
@@ -0,0 +1,133 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdvertisementReq 添加广告请求
|
||||
type AddAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/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
|
||||
|
||||
// 投放设置
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始投放时间
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束投放时间
|
||||
Budget int64 `json:"budget" v:"required"` // 预算(分)
|
||||
DailyBudget int64 `json:"dailyBudget"` // 日预算(分)
|
||||
BidAmount int64 `json:"bidAmount" v:"required"` // 出价(分)
|
||||
BillingType string `json:"billingType" v:"required"` // 计费类型:CPC、CPM、CPA等
|
||||
|
||||
// 投放条件
|
||||
Targeting *entity.Targeting `json:"targeting"` // 定向条件
|
||||
}
|
||||
|
||||
type AddAdvertisementRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAdvertisementReq 更新广告请求
|
||||
type UpdateAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/update" method:"post" tags:"广告管理" summary:"更新广告" dc:"更新广告信息"`
|
||||
|
||||
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
|
||||
|
||||
// 投放设置
|
||||
StartDate *int64 `json:"startDate"` // 开始投放时间
|
||||
EndDate *int64 `json:"endDate"` // 结束投放时间
|
||||
Budget *int64 `json:"budget"` // 预算(分)
|
||||
DailyBudget *int64 `json:"dailyBudget"` // 日预算(分)
|
||||
BidAmount *int64 `json:"bidAmount"` // 出价(分)
|
||||
BillingType string `json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
||||
|
||||
// 投放条件
|
||||
Targeting *entity.Targeting `json:"targeting"` // 定向条件
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告状态:待审核、已审核、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态
|
||||
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// GetAdvertisementReq 获取广告详情请求
|
||||
type GetAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/one" method:"get" tags:"广告管理" summary:"获取广告详情" dc:"根据ID获取单个广告详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdvertisementRes struct {
|
||||
*entity.Advertisement
|
||||
}
|
||||
|
||||
// ListAdvertisementReq 获取广告列表请求
|
||||
type ListAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/list" method:"get" tags:"广告管理" summary:"获取广告列表" dc:"分页查询广告列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
AdvertiserId string `json:"advertiserId"` // 广告主ID
|
||||
AdPositionId string `json:"adPositionId"` // 广告位ID
|
||||
AdType string `json:"adType"` // 广告类型
|
||||
Status string `json:"status"` // 广告状态
|
||||
AuditStatus string `json:"auditStatus"` // 审核状态
|
||||
Title string `json:"title"` // 广告标题模糊查询
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListAdvertisementRes struct {
|
||||
List []*entity.Advertisement `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// AuditAdvertisementReq 审核广告请求
|
||||
type AuditAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/audit" method:"post" tags:"广告管理" summary:"审核广告" dc:"审核广告,通过或拒绝"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
AuditStatus string `json:"auditStatus" v:"required"` // 审核状态:通过、拒绝
|
||||
AuditReason string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// UpdateAdStatusReq 更新广告状态请求
|
||||
type UpdateAdStatusReq struct {
|
||||
g.Meta `path:"/advertisement/status" method:"post" tags:"广告管理" summary:"更新广告状态" dc:"更新广告状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
Status string `json:"status" v:"required"` // 广告状态:启用、禁用
|
||||
}
|
||||
|
||||
// GetAdStatisticsReq 获取广告统计数据请求
|
||||
type GetAdStatisticsForAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/statistics" method:"get" tags:"广告管理" summary:"获取广告统计数据" dc:"获取广告的统计数据"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:天、周、月
|
||||
StartDate int64 `json:"startDate"` // 开始日期
|
||||
EndDate int64 `json:"endDate"` // 结束日期
|
||||
}
|
||||
|
||||
type GetAdStatisticsForAdvertisementRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
}
|
||||
167
model/dto/advertiser_dto.go
Normal file
167
model/dto/advertiser_dto.go
Normal file
@@ -0,0 +1,167 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdvertiserReq 添加广告主请求
|
||||
type AddAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/add" method:"post" tags:"广告主管理" summary:"添加广告主" dc:"添加新的广告主"`
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name" v:"required"` // 广告主名称
|
||||
ContactName string `json:"contactName" v:"required"` // 联系人姓名
|
||||
ContactPhone string `json:"contactPhone" v:"required"` // 联系电话
|
||||
ContactEmail string `json:"contactEmail" v:"required"` // 联系邮箱
|
||||
Company string `json:"company" v:"required"` // 公司名称
|
||||
Industry string `json:"industry" v:"required"` // 所属行业
|
||||
Scale string `json:"scale"` // 公司规模
|
||||
|
||||
// 证件信息
|
||||
BusinessLicenseUrl string `json:"businessLicenseUrl" v:"required"` // 营业执照URL
|
||||
ICPLicenseUrl string `json:"icpLicenseUrl"` // ICP备案截图URL
|
||||
OtherLicenseUrls []string `json:"otherLicenseUrls"` // 其他证件URL
|
||||
|
||||
// 财务信息
|
||||
BankName string `json:"bankName" v:"required"` // 开户银行
|
||||
BankAccount string `json:"bankAccount" v:"required"` // 银行账号
|
||||
AccountName string `json:"accountName" v:"required"` // 账户名称
|
||||
|
||||
// 合同信息
|
||||
ContractId string `json:"contractId"` // 合同编号
|
||||
ContractType string `json:"contractType"` // 合同类型
|
||||
ContractUrl string `json:"contractUrl"` // 合同文件URL
|
||||
SignDate int64 `json:"signDate"` // 签约日期
|
||||
ExpireDate int64 `json:"expireDate"` // 到期日期
|
||||
|
||||
// 系统信息
|
||||
AccountBalance int64 `json:"accountBalance"` // 账户余额(分)
|
||||
CreditLimit int64 `json:"creditLimit"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注
|
||||
}
|
||||
|
||||
type AddAdvertiserRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAdvertiserReq 更新广告主请求
|
||||
type UpdateAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/update" method:"post" tags:"广告主管理" summary:"更新广告主" dc:"更新广告主信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name"` // 广告主名称
|
||||
ContactName string `json:"contactName"` // 联系人姓名
|
||||
ContactPhone string `json:"contactPhone"` // 联系电话
|
||||
ContactEmail string `json:"contactEmail"` // 联系邮箱
|
||||
Company string `json:"company"` // 公司名称
|
||||
Industry string `json:"industry"` // 所属行业
|
||||
Scale string `json:"scale"` // 公司规模
|
||||
|
||||
// 证件信息
|
||||
BusinessLicenseUrl string `json:"businessLicenseUrl"` // 营业执照URL
|
||||
ICPLicenseUrl string `json:"icpLicenseUrl"` // ICP备案截图URL
|
||||
OtherLicenseUrls []string `json:"otherLicenseUrls"` // 其他证件URL
|
||||
|
||||
// 财务信息
|
||||
BankName string `json:"bankName"` // 开户银行
|
||||
BankAccount string `json:"bankAccount"` // 银行账号
|
||||
AccountName string `json:"accountName"` // 账户名称
|
||||
|
||||
// 合同信息
|
||||
ContractId string `json:"contractId"` // 合同编号
|
||||
ContractType string `json:"contractType"` // 合同类型
|
||||
ContractUrl string `json:"contractUrl"` // 合同文件URL
|
||||
SignDate *int64 `json:"signDate"` // 签约日期
|
||||
ExpireDate *int64 `json:"expireDate"` // 到期日期
|
||||
|
||||
// 系统信息
|
||||
AccountBalance *int64 `json:"accountBalance"` // 账户余额(分)
|
||||
CreditLimit *int64 `json:"creditLimit"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告主状态:待审核、已审核、已拒绝、已冻结
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态
|
||||
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// GetAdvertiserReq 获取广告主详情请求
|
||||
type GetAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/one" method:"get" tags:"广告主管理" summary:"获取广告主详情" dc:"根据ID获取单个广告主详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdvertiserRes struct {
|
||||
*entity.Advertiser
|
||||
}
|
||||
|
||||
// ListAdvertiserReq 获取广告主列表请求
|
||||
type ListAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/list" method:"get" tags:"广告主管理" summary:"获取广告主列表" dc:"分页查询广告主列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
Name string `json:"name"` // 广告主名称模糊查询
|
||||
ContactName string `json:"contactName"` // 联系人模糊查询
|
||||
Company string `json:"company"` // 公司名称模糊查询
|
||||
Industry string `json:"industry"` // 所属行业
|
||||
Status string `json:"status"` // 广告主状态
|
||||
AuditStatus string `json:"auditStatus"` // 审核状态
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListAdvertiserRes struct {
|
||||
List []*entity.Advertiser `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// AuditAdvertiserReq 审核广告主请求
|
||||
type AuditAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/audit" method:"post" tags:"广告主管理" summary:"审核广告主" dc:"审核广告主,通过或拒绝"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
AuditStatus string `json:"auditStatus" v:"required"` // 审核状态:通过、拒绝
|
||||
AuditReason string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// UpdateAdvertiserStatusReq 更新广告主状态请求
|
||||
type UpdateAdvertiserStatusReq struct {
|
||||
g.Meta `path:"/advertiser/status" method:"post" tags:"广告主管理" summary:"更新广告主状态" dc:"更新广告主状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
Status string `json:"status" v:"required"` // 广告主状态:启用、禁用、冻结
|
||||
}
|
||||
|
||||
// RechargeAdvertiserReq 广告主充值请求
|
||||
type RechargeAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/recharge" method:"post" tags:"广告主管理" summary:"广告主充值" dc:"为广告主账户充值"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
Amount int64 `json:"amount" v:"required"` // 充值金额(分)
|
||||
Remark string `json:"remark"` // 充值备注
|
||||
}
|
||||
|
||||
// UpdateCreditLimitReq 更新授信额度请求
|
||||
type UpdateCreditLimitReq struct {
|
||||
g.Meta `path:"/advertiser/credit" method:"post" tags:"广告主管理" summary:"更新授信额度" dc:"更新广告主的授信额度"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
CreditLimit int64 `json:"creditLimit" v:"required"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注说明
|
||||
}
|
||||
|
||||
// GetAdvertiserBalanceReq 获取广告主余额请求
|
||||
type GetAdvertiserBalanceReq struct {
|
||||
g.Meta `path:"/advertiser/balance" method:"get" tags:"广告主管理" summary:"获取广告主余额" dc:"根据ID获取广告主账户余额和授信额度"`
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
}
|
||||
|
||||
// GetAdvertiserBalanceRes 获取广告主余额响应
|
||||
type GetAdvertiserBalanceRes struct {
|
||||
Balance int64 `json:"balance"` // 账户余额(分)
|
||||
CreditLimit int64 `json:"creditLimit"` // 授信额度(分)
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddDataReq 添加数据
|
||||
type AddDataReq struct {
|
||||
g.Meta `path:"/add" method:"post" tags:"数据管理" summary:"添加数据" dc:"记录客服与客户的交互数据"` // 路由: POST /data/add
|
||||
CustomerId string `json:"customerId" v:"required"` // 客户ID
|
||||
CustomerServiceId string `json:"customerServiceId" v:"required"` // 客服ID
|
||||
CustomerServicePlatform string `json:"customerServicePlatform" v:"required"` // 客服平台
|
||||
CustomerServiceName string `json:"customerServiceName" v:"required"` // 客服名称
|
||||
IsInbound bool `json:"isInbound"` // 是否进线
|
||||
IsActive bool `json:"isActive"` // 是否活跃
|
||||
IsServed bool `json:"isServed"` // 是否接待
|
||||
HasSentContactCard bool `json:"hasSentContactCard"` // 是否发联系卡
|
||||
HasSentNameCard bool `json:"hasSentNameCard"` // 是否发名片
|
||||
HasLeftContactInfo bool `json:"hasLeftContactInfo"` // 是否留资
|
||||
SessionStartTime int64 `json:"sessionStartTime"` // 会话开始时间
|
||||
MessageTime int64 `json:"messageTime"` // 消息时间
|
||||
}
|
||||
|
||||
type AddDataRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateDataReq 更新数据
|
||||
type UpdateDataReq struct {
|
||||
g.Meta `path:"/update" method:"post" tags:"数据管理" summary:"更新数据" dc:"更新客服交互数据"` // 路由: POST /data/update
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
CustomerId string `json:"customerId"`
|
||||
CustomerServiceId string `json:"customerServiceId"`
|
||||
CustomerServicePlatform string `json:"customerServicePlatform"`
|
||||
CustomerServiceName string `json:"customerServiceName"`
|
||||
IsInbound *bool `json:"isInbound"` // 使用指针以区分 false 和未传值
|
||||
IsActive *bool `json:"isActive"`
|
||||
IsServed *bool `json:"isServed"`
|
||||
HasSentContactCard *bool `json:"hasSentContactCard"`
|
||||
HasSentNameCard *bool `json:"hasSentNameCard"`
|
||||
HasLeftContactInfo *bool `json:"hasLeftContactInfo"`
|
||||
SessionStartTime int64 `json:"sessionStartTime"`
|
||||
MessageTime int64 `json:"messageTime"`
|
||||
}
|
||||
|
||||
// GetDataReq 获取单个数据
|
||||
type GetDataReq struct {
|
||||
g.Meta `path:"/one" method:"get" tags:"数据管理" summary:"获取数据详情" dc:"根据ID获取单条数据记录"` // 路由: GET /data/one
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
// ListDataReq 获取数据列表
|
||||
type ListDataReq struct {
|
||||
g.Meta `path:"/list" method:"get" tags:"数据管理" summary:"获取数据列表" dc:"分页查询交互数据,支持按客户、客服、时间筛选"` // 路由: GET /data/list
|
||||
http.Page
|
||||
CustomerId string `json:"customerId"` // 筛选:客户ID
|
||||
CustomerServiceId string `json:"customerServiceId"` // 筛选:客服ID
|
||||
DateRange []string `json:"dateRange"` // 筛选:时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListDataRes struct {
|
||||
List []*entity.Data `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
104
model/dto/report_dto.go
Normal file
104
model/dto/report_dto.go
Normal file
@@ -0,0 +1,104 @@
|
||||
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:"/report/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:"/report/one" 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:"/report/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:"/report/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:"/report/delete" method:"post" tags:"广告报表" summary:"删除报表" dc:"删除指定的报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
|
||||
// DownloadReportReq 下载报表请求
|
||||
type DownloadReportReq struct {
|
||||
g.Meta `path:"/report/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:"/report/generate" method:"post" tags:"广告报表" summary:"生成报表" dc:"手动生成报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
Reference in New Issue
Block a user