重构数据引擎
This commit is contained in:
-1478
File diff suppressed because it is too large
Load Diff
+15
-3
@@ -9,6 +9,15 @@ rate:
|
|||||||
limit: 200
|
limit: 200
|
||||||
burst: 300
|
burst: 300
|
||||||
|
|
||||||
|
# 数据同步配置
|
||||||
|
sync:
|
||||||
|
page_size: 100 # 每次分页请求条数
|
||||||
|
concurrency: 5 # 同步并发数
|
||||||
|
retry_count: 3 # 最大重试次数
|
||||||
|
sync_interval_minutes: 60 # 自动同步间隔(分钟)
|
||||||
|
compensation_interval_seconds: 300 # 补偿调度器扫描间隔(秒)
|
||||||
|
auto_sync_enabled: true # 是否启用自动同步
|
||||||
|
|
||||||
# Database.
|
# Database.
|
||||||
database:
|
database:
|
||||||
default:
|
default:
|
||||||
@@ -17,7 +26,7 @@ database:
|
|||||||
port: "5432"
|
port: "5432"
|
||||||
user: "postgres"
|
user: "postgres"
|
||||||
pass: "root"
|
pass: "root"
|
||||||
name: "data-engine"
|
name: "engine"
|
||||||
role: "master"
|
role: "master"
|
||||||
maxIdle: "5"
|
maxIdle: "5"
|
||||||
maxOpen: "20"
|
maxOpen: "20"
|
||||||
@@ -53,9 +62,12 @@ consul:
|
|||||||
jaeger: #链路追踪
|
jaeger: #链路追踪
|
||||||
addr: 116.204.74.41:4318
|
addr: 116.204.74.41:4318
|
||||||
|
|
||||||
|
# 平台认证信息(已迁移到 api_datasource_platform 表中管理)
|
||||||
|
# 保留此处仅作参考,系统启动后从数据库读取
|
||||||
tencent:
|
tencent:
|
||||||
oauth:
|
oauth:
|
||||||
client_id: "1112038234"
|
client_id: "1112038234"
|
||||||
client_secret: "GxyjXFbZAs5dnsNQ"
|
client_secret: "GxyjXFbZAs5dnsNQ"
|
||||||
refresh_token: "afd77374e4b0a305a1a5c1ce349f7105"
|
refresh_token: "d15b37363a42449026d337708516e95e"
|
||||||
access_token: "55c1371d16c65921b1448b91ce688a49"
|
access_token: "4bacfc7c9b0a31f70ec0eb4771f8b542"
|
||||||
|
|
||||||
|
|||||||
@@ -2,25 +2,8 @@ package public
|
|||||||
|
|
||||||
// PostgreSQL表名常量
|
// PostgreSQL表名常量
|
||||||
const (
|
const (
|
||||||
ApiInterfaceTable = "api_interface" // 接口管理表
|
ApiInterfaceTable = "api_interface" // 接口管理表
|
||||||
CidAccountReportDetailTable = "cid_account_report_detail" // 广告账户数据明细表
|
DatasourcePlatformTable = "api_datasource_platform" // 数据源平台表
|
||||||
CidAccountReportSumTable = "cid_account_report_sum" // 广告账户数据汇总表
|
SyncTaskLogTable = "sync_task_log" // 同步任务日志表
|
||||||
FieldMappingConfigTable = "api_field_mapping_config" // 字段映射表
|
SyncTrackerTable = "sync_tracker" // 同步跟踪表(增量同步时间记录)
|
||||||
DatasourcePlatformTable = "api_datasource_platform" // 数据源平台表
|
|
||||||
TaskReportTable = "task_report" // 调控任务数据表
|
|
||||||
PopulationReportTable = "population_report" // 人群报表表
|
|
||||||
MaterialReportTable = "material_report" // 素材报表表
|
|
||||||
StorewideReportSumTable = "storewide_report_sum" // 全站数据sum表
|
|
||||||
StorewideReportDetailTable = "storewide_report_detail" // 全站数据detail表
|
|
||||||
CreativeReportSumTable = "creative_report_sum" // 广告创意数据sum表
|
|
||||||
CreativeReportDetailTable = "creative_report_detail" // 广告创意数据detail表
|
|
||||||
UnitReportSumTable = "unit_report_sum" // 广告单元数据detail表
|
|
||||||
UnitReportDetailTable = "unit_report_detail" // 广告单元数据detail表
|
|
||||||
CampaignReportSumTable = "campaign_report_sum" // 广告计划数据detail表
|
|
||||||
CampaignReportDetailTable = "campaign_report_detail" // 广告计划数据detail表
|
|
||||||
SyncTaskLogTable = "sync_task_log" // 同步任务日志表
|
|
||||||
TencentAccountRelationTable = "tencent_account_relation" // 腾讯广告账户关系表
|
|
||||||
TencentAudioTable = "tencent_audio" // 腾讯广告音乐素材表
|
|
||||||
TencentImageTable = "tencent_image" // 腾讯广告图片素材表
|
|
||||||
TencentVideoTable = "tencent_video" // 腾讯广告视频素材表
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
)
|
|
||||||
|
|
||||||
type AccountReport struct{}
|
|
||||||
|
|
||||||
// AccountReportDetail CidAccountReportDetail 广告数据报表详情控制器
|
|
||||||
var AccountReportDetail = new(AccountReport)
|
|
||||||
|
|
||||||
// CreateCidAccountReportDetail 创建广告数据报表详情
|
|
||||||
func (c *AccountReport) CreateCidAccountReportDetail(ctx context.Context, req *dto.CreateCidAccountReportDetailReq) (res *dto.CreateCidAccountReportDetailRes, err error) {
|
|
||||||
return service.CidAccountReportDetail.Create(ctx, req.CidAccountReportDetailItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportDetail 批量创建广告数据报表详情
|
|
||||||
func (c *AccountReport) BatchCreateCidAccountReportDetail(ctx context.Context, req *dto.BatchCreateCidAccountReportDetailReq) (res *dto.BatchCreateCidAccountReportDetailRes, err error) {
|
|
||||||
return service.CidAccountReportDetail.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCidAccountReportSum 创建广告数据报表汇总
|
|
||||||
func (c *AccountReport) CreateCidAccountReportSum(ctx context.Context, req *dto.CreateCidAccountReportSumReq) (res *dto.CreateCidAccountReportSumRes, err error) {
|
|
||||||
return service.CidAccountReportDetail.CreateSum(ctx, req.CidAccountReportSumItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportSum 批量创建广告数据报表汇总
|
|
||||||
func (c *AccountReport) BatchCreateCidAccountReportSum(ctx context.Context, req *dto.BatchCreateCidAccountReportSumReq) (res *dto.BatchCreateCidAccountReportSumRes, err error) {
|
|
||||||
return service.CidAccountReportDetail.BatchCreateSum(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type campaignReport struct{}
|
|
||||||
|
|
||||||
var CampaignReport = new(campaignReport)
|
|
||||||
|
|
||||||
// CreateCampaignReportSum 创建广告计划效果指标表
|
|
||||||
func (c *campaignReport) CreateCampaignReportSum(ctx context.Context, req *dto.CreateCampaignReportSumReq) (res *dto.CreateCampaignReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.CampaignReportSum.Create(ctx, req.CampaignReportSumItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCampaignReportSum 批量创建广告计划效果指标表
|
|
||||||
func (c *campaignReport) BatchCreateCampaignReportSum(ctx context.Context, req *dto.BatchCreateCampaignReportSumReq) (res *dto.BatchCreateCampaignReportSumRes, err error) {
|
|
||||||
return service.CampaignReportSum.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCampaignReportDetail 创建广告效果指标表
|
|
||||||
func (c *campaignReport) CreateCampaignReportDetail(ctx context.Context, req *dto.CreateCampaignReportDetailReq) (res *dto.CreateCampaignReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.CampaignReportSum.CreateDetail(ctx, req.CampaignReportDetailItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCampaignReportDetail 批量创建广告效果指标表
|
|
||||||
func (c *campaignReport) BatchCreateCampaignReportDetail(ctx context.Context, req *dto.BatchCreateCampaignReportDetailReq) (res *dto.BatchCreateCampaignReportDetailRes, err error) {
|
|
||||||
return service.CampaignReportSum.BatchCreateDetail(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
)
|
|
||||||
|
|
||||||
type creativeReport struct{}
|
|
||||||
|
|
||||||
// CreativeReport 广告效果指标表控制器
|
|
||||||
var CreativeReport = new(creativeReport)
|
|
||||||
|
|
||||||
// CreateCreativeReportSum 创建广告效果指标表
|
|
||||||
func (c *creativeReport) CreateCreativeReportSum(ctx context.Context, req *dto.CreateCreativeReportSumReq) (res *dto.CreateCreativeReportSumRes, err error) {
|
|
||||||
return service.CreativeReportSum.Create(ctx, req.CreativeReportSumItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCreativeReportSum 批量创建广告效果指标表
|
|
||||||
func (c *creativeReport) BatchCreateCreativeReportSum(ctx context.Context, req *dto.BatchCreateCreativeReportSumReq) (res *dto.BatchCreateCreativeReportSumRes, err error) {
|
|
||||||
return service.CreativeReportSum.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *creativeReport) CreateCreativeReportDetail(ctx context.Context, req *dto.CreateCreativeReportDetailReq) (res *dto.CreateCreativeReportDetailRes, err error) {
|
|
||||||
return service.CreativeReportSum.CreateDetail(ctx, req.CreativeReportDetailItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *creativeReport) BatchCreateCreativeReportDetail(ctx context.Context, req *dto.BatchCreateCreativeReportDetailReq) (res *dto.BatchCreateCreativeReportDetailRes, err error) {
|
|
||||||
return service.CreativeReportSum.BatchCreateDetail(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
)
|
|
||||||
|
|
||||||
type materialReport struct{}
|
|
||||||
|
|
||||||
// MaterialReport 素材报表数据控制器
|
|
||||||
var MaterialReport = new(materialReport)
|
|
||||||
|
|
||||||
// CreateMaterialReport 创建素材报表数据
|
|
||||||
func (c *materialReport) CreateMaterialReport(ctx context.Context, req *dto.CreateMaterialReportReq) (res *dto.CreateMaterialReportRes, err error) {
|
|
||||||
return service.MaterialReport.Create(ctx, req.MaterialReportItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateMaterialReport 批量创建素材报表数据
|
|
||||||
func (c *materialReport) BatchCreateMaterialReport(ctx context.Context, req *dto.BatchCreateMaterialReportReq) (res *dto.BatchCreateMaterialReportRes, err error) {
|
|
||||||
return service.MaterialReport.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMaterialReport 获取素材报表数据列表
|
|
||||||
func (c *materialReport) ListMaterialReport(ctx context.Context, req *dto.ListMaterialReportReq) (res *dto.ListMaterialReportRes, err error) {
|
|
||||||
return service.MaterialReport.List(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
var PopulationReport = new(populationReport)
|
|
||||||
|
|
||||||
type populationReport struct{}
|
|
||||||
|
|
||||||
// CreatePopulationReport 创建人群报表数据
|
|
||||||
func (c *populationReport) CreatePopulationReport(ctx context.Context, req *dto.CreatePopulationReportReq) (*dto.CreatePopulationReportRes, error) {
|
|
||||||
return service.PopulationReportService.Create(ctx, req.PopulationReportItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreatePopulationReport 批量创建人群报表数据
|
|
||||||
func (c *populationReport) BatchCreatePopulationReport(ctx context.Context, req *dto.BatchCreatePopulationReportReq) (*dto.BatchCreatePopulationReportRes, error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.PopulationReportService.BatchCreate(ctx, req.Items)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListPopulationReport 查询人群报表数据列表
|
|
||||||
func (c *populationReport) ListPopulationReport(ctx context.Context, req *dto.ListPopulationReportReq) (*dto.ListPopulationReportRes, error) {
|
|
||||||
return service.PopulationReportService.List(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
)
|
|
||||||
|
|
||||||
type storewideReport struct{}
|
|
||||||
|
|
||||||
// StorewideReport 广告效果指标控制器
|
|
||||||
var StorewideReport = new(storewideReport)
|
|
||||||
|
|
||||||
// CreateStorewideReport 创建广告效果指标表
|
|
||||||
func (c *storewideReport) CreateStorewideReport(ctx context.Context, req *dto.CreateStorewideReportSumReq) (res *dto.CreateStorewideReportSumRes, err error) {
|
|
||||||
return service.StorewideReportSum.Create(ctx, req.StorewideReportSumItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReport 批量创建广告效果指标表
|
|
||||||
func (c *storewideReport) BatchCreateStorewideReport(ctx context.Context, req *dto.BatchCreateStorewideReportSumReq) (res *dto.BatchCreateStorewideReportSumRes, err error) {
|
|
||||||
return service.StorewideReportSum.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateStorewideReportDetail 创建广告效果指标表
|
|
||||||
func (c *storewideReport) CreateStorewideReportDetail(ctx context.Context, req *dto.CreateStorewideReportDetailReq) (res *dto.CreateStorewideReportDetailRes, err error) {
|
|
||||||
return service.StorewideReportSum.CreateDetail(ctx, req.StorewideReportDetailItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReportDetail 批量创建广告效果指标表
|
|
||||||
func (c *storewideReport) BatchCreateStorewideReportDetail(ctx context.Context, req *dto.BatchCreateStorewideReportDetailReq) (res *dto.BatchCreateStorewideReportDetailRes, err error) {
|
|
||||||
return service.StorewideReportSum.BatchCreateDetail(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
service "dataengine/service/copydata"
|
|
||||||
)
|
|
||||||
|
|
||||||
type taskReport struct{}
|
|
||||||
|
|
||||||
// TaskReport 调控任务数据控制器
|
|
||||||
var TaskReport = new(taskReport)
|
|
||||||
|
|
||||||
// CreateTaskReport 创建调控任务数据
|
|
||||||
func (c *taskReport) CreateTaskReport(ctx context.Context, req *dto.CreateTaskReportReq) (res *dto.CreateTaskReportRes, err error) {
|
|
||||||
return service.TaskReport.Create(ctx, req.TaskReportItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateTaskReport 批量创建调控任务数据
|
|
||||||
func (c *taskReport) BatchCreateTaskReport(ctx context.Context, req *dto.BatchCreateTaskReportReq) (res *dto.BatchCreateTaskReportRes, err error) {
|
|
||||||
return service.TaskReport.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListTaskReport 获取调控任务数据列表
|
|
||||||
func (c *taskReport) ListTaskReport(ctx context.Context, req *dto.ListTaskReportReq) (res *dto.ListTaskReportRes, err error) {
|
|
||||||
return service.TaskReport.List(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"dataengine/service/copydata"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type unitReport struct{}
|
|
||||||
|
|
||||||
// UnitReport 获取广告单元数据控制器
|
|
||||||
var UnitReport = new(unitReport)
|
|
||||||
|
|
||||||
// Create 创建广告效果指标
|
|
||||||
func (c *unitReport) Create(ctx context.Context, req *dto.CreateUnitReportSumReq) (res *dto.CreateUnitReportSumRes, err error) {
|
|
||||||
return copydata.UnitReportSumService.Create(ctx, req.UnitReportSumItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标
|
|
||||||
func (c *unitReport) BatchCreate(ctx context.Context, req *dto.BatchCreateUnitReportSumReq) (res *dto.BatchCreateUnitReportSumRes, err error) {
|
|
||||||
return copydata.UnitReportSumService.BatchCreate(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateDetail 创建广告效果指标详情
|
|
||||||
func (c *unitReport) CreateDetail(ctx context.Context, req *dto.CreateUnitReportDetailReq) (res *dto.CreateUnitReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return copydata.UnitReportSumService.CreateDetail(ctx, req.UnitReportDetailItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateDetail 批量创建广告效果指标详情
|
|
||||||
func (c *unitReport) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateUnitReportDetailReq) (res *dto.BatchCreateUnitReportDetailRes, err error) {
|
|
||||||
return copydata.UnitReportSumService.BatchCreateDetail(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
package dict
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/dict"
|
|
||||||
service "dataengine/service/dict"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type fieldMappingConfigController struct{}
|
|
||||||
|
|
||||||
// FieldMappingConfig 字段映射配置控制器
|
|
||||||
var FieldMappingConfig = new(fieldMappingConfigController)
|
|
||||||
|
|
||||||
// CreateFieldMappingConfig 创建字段映射配置
|
|
||||||
func (c *fieldMappingConfigController) CreateFieldMappingConfig(ctx context.Context, req *dto.CreateFieldMappingConfigReq) (res *dto.CreateFieldMappingConfigRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.FieldMappingConfig.Create(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListFieldMappingConfig 获取字段映射配置列表
|
|
||||||
func (c *fieldMappingConfigController) ListFieldMappingConfig(ctx context.Context, req *dto.ListFieldMappingConfigReq) (res *dto.ListFieldMappingConfigRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.FieldMappingConfig.List(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFieldMappingConfig 获取字段映射配置详情
|
|
||||||
func (c *fieldMappingConfigController) GetFieldMappingConfig(ctx context.Context, req *dto.GetFieldMappingConfigReq) (res *dto.GetFieldMappingConfigRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.FieldMappingConfig.GetOne(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateFieldMappingConfig 更新字段映射配置
|
|
||||||
func (c *fieldMappingConfigController) UpdateFieldMappingConfig(ctx context.Context, req *dto.UpdateFieldMappingConfigReq) (res *beans.ResponseEmpty, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
err = service.FieldMappingConfig.Update(ctx, req)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateFieldMappingConfigStatus 更新字段映射配置状态
|
|
||||||
func (c *fieldMappingConfigController) UpdateFieldMappingConfigStatus(ctx context.Context, req *dto.UpdateFieldMappingConfigStatusReq) (res *beans.ResponseEmpty, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
err = service.FieldMappingConfig.UpdateStatus(ctx, req)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteFieldMappingConfig 删除字段映射配置
|
|
||||||
func (c *fieldMappingConfigController) DeleteFieldMappingConfig(ctx context.Context, req *dto.DeleteFieldMappingConfigReq) (res *beans.ResponseEmpty, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
err = service.FieldMappingConfig.Delete(ctx, req)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryFieldMappingByVendorApi 根据厂商和接口查询字段映射
|
|
||||||
func (c *fieldMappingConfigController) QueryFieldMappingByVendorApi(ctx context.Context, req *dto.QueryFieldMappingByVendorApiReq) (res *dto.QueryFieldMappingByVendorApiRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.FieldMappingConfig.QueryByVendorApi(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ValidateFieldMapping 验证字段映射配置
|
|
||||||
func (c *fieldMappingConfigController) ValidateFieldMapping(ctx context.Context, req *dto.ValidateFieldMappingReq) (res *dto.ValidateFieldMappingRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.FieldMappingConfig.Validate(ctx, req)
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
svc "dataengine/service/sync"
|
||||||
|
|
||||||
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
var PlatformSyncController = new(syncCtrl)
|
||||||
|
|
||||||
|
type syncCtrl struct{}
|
||||||
|
|
||||||
|
// TriggerSyncReq 触发同步请求
|
||||||
|
type TriggerSyncReq struct {
|
||||||
|
g.Meta `path:"/trigger" method:"post" tags:"平台同步" summary:"触发同步" dc:"根据平台编码和接口编码触发数据同步"`
|
||||||
|
PlatformCode string `json:"platformCode" v:"required" dc:"平台编码"`
|
||||||
|
InterfaceCode string `json:"interfaceCode" v:"required" dc:"接口编码"`
|
||||||
|
FullSync bool `json:"fullSync" dc:"是否全量同步,true=全量 false=增量"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// TriggerSyncRes 触发同步响应
|
||||||
|
type TriggerSyncRes struct {
|
||||||
|
Success bool `json:"success"`
|
||||||
|
TableName string `json:"tableName"`
|
||||||
|
TotalRows int `json:"totalRows"`
|
||||||
|
InsertedRows int `json:"insertedRows"`
|
||||||
|
Duration string `json:"duration"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// TriggerSync 触发同步
|
||||||
|
func (c *syncCtrl) TriggerSync(ctx context.Context, req *TriggerSyncReq) (*TriggerSyncRes, error) {
|
||||||
|
logrus.Infof("触发同步: platform=%s, interface=%s, fullSync=%v", req.PlatformCode, req.InterfaceCode, req.FullSync)
|
||||||
|
result, err := svc.SyncByConfig(ctx, req.PlatformCode, req.InterfaceCode, req.FullSync)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &TriggerSyncRes{
|
||||||
|
Success: true, TableName: result.TableName,
|
||||||
|
TotalRows: result.TotalRows, InsertedRows: result.InsertedRows,
|
||||||
|
Duration: result.Duration,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryPlatformConfigReq 查询平台配置请求
|
||||||
|
type QueryPlatformConfigReq struct {
|
||||||
|
g.Meta `path:"/config" method:"get" tags:"平台同步" summary:"查询平台配置" dc:"查看平台和接口配置"`
|
||||||
|
PlatformCode string `json:"platformCode" v:"required" dc:"平台编码"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryPlatformConfigRes 查询平台配置响应
|
||||||
|
type QueryPlatformConfigRes struct {
|
||||||
|
PlatformName string `json:"platformName"`
|
||||||
|
PlatformCode string `json:"platformCode"`
|
||||||
|
ApiBaseUrl string `json:"apiBaseUrl"`
|
||||||
|
AuthType string `json:"authType"`
|
||||||
|
HasToken bool `json:"hasToken"`
|
||||||
|
InterfaceCount int `json:"interfaceCount"`
|
||||||
|
Interfaces []struct {
|
||||||
|
Code string `json:"code"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
HasTableDef bool `json:"hasTableDef"`
|
||||||
|
} `json:"interfaces"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryConfig 查询配置
|
||||||
|
func (c *syncCtrl) QueryConfig(ctx context.Context, req *QueryPlatformConfigReq) (*QueryPlatformConfigRes, error) {
|
||||||
|
pm := &svc.PlatformManager{}
|
||||||
|
platform, interfaces, err := pm.GetPlatformWithInterfaces(ctx, req.PlatformCode)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
res := &QueryPlatformConfigRes{
|
||||||
|
PlatformName: platform.PlatformName, PlatformCode: platform.PlatformCode,
|
||||||
|
ApiBaseUrl: platform.ApiBaseUrl, AuthType: platform.AuthType,
|
||||||
|
HasToken: platform.AccessToken != "", InterfaceCount: len(interfaces),
|
||||||
|
}
|
||||||
|
for _, iface := range interfaces {
|
||||||
|
res.Interfaces = append(res.Interfaces, struct {
|
||||||
|
Code string `json:"code"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
HasTableDef bool `json:"hasTableDef"`
|
||||||
|
}{
|
||||||
|
Code: iface.Code, Name: iface.Name, Url: iface.Url,
|
||||||
|
HasTableDef: iface.TableDefinition != nil && len(iface.TableDefinition) > 0,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dto "dataengine/model/dto/tencent"
|
|
||||||
entity "dataengine/model/entity/tencent"
|
|
||||||
service "dataengine/service/tencent"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type oauthController struct{}
|
|
||||||
|
|
||||||
// OauthController OAuth控制器
|
|
||||||
var OauthController = new(oauthController)
|
|
||||||
|
|
||||||
// RefreshToken 刷新腾讯广告Token
|
|
||||||
func (c *oauthController) RefreshToken(ctx context.Context, req *dto.RefreshTokenReq) (res *dto.RefreshTokenRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.OauthService.RefreshToken(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncAccountRelation 同步账户关系(自动分页获取所有数据)
|
|
||||||
func (c *oauthController) SyncAccountRelation(ctx context.Context, req *dto.SyncAccountRelationReq) (res *dto.SyncAccountRelationRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.AccountRelationService.SyncAll(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAccountRelation 获取所有账户关系
|
|
||||||
func (c *oauthController) ListAccountRelation(ctx context.Context, req *dto.ListAccountRelationReq) (res *dto.ListAccountRelationRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
|
|
||||||
list, err := service.AccountRelationService.ListAll(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换为DTO
|
|
||||||
items := make([]dto.AccountRelationItem, 0, len(list))
|
|
||||||
for _, item := range list {
|
|
||||||
items = append(items, dto.AccountRelationItem{
|
|
||||||
ID: item.Id,
|
|
||||||
AccountID: item.AccountID,
|
|
||||||
CorporationName: item.CorporationName,
|
|
||||||
IsAdx: item.IsAdx,
|
|
||||||
IsBid: item.IsBid,
|
|
||||||
IsMp: item.IsMp,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.ListAccountRelationRes{
|
|
||||||
List: items,
|
|
||||||
}
|
|
||||||
return res, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncAudio 同步音乐素材(自动分页获取所有数据)
|
|
||||||
func (c *oauthController) SyncAudio(ctx context.Context, req *dto.SyncAudioReq) (res *dto.SyncAudioRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.AudioService.SyncAll(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAudio 获取所有音乐素材
|
|
||||||
func (c *oauthController) ListAudio(ctx context.Context, req *dto.ListAudioReq) (res []entity.Audio, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.AudioService.ListAll(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncImage 同步图片素材(遍历所有账户,自动分页)
|
|
||||||
func (c *oauthController) SyncImage(ctx context.Context, req *dto.SyncImageReq) (res *dto.SyncImageRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.ImageService.SyncAll(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImage 获取所有图片素材(旧接口,保留兼容)
|
|
||||||
func (c *oauthController) ListImage(ctx context.Context, req *dto.ListImageReq) (res []entity.Image, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.ImageService.ListAll(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImagePage 分页查询图片素材(支持时间过滤)
|
|
||||||
func (c *oauthController) ListImagePage(ctx context.Context, req *dto.ListImagePageReq) (res *dto.ListImageRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 转换请求参数为Service层使用的类型
|
|
||||||
queryReq := &dto.ListImageQueryReq{
|
|
||||||
Page: req.Page,
|
|
||||||
PageSize: req.PageSize,
|
|
||||||
AccountId: req.AccountId,
|
|
||||||
StartTime: req.StartTime,
|
|
||||||
EndTime: req.EndTime,
|
|
||||||
Status: req.Status,
|
|
||||||
}
|
|
||||||
return service.ImageService.ListWithPage(ctx, queryReq)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncVideo 同步视频素材(遍历所有账户,自动分页)
|
|
||||||
func (c *oauthController) SyncVideo(ctx context.Context, req *dto.SyncVideoReq) (res *dto.SyncVideoRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.VideoService.SyncAll(ctx, req)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideo 获取所有视频素材(旧接口,保留兼容)
|
|
||||||
func (c *oauthController) ListVideo(ctx context.Context, req *dto.ListVideoReq) (res []entity.Video, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
return service.VideoService.ListAll(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideoPage 分页查询视频素材(支持时间过滤)
|
|
||||||
func (c *oauthController) ListVideoPage(ctx context.Context, req *dto.ListVideoPageReq) (res *dto.ListVideoRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 转换请求参数为Service层使用的类型
|
|
||||||
queryReq := &dto.ListVideoQueryReq{
|
|
||||||
Page: req.Page,
|
|
||||||
PageSize: req.PageSize,
|
|
||||||
AccountId: req.AccountId,
|
|
||||||
StartTime: req.StartTime,
|
|
||||||
EndTime: req.EndTime,
|
|
||||||
Status: req.Status,
|
|
||||||
}
|
|
||||||
return service.VideoService.ListWithPage(ctx, queryReq)
|
|
||||||
}
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CidAccountReportDetail = new(cidAccountReportDetailDao)
|
|
||||||
|
|
||||||
type cidAccountReportDetailDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告数据报表详情
|
|
||||||
func (d *cidAccountReportDetailDao) Insert(ctx context.Context, req *dto.CidAccountReportDetailItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CidAccountReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CidAccountReportDetailTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告数据报表详情(使用 OnConflict 实现幂等性)
|
|
||||||
func (d *cidAccountReportDetailDao) BatchInsert(ctx context.Context, reqs []*dto.CidAccountReportDetailItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CidAccountReportDetail, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CidAccountReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现幂等性
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CidAccountReportDetailTable).
|
|
||||||
Data(entityList).
|
|
||||||
OnConflict(
|
|
||||||
"report_date_str",
|
|
||||||
"page_number",
|
|
||||||
"campaign_id",
|
|
||||||
"creative_id",
|
|
||||||
).
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Warnf("批量插入失败,尝试逐条插入: %v", err)
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteByDateRange 按日期范围删除数据(用于补偿前去重)
|
|
||||||
func (d *cidAccountReportDetailDao) DeleteByDateRange(ctx context.Context, advertiserID int64, startDateStr, endDateStr string) (int64, error) {
|
|
||||||
cols := (&entity.CidAccountReportDetail{}).GetCols()
|
|
||||||
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.CidAccountReportDetailTable).
|
|
||||||
Where(cols.ReportDateStr+" >= ? AND "+cols.ReportDateStr+" <= ?", startDateStr, endDateStr).
|
|
||||||
Delete()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
return affected, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsertInTx 在事务中批量插入
|
|
||||||
func (d *cidAccountReportDetailDao) BatchInsertInTx(ctx context.Context, tx interface{}, reqs []*dto.CidAccountReportDetailItem) (successCount int64, failCount int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CidAccountReportDetail, 0, len(batch))
|
|
||||||
|
|
||||||
for _, req := range batch {
|
|
||||||
var entityData entity.CidAccountReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
logrus.Errorf("数据转换失败: %v", err)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList = append(entityList, &entityData)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, txErr := gfdb.DB(ctx).Model(ctx, consts.CidAccountReportDetailTable).Data(entityList).Insert()
|
|
||||||
if txErr != nil {
|
|
||||||
logrus.Errorf("批量插入失败 batch[%d:%d]: %v", i, end, txErr)
|
|
||||||
failCount += int64(len(entityList))
|
|
||||||
err = txErr
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, err
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CidAccountReportSum = new(CidAccountReportSumDao)
|
|
||||||
|
|
||||||
type CidAccountReportSumDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告数据报表汇总
|
|
||||||
func (d *CidAccountReportSumDao) Insert(ctx context.Context, req *dto.CidAccountReportSumItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CidAccountReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CidAccountReportSumTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告数据报表汇总(使用 OnConflict 实现幂等性)
|
|
||||||
func (d *CidAccountReportSumDao) BatchInsert(ctx context.Context, reqs []*dto.CidAccountReportSumItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CidAccountReportSum, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CidAccountReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现幂等性
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CidAccountReportSumTable).
|
|
||||||
Data(entityList).
|
|
||||||
OnConflict(
|
|
||||||
"report_date_str",
|
|
||||||
"page_number",
|
|
||||||
"campaign_id",
|
|
||||||
"creative_id",
|
|
||||||
).
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Warnf("批量插入失败,尝试逐条插入: %v", err)
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteByDateRange 按日期范围删除数据(用于补偿前去重)
|
|
||||||
func (d *CidAccountReportSumDao) DeleteByDateRange(ctx context.Context, advertiserID int64, startDateStr, endDateStr string) (int64, error) {
|
|
||||||
cols := (&entity.CidAccountReportSum{}).GetCols()
|
|
||||||
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.CidAccountReportSumTable).
|
|
||||||
Where(cols.ReportDateStr+" >= ? AND "+cols.ReportDateStr+" <= ?", startDateStr, endDateStr).
|
|
||||||
Delete()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
return affected, nil
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CampaignReportDetail = new(CampaignReportDetailDao)
|
|
||||||
|
|
||||||
type CampaignReportDetailDao struct{}
|
|
||||||
|
|
||||||
func (d *CampaignReportDetailDao) Insert(ctx context.Context, req *dto.CampaignReportDetailItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CampaignReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CampaignReportDetailTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *CampaignReportDetailDao) BatchInsert(ctx context.Context, reqs []*dto.CampaignReportDetailItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CampaignReportDetail, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CampaignReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CampaignReportDetailTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CampaignReportSum = new(CampaignReportSumDao)
|
|
||||||
|
|
||||||
type CampaignReportSumDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告计划效果指标表
|
|
||||||
func (d *CampaignReportSumDao) Insert(ctx context.Context, req *dto.CampaignReportSumItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CampaignReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CampaignReportSumTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告计划效果指标表
|
|
||||||
func (d *CampaignReportSumDao) BatchInsert(ctx context.Context, reqs []*dto.CampaignReportSumItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CampaignReportSum, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CampaignReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CampaignReportSumTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CreativeReportDetail = new(CreativeReportDetailDao)
|
|
||||||
|
|
||||||
type CreativeReportDetailDao struct{}
|
|
||||||
|
|
||||||
func (d *CreativeReportDetailDao) Insert(ctx context.Context, req *dto.CreativeReportDetailItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CreativeReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CreativeReportDetailTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *CreativeReportDetailDao) BatchInsert(ctx context.Context, reqs []*dto.CreativeReportDetailItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CreativeReportDetail, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CreativeReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CreativeReportDetailTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CreativeReportSum = new(CreativeReportSumDao)
|
|
||||||
|
|
||||||
type CreativeReportSumDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告效果指标表
|
|
||||||
func (d *CreativeReportSumDao) Insert(ctx context.Context, req *dto.CreativeReportSumItem) (id int64, err error) {
|
|
||||||
var entityData *entity.CreativeReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.CreativeReportSumTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告效果指标表
|
|
||||||
func (d *CreativeReportSumDao) BatchInsert(ctx context.Context, reqs []*dto.CreativeReportSumItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.CreativeReportSum, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.CreativeReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.CreativeReportSumTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var MaterialReport = new(materialReportDao)
|
|
||||||
|
|
||||||
type materialReportDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入素材报表数据
|
|
||||||
func (d *materialReportDao) Insert(ctx context.Context, req *dto.MaterialReportItem) (id int64, err error) {
|
|
||||||
var entityData *entity.MaterialReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.MaterialReportTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入素材报表数据
|
|
||||||
func (d *materialReportDao) BatchInsert(ctx context.Context, reqs []*dto.MaterialReportItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.MaterialReport, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.MaterialReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.MaterialReportTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 查询素材报表数据列表
|
|
||||||
func (d *materialReportDao) List(ctx context.Context, req *dto.ListMaterialReportReq) ([]*entity.MaterialReport, int, error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.MaterialReportTable).Model
|
|
||||||
|
|
||||||
if req.ReportDateStr != "" {
|
|
||||||
model = model.Where("report_date_str", req.ReportDateStr)
|
|
||||||
}
|
|
||||||
if req.PhotoId != "" {
|
|
||||||
model = model.Where("photo_id", req.PhotoId)
|
|
||||||
}
|
|
||||||
if req.CampaignId != nil {
|
|
||||||
model = model.Where("campaign_id", req.CampaignId)
|
|
||||||
}
|
|
||||||
if req.UnitId != nil {
|
|
||||||
model = model.Where("unit_id", req.UnitId)
|
|
||||||
}
|
|
||||||
if req.CreativeId != nil {
|
|
||||||
model = model.Where("creative_id", req.CreativeId)
|
|
||||||
}
|
|
||||||
if req.Keyword != "" {
|
|
||||||
model = model.Where("(photo_name LIKE ? OR campaign_name LIKE ? OR unit_name LIKE ? OR creative_name LIKE ?)",
|
|
||||||
"%"+req.Keyword+"%", "%"+req.Keyword+"%", "%"+req.Keyword+"%", "%"+req.Keyword+"%")
|
|
||||||
}
|
|
||||||
|
|
||||||
model = model.OrderDesc("created_at")
|
|
||||||
|
|
||||||
total, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var list []*entity.MaterialReport
|
|
||||||
if req.Page != nil {
|
|
||||||
err = model.Page(int(req.Page.PageNum), int(req.Page.PageSize)).Scan(&list)
|
|
||||||
} else {
|
|
||||||
err = model.Scan(&list)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return list, total, nil
|
|
||||||
}
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var PopulationReport = new(populationReportDao)
|
|
||||||
|
|
||||||
type populationReportDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入人群报表数据
|
|
||||||
func (d *populationReportDao) Insert(ctx context.Context, req *dto.PopulationReportItem) (id int64, err error) {
|
|
||||||
var entityData *entity.PopulationReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.PopulationReportTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入人群报表数据
|
|
||||||
func (d *populationReportDao) BatchInsert(ctx context.Context, reqs []*dto.PopulationReportItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.PopulationReport, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.PopulationReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.PopulationReportTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 查询人群报表数据列表
|
|
||||||
func (d *populationReportDao) List(ctx context.Context, req *dto.ListPopulationReportReq) ([]*entity.PopulationReport, int, error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.PopulationReportTable).Model
|
|
||||||
|
|
||||||
// 构建查询条件
|
|
||||||
if req.ReportDateStr != "" {
|
|
||||||
model = model.Where("report_date_str", req.ReportDateStr)
|
|
||||||
}
|
|
||||||
if req.PhotoId != "" {
|
|
||||||
model = model.Where("photo_id", req.PhotoId)
|
|
||||||
}
|
|
||||||
if req.Keyword != "" {
|
|
||||||
model = model.Where("photo_name LIKE ?", "%"+req.Keyword+"%")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置排序
|
|
||||||
model = model.OrderDesc("created_at")
|
|
||||||
|
|
||||||
// 分页查询并获取总数
|
|
||||||
total, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var list []*entity.PopulationReport
|
|
||||||
if req.Page != nil {
|
|
||||||
err = model.Page(int(req.Page.PageNum), int(req.Page.PageSize)).Scan(&list)
|
|
||||||
} else {
|
|
||||||
err = model.Scan(&list)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return list, total, nil
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var StorewideReportDetail = new(StorewideReportDetailDao)
|
|
||||||
|
|
||||||
type StorewideReportDetailDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告效果指标表
|
|
||||||
func (d *StorewideReportDetailDao) Insert(ctx context.Context, req *dto.StorewideReportDetailItem) (id int64, err error) {
|
|
||||||
var entityData *entity.StorewideReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.StorewideReportDetailTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告效果指标表
|
|
||||||
func (d *StorewideReportDetailDao) BatchInsert(ctx context.Context, reqs []*dto.StorewideReportDetailItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.StorewideReportDetail, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.StorewideReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.StorewideReportDetailTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var StorewideReportSum = new(StorewideReportSumDao)
|
|
||||||
|
|
||||||
type StorewideReportSumDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告效果指标表
|
|
||||||
func (d *StorewideReportSumDao) Insert(ctx context.Context, req *dto.StorewideReportSumItem) (id int64, err error) {
|
|
||||||
var entityData *entity.StorewideReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.StorewideReportSumTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告效果指标表
|
|
||||||
func (d *StorewideReportSumDao) BatchInsert(ctx context.Context, reqs []*dto.StorewideReportSumItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.StorewideReportSum, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.StorewideReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.StorewideReportSumTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -28,6 +28,8 @@ func (d *SyncTaskLogDao) Create(ctx context.Context, req *dto.CreateSyncTaskLogR
|
|||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"task_id": req.TaskID,
|
"task_id": req.TaskID,
|
||||||
"task_type": req.TaskType,
|
"task_type": req.TaskType,
|
||||||
|
"platform_code": req.PlatformCode,
|
||||||
|
"interface_code": req.InterfaceCode,
|
||||||
"advertiser_id": req.AdvertiserID,
|
"advertiser_id": req.AdvertiserID,
|
||||||
"start_time": req.StartTime,
|
"start_time": req.StartTime,
|
||||||
"end_time": req.EndTime,
|
"end_time": req.EndTime,
|
||||||
|
|||||||
@@ -1,124 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var TaskReport = new(taskReportDao)
|
|
||||||
|
|
||||||
type taskReportDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入调控任务数据
|
|
||||||
func (d *taskReportDao) Insert(ctx context.Context, req *dto.TaskReportItem) (id int64, err error) {
|
|
||||||
var entityData *entity.TaskReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.TaskReportTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入调控任务数据
|
|
||||||
func (d *taskReportDao) BatchInsert(ctx context.Context, reqs []*dto.TaskReportItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分批处理,每批 100 条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.TaskReport, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.TaskReport
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行批量插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TaskReportTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
// 批量插入失败,尝试逐条插入
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 查询调控任务数据列表
|
|
||||||
func (d *taskReportDao) List(ctx context.Context, req *dto.ListTaskReportReq) ([]*entity.TaskReport, int, error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.TaskReportTable).Model
|
|
||||||
|
|
||||||
// 构建查询条件
|
|
||||||
if req.ReportDateStr != "" {
|
|
||||||
model = model.Where("report_date_str", req.ReportDateStr)
|
|
||||||
}
|
|
||||||
if req.PhotoId != "" {
|
|
||||||
model = model.Where("photo_id", req.PhotoId)
|
|
||||||
}
|
|
||||||
if req.Keyword != "" {
|
|
||||||
model = model.Where("photo_name LIKE ?", "%"+req.Keyword+"%")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置排序
|
|
||||||
model = model.OrderDesc("created_at")
|
|
||||||
|
|
||||||
// 分页查询并获取总数
|
|
||||||
total, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var list []*entity.TaskReport
|
|
||||||
if req.Page != nil {
|
|
||||||
err = model.Page(int(req.Page.PageNum), int(req.Page.PageSize)).Scan(&list)
|
|
||||||
} else {
|
|
||||||
err = model.Scan(&list)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return list, total, nil
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var UnitReportDetail = new(UnitReportDetailDao)
|
|
||||||
|
|
||||||
type UnitReportDetailDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告效果指标详情
|
|
||||||
func (d *UnitReportDetailDao) Insert(ctx context.Context, req *dto.UnitReportDetailItem) (id int64, err error) {
|
|
||||||
var entityData *entity.UnitReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.UnitReportDetailTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告效果指标详情
|
|
||||||
func (d *UnitReportDetailDao) BatchInsert(ctx context.Context, reqs []*dto.UnitReportDetailItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.UnitReportDetail, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.UnitReportDetail
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.UnitReportDetailTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var UnitReportSum = new(UnitReportSumDao)
|
|
||||||
|
|
||||||
type UnitReportSumDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入广告效果指标
|
|
||||||
func (d *UnitReportSumDao) Insert(ctx context.Context, req *dto.UnitReportSumItem) (id int64, err error) {
|
|
||||||
var entityData *entity.UnitReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.UnitReportSumTable).Data(&entityData).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchInsert 批量插入广告效果指标
|
|
||||||
func (d *UnitReportSumDao) BatchInsert(ctx context.Context, reqs []*dto.UnitReportSumItem) (successCount int64, failCount int64, failedIndexes []int64, err error) {
|
|
||||||
if len(reqs) == 0 {
|
|
||||||
return 0, 0, nil, errors.New("批量插入数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
failCount = 0
|
|
||||||
failedIndexes = make([]int64, 0)
|
|
||||||
|
|
||||||
for i := 0; i < len(reqs); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(reqs) {
|
|
||||||
end = len(reqs)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := reqs[i:end]
|
|
||||||
entityList := make([]*entity.UnitReportSum, len(batch))
|
|
||||||
|
|
||||||
for j, req := range batch {
|
|
||||||
var entityData entity.UnitReportSum
|
|
||||||
if err = gconv.Struct(req, &entityData); err != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+j))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
entityList[j] = &entityData
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(entityList) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.UnitReportSumTable).Data(entityList).Insert()
|
|
||||||
if err != nil {
|
|
||||||
for k := range batch {
|
|
||||||
_, singleErr := d.Insert(ctx, batch[k])
|
|
||||||
if singleErr != nil {
|
|
||||||
failCount++
|
|
||||||
failedIndexes = append(failedIndexes, int64(i+k))
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
successCount += int64(len(entityList))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return successCount, failCount, failedIndexes, nil
|
|
||||||
}
|
|
||||||
@@ -1,274 +0,0 @@
|
|||||||
package dict
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
dto "dataengine/model/dto/dict"
|
|
||||||
entity "dataengine/model/entity/dict"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/database/gdb"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
"github.com/gogf/gf/v2/util/gconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
var FieldMappingConfig = new(fieldMappingConfigDao)
|
|
||||||
|
|
||||||
type fieldMappingConfigDao struct{}
|
|
||||||
|
|
||||||
// Insert 插入字段映射配置
|
|
||||||
func (d *fieldMappingConfigDao) Insert(ctx context.Context, req *dto.CreateFieldMappingConfigReq) (id int64, err error) {
|
|
||||||
var config entity.FieldMappingConfig
|
|
||||||
if err = gconv.Struct(req, &config); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
now := time.Now()
|
|
||||||
config.CreatedTime = now
|
|
||||||
config.UpdatedTime = now
|
|
||||||
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).Data(&config).Insert()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.LastInsertId()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update 更新字段映射配置
|
|
||||||
func (d *fieldMappingConfigDao) Update(ctx context.Context, req *dto.UpdateFieldMappingConfigReq) (rows int64, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).Data(&req).OmitEmpty().Where(entity.FieldMappingConfigCol.Id, req.Id).Update()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.RowsAffected()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete 删除字段映射配置
|
|
||||||
func (d *fieldMappingConfigDao) Delete(ctx context.Context, req *dto.DeleteFieldMappingConfigReq) (rows int64, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.Id, req.Id).
|
|
||||||
Delete()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.RowsAffected()
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetOne 获取单个字段映射配置
|
|
||||||
func (d *fieldMappingConfigDao) GetOne(ctx context.Context, req *dto.GetFieldMappingConfigReq) (res *entity.FieldMappingConfig, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.Id, req.Id).
|
|
||||||
One()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Struct(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Count 获取字段映射配置数量
|
|
||||||
func (d *fieldMappingConfigDao) Count(ctx context.Context, req *dto.ListFieldMappingConfigReq) (count int, err error) {
|
|
||||||
return d.buildListFilter(ctx, req).Count()
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 获取字段映射配置列表
|
|
||||||
func (d *fieldMappingConfigDao) List(ctx context.Context, req *dto.ListFieldMappingConfigReq) (res []entity.FieldMappingConfig, total int, err error) {
|
|
||||||
model := d.buildListFilter(ctx, req)
|
|
||||||
model.OrderDesc(entity.FieldMappingConfigCol.CreatedTime)
|
|
||||||
|
|
||||||
if req.Page != nil {
|
|
||||||
model.Page(int(req.Page.PageNum), int(req.Page.PageSize))
|
|
||||||
}
|
|
||||||
|
|
||||||
r, total, err := model.AllAndCount(false)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Structs(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// buildListFilter 构建列表查询的过滤条件
|
|
||||||
func (d *fieldMappingConfigDao) buildListFilter(ctx context.Context, req *dto.ListFieldMappingConfigReq) *gdb.Model {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).Model
|
|
||||||
|
|
||||||
if !g.IsEmpty(req.Keyword) {
|
|
||||||
model.WhereLike(entity.FieldMappingConfigCol.ConfigName, "%"+req.Keyword+"%").
|
|
||||||
WhereOrLike(entity.FieldMappingConfigCol.SourceFieldDesc, "%"+req.Keyword+"%").
|
|
||||||
WhereOrLike(entity.FieldMappingConfigCol.TargetFieldDesc, "%"+req.Keyword+"%")
|
|
||||||
}
|
|
||||||
|
|
||||||
if !g.IsEmpty(req.ConfigName) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.ConfigName, req.ConfigName)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.VendorName) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.VendorName, req.VendorName)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.ApiName) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.ApiName, req.ApiName)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.ApiVersion) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.ApiVersion, req.ApiVersion)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.SourceField) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.SourceField, req.SourceField)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.TargetField) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.TargetField, req.TargetField)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.TransformType) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.TransformType, req.TransformType)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.BusinessDomain) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.BusinessDomain, req.BusinessDomain)
|
|
||||||
}
|
|
||||||
if !g.IsEmpty(req.FieldGroup) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.FieldGroup, req.FieldGroup)
|
|
||||||
}
|
|
||||||
if req.IsActive != nil {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.IsActive, *req.IsActive)
|
|
||||||
}
|
|
||||||
|
|
||||||
model.OmitEmptyWhere()
|
|
||||||
return model
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus 更新配置状态
|
|
||||||
func (d *fieldMappingConfigDao) UpdateStatus(ctx context.Context, id int64, isActive bool) (rows int64, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Data(g.Map{
|
|
||||||
"is_active": isActive,
|
|
||||||
"updated_time": time.Now(),
|
|
||||||
}).
|
|
||||||
Where(entity.FieldMappingConfigCol.Id, id).
|
|
||||||
Update()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.RowsAffected()
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetByIds 根据ID列表获取配置列表
|
|
||||||
func (d *fieldMappingConfigDao) GetByIds(ctx context.Context, ids []int64) (res []entity.FieldMappingConfig, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
WhereIn(entity.FieldMappingConfigCol.Id, ids).
|
|
||||||
All()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Structs(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetByVendorAndApi 根据厂商和接口获取字段映射配置
|
|
||||||
func (d *fieldMappingConfigDao) GetByVendorAndApi(ctx context.Context, vendorName, apiName, apiVersion string, isActive *bool) (res []*entity.FieldMappingConfig, err error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.VendorName, vendorName).
|
|
||||||
Where(entity.FieldMappingConfigCol.ApiName, apiName)
|
|
||||||
|
|
||||||
if !g.IsEmpty(apiVersion) {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.ApiVersion, apiVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
if isActive != nil {
|
|
||||||
model.Where(entity.FieldMappingConfigCol.IsActive, *isActive)
|
|
||||||
}
|
|
||||||
|
|
||||||
model.OrderDesc(entity.FieldMappingConfigCol.Priority).
|
|
||||||
OrderAsc(entity.FieldMappingConfigCol.Id)
|
|
||||||
|
|
||||||
r, err := model.All()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Structs(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// CheckDuplicate 检查重复配置
|
|
||||||
func (d *fieldMappingConfigDao) CheckDuplicate(ctx context.Context, vendorName, apiName, sourceField, targetField string, excludeId int64) (exists bool, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.VendorName, vendorName).
|
|
||||||
Where(entity.FieldMappingConfigCol.ApiName, apiName).
|
|
||||||
Where(entity.FieldMappingConfigCol.SourceField, sourceField).
|
|
||||||
Where(entity.FieldMappingConfigCol.TargetField, targetField)
|
|
||||||
|
|
||||||
if excludeId > 0 {
|
|
||||||
model.WhereNot(entity.FieldMappingConfigCol.Id, excludeId)
|
|
||||||
}
|
|
||||||
|
|
||||||
count, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
exists = count > 0
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetActiveConfigsByBusinessDomain 根据业务域获取启用的配置
|
|
||||||
func (d *fieldMappingConfigDao) GetActiveConfigsByBusinessDomain(ctx context.Context, businessDomain string) (res []entity.FieldMappingConfig, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.BusinessDomain, businessDomain).
|
|
||||||
Where(entity.FieldMappingConfigCol.IsActive, true).
|
|
||||||
OrderDesc(entity.FieldMappingConfigCol.Priority).
|
|
||||||
OrderAsc(entity.FieldMappingConfigCol.Id).
|
|
||||||
All()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Structs(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFieldGroupsByVendorApi 获取指定厂商接口的字段分组
|
|
||||||
func (d *fieldMappingConfigDao) GetFieldGroupsByVendorApi(ctx context.Context, vendorName, apiName string) (groups []string, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Fields(entity.FieldMappingConfigCol.FieldGroup).
|
|
||||||
Where(entity.FieldMappingConfigCol.VendorName, vendorName).
|
|
||||||
Where(entity.FieldMappingConfigCol.ApiName, apiName).
|
|
||||||
Where(entity.FieldMappingConfigCol.IsActive, true).
|
|
||||||
Group(entity.FieldMappingConfigCol.FieldGroup).
|
|
||||||
All()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, record := range r {
|
|
||||||
group := record.Map()[entity.FieldMappingConfigCol.FieldGroup]
|
|
||||||
if groupStr, ok := group.(string); ok && groupStr != "" {
|
|
||||||
groups = append(groups, groupStr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteExpiredConfigs 删除已过期的配置
|
|
||||||
func (d *fieldMappingConfigDao) DeleteExpiredConfigs(ctx context.Context) (rows int64, err error) {
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where("expiry_date IS NOT NULL AND expiry_date < ?", time.Now()).
|
|
||||||
Delete()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return r.RowsAffected()
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetConfigsEffectiveNow 获取当前生效的配置
|
|
||||||
func (d *fieldMappingConfigDao) GetConfigsEffectiveNow(ctx context.Context) (res []entity.FieldMappingConfig, err error) {
|
|
||||||
now := time.Now()
|
|
||||||
r, err := gfdb.DB(ctx).Model(ctx, consts.FieldMappingConfigTable).
|
|
||||||
Where(entity.FieldMappingConfigCol.IsActive, true).
|
|
||||||
Where("(effective_date IS NULL OR effective_date <= ?)", now).
|
|
||||||
Where("(expiry_date IS NULL OR expiry_date > ?)", now).
|
|
||||||
OrderDesc(entity.FieldMappingConfigCol.Priority).
|
|
||||||
OrderAsc(entity.FieldMappingConfigCol.Id).
|
|
||||||
All()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = r.Structs(&res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
entity "dataengine/model/entity/tencent"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
type accountRelationDao struct{}
|
|
||||||
|
|
||||||
var AccountRelation = new(accountRelationDao)
|
|
||||||
|
|
||||||
// Upsert 插入或更新账户关系(根据account_id判断)
|
|
||||||
func (d *accountRelationDao) Upsert(ctx context.Context, item *entity.AccountRelation) error {
|
|
||||||
now := time.Now()
|
|
||||||
|
|
||||||
// 检查是否已存在
|
|
||||||
var existing entity.AccountRelation
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentAccountRelationTable).
|
|
||||||
Where("tenant_id", item.TenantId).
|
|
||||||
Where(entity.AccountRelationCols.AccountID, item.AccountID).
|
|
||||||
WhereNull(entity.AccountRelationCols.DeletedAt).
|
|
||||||
Scan(&existing)
|
|
||||||
|
|
||||||
// Scan找不到记录时err不为nil,但这是正常情况,需要继续执行插入
|
|
||||||
if err != nil && existing.Id == 0 {
|
|
||||||
// 记录不存在,执行插入
|
|
||||||
item.CreatedAt = &now
|
|
||||||
item.UpdatedAt = &now
|
|
||||||
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentAccountRelationTable).
|
|
||||||
Data(item).
|
|
||||||
Insert()
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录存在,执行更新
|
|
||||||
item.UpdatedAt = &now
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentAccountRelationTable).
|
|
||||||
Where("id", existing.Id).
|
|
||||||
Data(g.Map{
|
|
||||||
entity.AccountRelationCols.CorporationName: item.CorporationName,
|
|
||||||
entity.AccountRelationCols.CommentDataList: item.CommentDataList,
|
|
||||||
entity.AccountRelationCols.IsAdx: item.IsAdx,
|
|
||||||
entity.AccountRelationCols.IsBid: item.IsBid,
|
|
||||||
entity.AccountRelationCols.IsMp: item.IsMp,
|
|
||||||
entity.AccountRelationCols.UpdatedAt: now,
|
|
||||||
}).
|
|
||||||
Update()
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchUpsert 批量插入或更新(使用 OnConflict 实现 Upsert)
|
|
||||||
func (d *accountRelationDao) BatchUpsert(ctx context.Context, items []*entity.AccountRelation) (successCount int, err error) {
|
|
||||||
if len(items) == 0 {
|
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("开始批量Upsert: %d 条记录", len(items))
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
|
|
||||||
for i := 0; i < len(items); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(items) {
|
|
||||||
end = len(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := items[i:end]
|
|
||||||
|
|
||||||
logrus.Infof("处理第 %d-%d 条记录", i+1, end)
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现 Upsert
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.TencentAccountRelationTable).
|
|
||||||
Data(batch).
|
|
||||||
OnConflict(entity.AccountRelationCols.AccountID).
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("批量Upsert失败: %v,尝试逐条处理", err)
|
|
||||||
// 批量失败,逐条处理
|
|
||||||
for _, item := range batch {
|
|
||||||
if upsertErr := d.Upsert(ctx, item); upsertErr != nil {
|
|
||||||
logrus.Errorf("逐条Upsert失败: account_id=%d, err=%v", item.AccountID, upsertErr)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
successCount += int(affected)
|
|
||||||
logrus.Infof("批量Upsert成功: 影响 %d 条记录", affected)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("批量Upsert完成: 成功 %d 条", successCount)
|
|
||||||
return successCount, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAll 获取所有账户关系
|
|
||||||
func (d *accountRelationDao) ListAll(ctx context.Context) ([]entity.AccountRelation, error) {
|
|
||||||
var list []entity.AccountRelation
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentAccountRelationTable).
|
|
||||||
WhereNull(entity.AccountRelationCols.DeletedAt).
|
|
||||||
OrderAsc(entity.AccountRelationCols.AccountID).
|
|
||||||
Scan(&list)
|
|
||||||
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
entity "dataengine/model/entity/tencent"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
type audioDao struct{}
|
|
||||||
|
|
||||||
var Audio = new(audioDao)
|
|
||||||
|
|
||||||
// BatchUpsert 批量插入或更新(使用 OnConflict 实现 Upsert)
|
|
||||||
func (d *audioDao) BatchUpsert(ctx context.Context, items []*entity.Audio) (successCount int, err error) {
|
|
||||||
if len(items) == 0 {
|
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("开始批量Upsert音乐素材: %d 条记录", len(items))
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
|
|
||||||
for i := 0; i < len(items); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(items) {
|
|
||||||
end = len(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := items[i:end]
|
|
||||||
|
|
||||||
logrus.Infof("处理第 %d-%d 条音乐素材记录", i+1, end)
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现 Upsert
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.TencentAudioTable).
|
|
||||||
Data(batch).
|
|
||||||
OnConflict(entity.AudioCols.AudioId).
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("批量Upsert音乐素材失败: %v,尝试逐条处理", err)
|
|
||||||
// 批量失败,逐条处理
|
|
||||||
for _, item := range batch {
|
|
||||||
if upsertErr := d.upsertSingle(ctx, item); upsertErr != nil {
|
|
||||||
logrus.Errorf("逐条Upsert音乐素材失败: audio_id=%s, err=%v", item.AudioId, upsertErr)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
successCount += int(affected)
|
|
||||||
logrus.Infof("批量Upsert音乐素材成功: 影响 %d 条记录", affected)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("批量Upsert音乐素材完成: 成功 %d 条", successCount)
|
|
||||||
return successCount, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// upsertSingle 单条插入或更新
|
|
||||||
func (d *audioDao) upsertSingle(ctx context.Context, item *entity.Audio) error {
|
|
||||||
var existing entity.Audio
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentAudioTable).
|
|
||||||
Where("tenant_id", item.TenantId).
|
|
||||||
Where(entity.AudioCols.AudioId, item.AudioId).
|
|
||||||
WhereNull(entity.AudioCols.DeletedAt).
|
|
||||||
Scan(&existing)
|
|
||||||
|
|
||||||
if err != nil && existing.Id == 0 {
|
|
||||||
// 记录不存在,执行插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentAudioTable).
|
|
||||||
Data(item).
|
|
||||||
Insert()
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录存在,执行更新
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentAudioTable).
|
|
||||||
Where("id", existing.Id).
|
|
||||||
Data(g.Map{
|
|
||||||
entity.AudioCols.CoverImageUrl: item.CoverImageUrl,
|
|
||||||
entity.AudioCols.AudioName: item.AudioName,
|
|
||||||
entity.AudioCols.Author: item.Author,
|
|
||||||
entity.AudioCols.Duration: item.Duration,
|
|
||||||
entity.AudioCols.ExpireTime: item.ExpireTime,
|
|
||||||
entity.AudioCols.FeelTags: item.FeelTags,
|
|
||||||
entity.AudioCols.GenreTags: item.GenreTags,
|
|
||||||
entity.AudioCols.Updater: item.Updater,
|
|
||||||
entity.AudioCols.UpdatedAt: item.UpdatedAt,
|
|
||||||
}).
|
|
||||||
Update()
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAll 获取所有音乐素材
|
|
||||||
func (d *audioDao) ListAll(ctx context.Context) ([]entity.Audio, error) {
|
|
||||||
var list []entity.Audio
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentAudioTable).
|
|
||||||
WhereNull(entity.AudioCols.DeletedAt).
|
|
||||||
OrderAsc(entity.AudioCols.AudioId).
|
|
||||||
Scan(&list)
|
|
||||||
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
entity "dataengine/model/entity/tencent"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
type imageDao struct{}
|
|
||||||
|
|
||||||
var Image = new(imageDao)
|
|
||||||
|
|
||||||
// BatchUpsert 批量插入或更新(使用 OnConflict 实现 Upsert)
|
|
||||||
func (d *imageDao) BatchUpsert(ctx context.Context, items []*entity.Image) (successCount int, err error) {
|
|
||||||
if len(items) == 0 {
|
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("开始批量Upsert图片素材: %d 条记录", len(items))
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
|
|
||||||
for i := 0; i < len(items); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(items) {
|
|
||||||
end = len(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := items[i:end]
|
|
||||||
|
|
||||||
logrus.Infof("处理第 %d-%d 条图片素材记录", i+1, end)
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现 Upsert
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
Data(batch).
|
|
||||||
OnConflict("(image_id, account_id)").
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("批量Upsert图片素材失败: %v,尝试逐条处理", err)
|
|
||||||
// 批量失败,逐条处理
|
|
||||||
for _, item := range batch {
|
|
||||||
if upsertErr := d.upsertSingle(ctx, item); upsertErr != nil {
|
|
||||||
logrus.Errorf("逐条Upsert图片素材失败: image_id=%s, account_id=%d, err=%v", item.ImageId, item.AccountId, upsertErr)
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
successCount += int(affected)
|
|
||||||
logrus.Infof("批量Upsert图片素材成功: 影响 %d 条记录", affected)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("批量Upsert图片素材完成: 成功 %d 条", successCount)
|
|
||||||
return successCount, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// upsertSingle 单条插入或更新
|
|
||||||
func (d *imageDao) upsertSingle(ctx context.Context, item *entity.Image) error {
|
|
||||||
var existing entity.Image
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
Where(entity.ImageCols.ImageId, item.ImageId).
|
|
||||||
Where(entity.ImageCols.AccountId, item.AccountId).
|
|
||||||
WhereNull("deleted_at").
|
|
||||||
Scan(&existing)
|
|
||||||
|
|
||||||
if err != nil && existing.Id == 0 {
|
|
||||||
// 记录不存在,执行插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
Data(item).
|
|
||||||
Insert()
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录存在,执行更新
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
Where("id", existing.Id).
|
|
||||||
Data(g.Map{
|
|
||||||
entity.ImageCols.Width: item.Width,
|
|
||||||
entity.ImageCols.Height: item.Height,
|
|
||||||
entity.ImageCols.FileSize: item.FileSize,
|
|
||||||
entity.ImageCols.Type: item.Type,
|
|
||||||
entity.ImageCols.Signature: item.Signature,
|
|
||||||
entity.ImageCols.Description: item.Description,
|
|
||||||
entity.ImageCols.PreviewUrl: item.PreviewUrl,
|
|
||||||
entity.ImageCols.ThumbPreviewUrl: item.ThumbPreviewUrl,
|
|
||||||
entity.ImageCols.Status: item.Status,
|
|
||||||
entity.ImageCols.LastModifiedTime: item.LastModifiedTime,
|
|
||||||
}).
|
|
||||||
Update()
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAll 获取所有图片素材
|
|
||||||
func (d *imageDao) ListAll(ctx context.Context) ([]entity.Image, error) {
|
|
||||||
var list []entity.Image
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
WhereNull("deleted_at").
|
|
||||||
OrderAsc(entity.ImageCols.ImageId).
|
|
||||||
Scan(&list)
|
|
||||||
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListWithPage 分页查询图片素材(支持时间过滤)
|
|
||||||
func (d *imageDao) ListWithPage(ctx context.Context, page, pageSize int, accountId *int64, startTime, endTime *int64, status string) ([]entity.Image, int, error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.TencentImageTable).
|
|
||||||
WhereNull("deleted_at")
|
|
||||||
|
|
||||||
// 账户ID过滤
|
|
||||||
if accountId != nil && *accountId > 0 {
|
|
||||||
model = model.Where(entity.ImageCols.AccountId, *accountId)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态过滤
|
|
||||||
if status != "" {
|
|
||||||
model = model.Where(entity.ImageCols.Status, status)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 时间范围过滤(根据 last_modified_time)
|
|
||||||
if startTime != nil && *startTime > 0 {
|
|
||||||
model = model.WhereGTE(entity.ImageCols.LastModifiedTime, *startTime)
|
|
||||||
}
|
|
||||||
if endTime != nil && *endTime > 0 {
|
|
||||||
model = model.WhereLTE(entity.ImageCols.LastModifiedTime, *endTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置排序(按最后修改时间降序)
|
|
||||||
model = model.OrderDesc(entity.ImageCols.LastModifiedTime)
|
|
||||||
|
|
||||||
// 获取总数
|
|
||||||
total, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分页查询
|
|
||||||
var list []entity.Image
|
|
||||||
if page > 0 && pageSize > 0 {
|
|
||||||
err = model.Page(page, pageSize).Scan(&list)
|
|
||||||
} else {
|
|
||||||
err = model.Scan(&list)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return list, total, nil
|
|
||||||
}
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/public"
|
|
||||||
entity "dataengine/model/entity/tencent"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/db/gfdb"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
type videoDao struct{}
|
|
||||||
|
|
||||||
var Video = new(videoDao)
|
|
||||||
|
|
||||||
// BatchUpsert 批量插入或更新(使用 OnConflict 实现 Upsert)
|
|
||||||
func (d *videoDao) BatchUpsert(ctx context.Context, items []*entity.Video) (successCount int, err error) {
|
|
||||||
if len(items) == 0 {
|
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("开始批量Upsert视频素材: %d 条记录", len(items))
|
|
||||||
|
|
||||||
// 分批处理,每批100条
|
|
||||||
batchSize := 100
|
|
||||||
successCount = 0
|
|
||||||
|
|
||||||
for i := 0; i < len(items); i += batchSize {
|
|
||||||
end := i + batchSize
|
|
||||||
if end > len(items) {
|
|
||||||
end = len(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
batch := items[i:end]
|
|
||||||
|
|
||||||
logrus.Infof("处理第 %d-%d 条视频素材记录", i+1, end)
|
|
||||||
|
|
||||||
// 执行批量插入,使用 OnConflict 实现 Upsert
|
|
||||||
result, err := gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
Data(batch).
|
|
||||||
OnConflict("(video_id, account_id)").
|
|
||||||
Save()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("批量Upsert视频素材失败: %v,尝试逐条处理", err)
|
|
||||||
// 批量失败,逐条处理
|
|
||||||
for _, item := range batch {
|
|
||||||
if upsertErr := d.upsertSingle(ctx, item); upsertErr != nil {
|
|
||||||
logrus.Errorf("逐条Upsert视频素材失败: video_id=%s, account_id=%d, err=%v", item.VideoId, item.AccountId, upsertErr)
|
|
||||||
} else {
|
|
||||||
successCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
affected, _ := result.RowsAffected()
|
|
||||||
successCount += int(affected)
|
|
||||||
logrus.Infof("批量Upsert视频素材成功: 影响 %d 条记录", affected)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("批量Upsert视频素材完成: 成功 %d 条", successCount)
|
|
||||||
return successCount, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// upsertSingle 单条插入或更新
|
|
||||||
func (d *videoDao) upsertSingle(ctx context.Context, item *entity.Video) error {
|
|
||||||
var existing entity.Video
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
Where(entity.VideoCols.VideoId, item.VideoId).
|
|
||||||
Where(entity.VideoCols.AccountId, item.AccountId).
|
|
||||||
WhereNull("deleted_at").
|
|
||||||
Scan(&existing)
|
|
||||||
|
|
||||||
if err != nil && existing.Id == 0 {
|
|
||||||
// 记录不存在,执行插入
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
Data(item).
|
|
||||||
Insert()
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录存在,执行更新
|
|
||||||
_, err = gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
Where("id", existing.Id).
|
|
||||||
Data(g.Map{
|
|
||||||
entity.VideoCols.Width: item.Width,
|
|
||||||
entity.VideoCols.Height: item.Height,
|
|
||||||
entity.VideoCols.FileSize: item.FileSize,
|
|
||||||
entity.VideoCols.Type: item.Type,
|
|
||||||
entity.VideoCols.Signature: item.Signature,
|
|
||||||
entity.VideoCols.Description: item.Description,
|
|
||||||
entity.VideoCols.PreviewUrl: item.PreviewUrl,
|
|
||||||
entity.VideoCols.Status: item.Status,
|
|
||||||
entity.VideoCols.LastModifiedTime: item.LastModifiedTime,
|
|
||||||
}).
|
|
||||||
Update()
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAll 获取所有视频素材
|
|
||||||
func (d *videoDao) ListAll(ctx context.Context) ([]entity.Video, error) {
|
|
||||||
var list []entity.Video
|
|
||||||
err := gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
WhereNull("deleted_at").
|
|
||||||
OrderAsc(entity.VideoCols.VideoId).
|
|
||||||
Scan(&list)
|
|
||||||
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListWithPage 分页查询视频素材(支持时间过滤)
|
|
||||||
func (d *videoDao) ListWithPage(ctx context.Context, page, pageSize int, accountId *int64, startTime, endTime *int64, status string) ([]entity.Video, int, error) {
|
|
||||||
model := gfdb.DB(ctx).Model(ctx, consts.TencentVideoTable).
|
|
||||||
WhereNull("deleted_at")
|
|
||||||
|
|
||||||
// 账户ID过滤
|
|
||||||
if accountId != nil && *accountId > 0 {
|
|
||||||
model = model.Where(entity.VideoCols.AccountId, *accountId)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态过滤
|
|
||||||
if status != "" {
|
|
||||||
model = model.Where(entity.VideoCols.Status, status)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 时间范围过滤(根据 last_modified_time)
|
|
||||||
if startTime != nil && *startTime > 0 {
|
|
||||||
model = model.WhereGTE(entity.VideoCols.LastModifiedTime, *startTime)
|
|
||||||
}
|
|
||||||
if endTime != nil && *endTime > 0 {
|
|
||||||
model = model.WhereLTE(entity.VideoCols.LastModifiedTime, *endTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置排序(按最后修改时间降序)
|
|
||||||
model = model.OrderDesc(entity.VideoCols.LastModifiedTime)
|
|
||||||
|
|
||||||
// 获取总数
|
|
||||||
total, err := model.Count()
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分页查询
|
|
||||||
var list []entity.Video
|
|
||||||
if page > 0 && pageSize > 0 {
|
|
||||||
err = model.Page(page, pageSize).Scan(&list)
|
|
||||||
} else {
|
|
||||||
err = model.Scan(&list)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return list, total, nil
|
|
||||||
}
|
|
||||||
-162
@@ -1,162 +0,0 @@
|
|||||||
Write-Host "=== Data Engine K3s Deploy ===" -ForegroundColor Cyan
|
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
Write-Host "`n[1/7] Handle private dependencies..." -ForegroundColor Yellow
|
|
||||||
if (Test-Path "..\common") {
|
|
||||||
Copy-Item -Path "..\common" -Destination ".\common" -Recurse -Force
|
|
||||||
$content = Get-Content go.mod -Raw
|
|
||||||
$content = $content -replace 'replace gitea\.com/red-future/common => \.\./common', 'replace gitea.com/red-future/common => ./common'
|
|
||||||
Set-Content go.mod $content -NoNewline
|
|
||||||
Write-Host "[OK] Dependencies ready" -ForegroundColor Green
|
|
||||||
} else {
|
|
||||||
Write-Host "[ERROR] common directory not found" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not (Test-Path "k8s")) {
|
|
||||||
New-Item -ItemType Directory -Path "k8s" | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`n[2/7] Build Docker image..." -ForegroundColor Yellow
|
|
||||||
docker build -t data-engine:latest .
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Host "[ERROR] Build failed" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
Write-Host "[OK] Image built" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "`n[3/7] Import image to k3s container..." -ForegroundColor Yellow
|
|
||||||
$tarPath = "$PWD\data-engine.tar"
|
|
||||||
Write-Host "Saving image to tar..." -ForegroundColor Cyan
|
|
||||||
docker save -o $tarPath data-engine:latest
|
|
||||||
|
|
||||||
$k3sContainer = "k3s-server"
|
|
||||||
Write-Host "Copying to k3s container..." -ForegroundColor Cyan
|
|
||||||
docker cp $tarPath "${k3sContainer}:/tmp/data-engine.tar"
|
|
||||||
|
|
||||||
Write-Host "Importing in container..." -ForegroundColor Cyan
|
|
||||||
docker exec $k3sContainer ctr -n k8s.io images import /tmp/data-engine.tar
|
|
||||||
|
|
||||||
docker exec $k3sContainer rm /tmp/data-engine.tar
|
|
||||||
Remove-Item $tarPath -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Host "[ERROR] Import failed" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "[OK] Image imported" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "`n[3.5/7] Check and fix metrics-server..." -ForegroundColor Yellow
|
|
||||||
$metricsPod = kubectl -n kube-system get pods -l k8s-app=metrics-server -o jsonpath='{.items[0].metadata.name}' 2>$null
|
|
||||||
if ($metricsPod) {
|
|
||||||
$podStatus = kubectl -n kube-system get pod $metricsPod -o jsonpath='{.status.phase}' 2>$null
|
|
||||||
if ($podStatus -ne "Running") {
|
|
||||||
Write-Host " metrics-server status: $podStatus, attempting to fix..." -ForegroundColor Yellow
|
|
||||||
|
|
||||||
$podDetail = kubectl -n kube-system describe pod $metricsPod 2>&1
|
|
||||||
if ($podDetail -match "ImagePullBackOff|ErrImagePull") {
|
|
||||||
Write-Host " Detected image pull issue, using domestic registry..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
try {
|
|
||||||
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server:v0.6.3 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server:v0.6.3 rancher/mirrored-metrics-server:v0.8.0
|
|
||||||
$msTarPath = "$PWD\metrics-server.tar"
|
|
||||||
docker save -o $msTarPath rancher/mirrored-metrics-server:v0.8.0
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
docker cp $msTarPath "${k3sContainer}:/tmp/metrics-server.tar"
|
|
||||||
docker exec $k3sContainer ctr -n k8s.io images import /tmp/metrics-server.tar
|
|
||||||
docker exec $k3sContainer rm /tmp/metrics-server.tar
|
|
||||||
Remove-Item $msTarPath -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
kubectl -n kube-system delete pod $metricsPod --force --grace-period=0
|
|
||||||
Write-Host " [OK] metrics-server image imported and pod restarted" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Host " [WARN] Failed to import metrics-server image" -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
kubectl -n kube-system delete pod $metricsPod
|
|
||||||
Write-Host " [OK] metrics-server pod restarted" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host " [OK] metrics-server is running" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host " metrics-server not found, deploying..." -ForegroundColor Yellow
|
|
||||||
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml 2>$null
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host " Waiting for metrics-server to be ready..." -ForegroundColor Cyan
|
|
||||||
$retryCount = 0
|
|
||||||
$maxRetries = 40
|
|
||||||
while ($retryCount -lt $maxRetries) {
|
|
||||||
$msPod = kubectl -n kube-system get pods -l k8s-app=metrics-server -o jsonpath='{.items[0].status.phase}' 2>$null
|
|
||||||
$msReady = kubectl -n kube-system get pods -l k8s-app=metrics-server -o jsonpath="{.items[0].status.conditions[?(@.type=='Ready')].status}" 2>$null
|
|
||||||
|
|
||||||
if ($msPod -eq "Running" -and $msReady -eq "True") {
|
|
||||||
Write-Host " [OK] metrics-server is ready" -ForegroundColor Green
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
Start-Sleep -Seconds 5
|
|
||||||
$retryCount++
|
|
||||||
if ($retryCount % 8 -eq 0) {
|
|
||||||
Write-Host " Still waiting... ($retryCount/$maxRetries) - Status: $msPod" -ForegroundColor Gray
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($retryCount -eq $maxRetries) {
|
|
||||||
Write-Host " [WARN] metrics-server may not be ready yet, HPA might not work immediately" -ForegroundColor Yellow
|
|
||||||
Write-Host " Run '.\fix-metrics-server.ps1' manually if needed" -ForegroundColor Gray
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`n[4/7] Deploy to K3s..." -ForegroundColor Yellow
|
|
||||||
kubectl apply -f k8s/configmap.yaml
|
|
||||||
kubectl apply -f k8s/pvc.yaml
|
|
||||||
kubectl apply -f k8s/deployment.yaml
|
|
||||||
kubectl apply -f k8s/service.yaml
|
|
||||||
kubectl apply -f k8s/hpa.yaml
|
|
||||||
Write-Host "[OK] Resources created" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "`n[5/7] Wait for Pod ready..." -ForegroundColor Yellow
|
|
||||||
kubectl wait --for=condition=ready --timeout=180s pod -l app=data-engine
|
|
||||||
Write-Host "[OK] Pod is ready" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "`n[6/7] Status:" -ForegroundColor Yellow
|
|
||||||
kubectl get pods -l app=data-engine
|
|
||||||
kubectl get svc data-engine-service
|
|
||||||
|
|
||||||
Write-Host "`n[7/7] Logs:" -ForegroundColor Yellow
|
|
||||||
kubectl logs -l app=data-engine --tail=50
|
|
||||||
|
|
||||||
Write-Host "`nHPA Status:" -ForegroundColor Cyan
|
|
||||||
try {
|
|
||||||
$hpaExists = kubectl get hpa data-engine-hpa 2>&1
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host $hpaExists -ForegroundColor Green
|
|
||||||
kubectl describe hpa data-engine-hpa | Select-String "Metrics|Conditions" -Context 0,2
|
|
||||||
} else {
|
|
||||||
Write-Host "[WARN] HPA not available yet, please check manually later" -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Host "[WARN] HPA status check failed, please check manually later" -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`n=== Deployment Success ===" -ForegroundColor Green
|
|
||||||
Write-Host "Access: http://<node-ip>:30301" -ForegroundColor Cyan
|
|
||||||
Write-Host "`nCommands:" -ForegroundColor Yellow
|
|
||||||
Write-Host " Logs: kubectl logs -l app=data-engine -f" -ForegroundColor White
|
|
||||||
Write-Host " Status: kubectl get pods -l app=data-engine" -ForegroundColor White
|
|
||||||
Write-Host " HPA: kubectl get hpa data-engine-hpa -w" -ForegroundColor White
|
|
||||||
Write-Host " Delete: kubectl delete -f k8s/" -ForegroundColor White
|
|
||||||
|
|
||||||
Write-Host "`nCleanup..." -ForegroundColor Yellow
|
|
||||||
if (Test-Path ".\common") {
|
|
||||||
Remove-Item -Path ".\common" -Recurse -Force
|
|
||||||
}
|
|
||||||
git checkout go.mod 2>$null
|
|
||||||
Write-Host "[OK] Done" -ForegroundColor Green
|
|
||||||
+363
@@ -0,0 +1,363 @@
|
|||||||
|
# Data Engine 通用数据同步引擎 - 使用文档
|
||||||
|
|
||||||
|
## 一、概述
|
||||||
|
|
||||||
|
本系统是一个**配置驱动的通用数据同步引擎**,核心思想是:**平台管理 + 接口管理**。
|
||||||
|
|
||||||
|
您只需要通过 API 维护好平台和接口的配置信息(认证方式、请求参数、响应解析、目标表结构),系统就会自动:
|
||||||
|
|
||||||
|
1. **创建目标表**(根据 `table_definition` 自动建表)
|
||||||
|
2. **拉取数据**(分页请求、多步骤请求、并发处理)
|
||||||
|
3. **写入数据库**(批量 upsert)
|
||||||
|
4. **增量同步**(通过 `filtering` 按最后修改时间过滤)
|
||||||
|
5. **自动调度**(按配置的时间间隔循环执行)
|
||||||
|
6. **补偿重试**(失败的同步任务自动重试,退避递增)
|
||||||
|
|
||||||
|
**不需要为每个平台写一行业务代码。**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 二、数据库初始化
|
||||||
|
|
||||||
|
### 2.1 核心表
|
||||||
|
|
||||||
|
首次使用需执行 `sql/init_core_tables.sql`,创建以下 4 张表:
|
||||||
|
|
||||||
|
| 表名 | 说明 |
|
||||||
|
|------|------|
|
||||||
|
| `api_datasource_platform` | 数据源平台配置(认证信息、限流等) |
|
||||||
|
| `api_interface` | 接口配置(URL、请求参数、表结构等) |
|
||||||
|
| `sync_task_log` | 同步任务日志(记录状态,用于补偿) |
|
||||||
|
| `sync_tracker` | 同步跟踪(记录每个接口的最后同步时间) |
|
||||||
|
|
||||||
|
### 2.2 初始化数据
|
||||||
|
|
||||||
|
执行 `sql/seed_data.sql` 创建腾讯广告平台+接口配置。如需清空重来:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
ALTER SEQUENCE api_datasource_platform_id_seq RESTART WITH 1;
|
||||||
|
ALTER SEQUENCE api_interface_id_seq RESTART WITH 1;
|
||||||
|
DELETE FROM api_interface;
|
||||||
|
DELETE FROM api_datasource_platform;
|
||||||
|
\i sql/seed_data.sql
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 三、配置说明
|
||||||
|
|
||||||
|
### 3.1 平台管理 (`api_datasource_platform`)
|
||||||
|
|
||||||
|
| 字段 | 说明 | 示例 |
|
||||||
|
|------|------|------|
|
||||||
|
| `platform_code` | 平台编码(唯一) | `tencent` |
|
||||||
|
| `platform_name` | 平台名称 | `腾讯广告` |
|
||||||
|
| `api_base_url` | API 基础地址 | `https://api.e.qq.com/v3.0` |
|
||||||
|
| `auth_type` | 认证类型 | `OAUTH2` / `TOKEN` / `API_KEY` / `BASIC` |
|
||||||
|
| `token` | access_token | `xxxxx` |
|
||||||
|
| `client_id` / `client_secret` | OAuth2 凭证 | `xxxxx` |
|
||||||
|
| `auth_config` | 自定义认证配置(JSONB) | 详见 3.1.1 |
|
||||||
|
|
||||||
|
#### 3.1.1 `auth_config` 字段详解
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"token_in_query": true, // token 放在 URL 查询参数
|
||||||
|
"query_key": "access_token", // 参数名,默认 "access_token"
|
||||||
|
"header_name": "Authorization", // token 放请求头时的头名
|
||||||
|
"header_format": "Bearer {token}",
|
||||||
|
"extra_query_params": { // 额外查询参数
|
||||||
|
"timestamp": "{timestamp}", // {timestamp} 自动替换为当前时间戳
|
||||||
|
"nonce": "{nonce}" // {nonce} 自动替换为随机字符串
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.2 接口管理 (`api_interface`)
|
||||||
|
|
||||||
|
| 字段 | 说明 | 示例 |
|
||||||
|
|------|------|------|
|
||||||
|
| `platform_id` | 所属平台 ID | `1` |
|
||||||
|
| `name` / `code` | 接口名称 / 唯一编码 | `图片素材` / `image` |
|
||||||
|
| `url` | 接口地址(相对路径) | `/images/get` |
|
||||||
|
| `method` | 请求方法 | `GET` / `POST` |
|
||||||
|
| `request_config` | 请求配置(JSONB) | 详见 3.2.1 |
|
||||||
|
| `response_config` | 响应配置(JSONB) | 详见 3.2.2 |
|
||||||
|
| `table_definition` | 表结构定义(JSONB) | 详见 3.3 |
|
||||||
|
|
||||||
|
#### 3.2.1 `request_config` 字段详解
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"parameters_location": "query", // 参数位置: "query"(URL) / "body"(默认)
|
||||||
|
"page": 1,
|
||||||
|
"page_size": 100,
|
||||||
|
"page_param": "page", // 分页参数名(自定义)
|
||||||
|
"page_size_param": "page_size",
|
||||||
|
"time_field": "last_modified_time", // 增量时间字段
|
||||||
|
"fields": ["field1", "field2"], // 请求字段(如音频的 fields)
|
||||||
|
"prefetch": { ... } // 预取配置(见下文)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**`parameters_location` 说明**:
|
||||||
|
- 未设置或 `"body"` → 参数放在 JSON body 中(POST 请求)
|
||||||
|
- `"query"` → 参数放在 URL 查询字符串中(GET 请求用)
|
||||||
|
- 当 `method=GET` 时,即使不设置也默认走 query
|
||||||
|
|
||||||
|
**预取(prefetch)**:某些接口需要"先拿列表→遍历每个元素查数据"(如先拉账户列表,再遍历拉图片)。
|
||||||
|
|
||||||
|
```json
|
||||||
|
"prefetch": {
|
||||||
|
"url": "/advertiser/get", // 预取接口地址
|
||||||
|
"method": "GET",
|
||||||
|
"response_path": "data.list", // 从响应中取值路径
|
||||||
|
"target_param": "account_id", // 注入主请求的参数名
|
||||||
|
"value_field": "account_id" // 从预取结果取哪个字段
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**并发处理**:有 prefetch 的接口会并发处理每个实体,并发数由 `config.yml` 的 `sync.concurrency` 控制。
|
||||||
|
|
||||||
|
**增量同步**:配置了 `time_field` 的接口,增量同步时会自动生成 `filtering` 参数:
|
||||||
|
```json
|
||||||
|
{"field": "last_modified_time", "operator": "GREATER_EQUALS", "values": ["<timestamp>"]}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3.2.2 `response_config` 字段详解
|
||||||
|
|
||||||
|
系统默认解析的响应格式:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{ "code": 0, "message": "success", "data": { "list": [...], "page_info": { "total_page": N } } }
|
||||||
|
```
|
||||||
|
|
||||||
|
可通过 `response_config` 自定义数据路径:
|
||||||
|
```json
|
||||||
|
{ "list_path": "data.list" }
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.3 `table_definition` 字段详解
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"table_name": "tencent_image",
|
||||||
|
"columns": [
|
||||||
|
{ "name": "image_id", "type": "VARCHAR(100)", "comment": "图片ID" },
|
||||||
|
{ "name": "account_id", "type": "BIGINT", "comment": "账户ID" }
|
||||||
|
],
|
||||||
|
"conflict_keys": ["image_id", "account_id"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**自动添加的列**(无需声明):
|
||||||
|
|
||||||
|
| 列名 | 类型 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `id` | BIGSERIAL PRIMARY KEY | 自增主键 |
|
||||||
|
| `tenant_id` | BIGINT | 租户 ID |
|
||||||
|
| `creator` | VARCHAR(64) | 创建人 |
|
||||||
|
| `created_at` | TIMESTAMPTZ | 创建时间 |
|
||||||
|
| `updater` | VARCHAR(64) | 更新人 |
|
||||||
|
| `updated_at` | TIMESTAMPTZ | 更新时间 |
|
||||||
|
| `deleted_at` | TIMESTAMPTZ | 软删除 |
|
||||||
|
| `raw_data` | JSONB | 原始响应数据 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 四、API 接口
|
||||||
|
|
||||||
|
基础地址:`http://localhost:3002`
|
||||||
|
|
||||||
|
### 4.1 平台管理
|
||||||
|
|
||||||
|
| 方法 | 路径 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| POST | `/api/datasourcePlatform/createDatasourcePlatform` | 创建平台 |
|
||||||
|
| GET | `/api/datasourcePlatform/listDatasourcePlatforms` | 列表 |
|
||||||
|
| GET | `/api/datasourcePlatform/getDatasourcePlatform` | 详情 |
|
||||||
|
| GET | `/api/datasourcePlatform/getPlatformByCode` | 按编码查 |
|
||||||
|
| PUT | `/api/datasourcePlatform/updateDatasourcePlatform` | 更新 |
|
||||||
|
| PUT | `/api/datasourcePlatform/updateDatasourcePlatformStatus` | 更新状态 |
|
||||||
|
| DELETE | `/api/datasourcePlatform/deleteDatasourcePlatform` | 删除 |
|
||||||
|
| GET | `/api/datasourcePlatform/getPlatformStatistics` | 统计 |
|
||||||
|
|
||||||
|
### 4.2 接口管理
|
||||||
|
|
||||||
|
| 方法 | 路径 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| POST | `/api/apiInterface/createApiInterface` | 创建接口 |
|
||||||
|
| GET | `/api/apiInterface/listApiInterfaces` | 列表 |
|
||||||
|
| GET | `/api/apiInterface/getApiInterface` | 详情 |
|
||||||
|
| PUT | `/api/apiInterface/updateApiInterface` | 更新 |
|
||||||
|
| PUT | `/api/apiInterface/updateApiInterfaceStatus` | 更新状态 |
|
||||||
|
| DELETE | `/api/apiInterface/deleteApiInterface` | 删除 |
|
||||||
|
|
||||||
|
### 4.3 同步控制
|
||||||
|
|
||||||
|
| 方法 | 路径 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| POST | `/api/sync/ctrl/trigger` | 触发同步 |
|
||||||
|
| GET | `/api/sync/ctrl/config` | 查询配置 |
|
||||||
|
|
||||||
|
**触发同步示例:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:3002/api/sync/ctrl/trigger \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{"platformCode":"tencent","interfaceCode":"image","fullSync":true}'
|
||||||
|
```
|
||||||
|
|
||||||
|
响应:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": true,
|
||||||
|
"tableName": "tencent_image",
|
||||||
|
"totalRows": 1500,
|
||||||
|
"insertedRows": 1450,
|
||||||
|
"duration": "12.3s"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 五、配置文件 (`config.yml`)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
sync:
|
||||||
|
page_size: 100 # 每次分页请求条数
|
||||||
|
concurrency: 5 # 并发处理数(prefetch 遍历实体时)
|
||||||
|
retry_count: 3 # 最大重试次数
|
||||||
|
sync_interval_minutes: 60 # 自动同步间隔(分钟)
|
||||||
|
compensation_interval_seconds: 300 # 补偿扫描间隔(秒)
|
||||||
|
auto_sync_enabled: true # 是否启用自动同步
|
||||||
|
|
||||||
|
tencent:
|
||||||
|
oauth:
|
||||||
|
client_id: "1112038234"
|
||||||
|
client_secret: "GxyjXFbZAs5dnsNQ"
|
||||||
|
access_token: "4bacfc7c9b0a31f70ec0eb4771f8b542"
|
||||||
|
refresh_token: "d15b37363a42449026d337708516e95e"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 六、自动同步机制
|
||||||
|
|
||||||
|
### 6.1 启动流程
|
||||||
|
|
||||||
|
1. 服务启动 → `InitAndStartAutoSync` 在 goroutine 中启动调度器
|
||||||
|
2. 自动扫描所有 ACTIVE 平台下有 `table_definition` 的接口
|
||||||
|
3. 无 `sync_tracker` 记录 → 全量拉取;有记录 → 增量拉取
|
||||||
|
|
||||||
|
### 6.2 增量同步原理
|
||||||
|
|
||||||
|
- `sync_tracker` 表记录每个接口的最后同步时间
|
||||||
|
- 配置了 `time_field` 的接口,增量时生成 `filtering=[{"field":"last_modified_time","operator":"GREATER_EQUALS","values":["<时间戳>"]}]`
|
||||||
|
- 不支持时间过滤的接口(如 audio/advertiser)每次全量,`ON CONFLICT` 去重
|
||||||
|
|
||||||
|
### 6.3 异常中断恢复
|
||||||
|
|
||||||
|
- 同步开始前写 `sync_tracker.sync_status='running'`
|
||||||
|
- 同步完成后写 `'success'`
|
||||||
|
- 重启检测到 `'running'` → 日志告警 → 重新全量
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 七、补偿机制
|
||||||
|
|
||||||
|
### 7.1 工作原理
|
||||||
|
|
||||||
|
1. 同步失败 → 自动写入 `sync_task_log`(status=failed)
|
||||||
|
2. 补偿调度器(随主服务自动启动)每 N 秒扫描 failed 记录
|
||||||
|
3. 对未达最大重试次数的任务,调用 `SyncByConfig` 重试
|
||||||
|
4. 重试间隔按退避策略递增:5min → 15min → 30min → 60min → 120min
|
||||||
|
5. 达最大次数 → 标记 `manual_review`,等待人工介入
|
||||||
|
|
||||||
|
### 7.2 配置
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
sync:
|
||||||
|
compensation_interval_seconds: 300 # 扫描间隔
|
||||||
|
retry_count: 3 # 最大重试次数
|
||||||
|
```
|
||||||
|
|
||||||
|
补偿调度器随主服务自动启动,无需手动运行。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 八、当前已配置接口(腾讯广告)
|
||||||
|
|
||||||
|
| 接口编码 | 名称 | 方法+路径 | 类型 | 增量 |
|
||||||
|
|------|------|------|------|------|
|
||||||
|
| `account_relation` | 账户列表 | `GET /advertiser/get` | 单接口分页 | 不支持 |
|
||||||
|
| `image` | 图片素材 | `GET /images/get` | prefetch 遍历账户 | ✅ `last_modified_time` |
|
||||||
|
| `video` | 视频素材 | `GET /videos/get` | prefetch 遍历账户 | ✅ `last_modified_time` |
|
||||||
|
| `audio` | 音频素材 | `POST /muse_audios/get` | 单接口 POST | 不支持 |
|
||||||
|
|
||||||
|
三个素材表自动包含 `verify_status DEFAULT 'PENDING'`、`verified_at`、`verified_by` 校验字段。
|
||||||
|
|
||||||
|
### 图片/视频同步流程
|
||||||
|
|
||||||
|
```
|
||||||
|
SyncByConfig("tencent", "image")
|
||||||
|
├── ① 预取: 分页拉取 /advertiser/get → 774 个 account_id
|
||||||
|
│ 数据同时存入 tencent_account_relation 表
|
||||||
|
├── ② 并发遍历账户(config.yml concurrency=5)
|
||||||
|
│ 每个 account_id → GET /images/get?account_id=xxx&page=1&page_size=100
|
||||||
|
│ 自动补充 filtering(增量时)
|
||||||
|
│ 结果 upsert 到 tencent_image
|
||||||
|
└── ③ 更新 sync_tracker 记录同步时间
|
||||||
|
```
|
||||||
|
|
||||||
|
### 音频同步流程
|
||||||
|
|
||||||
|
```
|
||||||
|
单次 POST /muse_audios/get → 分页拉全量 → upsert 到 tencent_audio
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 九、快速开始
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. 建表
|
||||||
|
psql -h localhost -U postgres -d data-engine -f sql/init_core_tables.sql
|
||||||
|
|
||||||
|
# 2. 初始化数据
|
||||||
|
psql -h localhost -U postgres -d data-engine -f sql/seed_data.sql
|
||||||
|
|
||||||
|
# 3. 启动
|
||||||
|
go run main.go
|
||||||
|
```
|
||||||
|
|
||||||
|
启动后自动同步和补偿调度器自动运行。也可手动触发:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 触发图片全量同步
|
||||||
|
curl -X POST http://localhost:3002/api/sync/ctrl/trigger \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{"platformCode":"tencent","interfaceCode":"image","fullSync":true}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 十、常见问题
|
||||||
|
|
||||||
|
**Q: 响应格式不符合 `{code: 0, data: {list: [...]}}` 怎么办?**
|
||||||
|
|
||||||
|
修改 `dynamic_sync.go` 的 `parseResp` 函数。
|
||||||
|
|
||||||
|
**Q: 如何添加新平台?**
|
||||||
|
|
||||||
|
调用平台管理 API 创建平台 → 调用接口管理 API 创建接口(带 `table_definition`)→ 系统自动建表并同步。
|
||||||
|
|
||||||
|
**Q: prefetch 的响应格式要求?**
|
||||||
|
|
||||||
|
必须是 JSON,`response_path` 指向一个数组。如 `response_path: "data.list"` 从 `data.list` 取值。
|
||||||
|
|
||||||
|
**Q: 如何排查同步失败?**
|
||||||
|
|
||||||
|
1. `GET /api/sync/ctrl/config?platformCode=xxx` 查看配置
|
||||||
|
2. 查询 `sync_task_log` 表看失败记录
|
||||||
|
3. 补偿调度器会自动重试,日志会打印重试过程
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
Write-Host "=== Fix metrics-server ===" -ForegroundColor Cyan
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
$k3sContainer = "k3s-server"
|
|
||||||
$TARGET_IMAGE = "rancher/mirrored-metrics-server:v0.8.0"
|
|
||||||
|
|
||||||
Write-Host "[Step 1] Pull image from domestic registry..." -ForegroundColor Yellow
|
|
||||||
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server:v0.6.3
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Host "[ERROR] Failed to pull image" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "[Step 2] Tag image to match K3s requirement..." -ForegroundColor Yellow
|
|
||||||
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-server:v0.6.3 $TARGET_IMAGE
|
|
||||||
Write-Host "[OK] Image tagged as $TARGET_IMAGE" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "[Step 3] Save to tar file..." -ForegroundColor Yellow
|
|
||||||
$tarPath = "$PWD\metrics-server.tar"
|
|
||||||
docker save -o $tarPath $TARGET_IMAGE
|
|
||||||
Write-Host "[OK] Saved: $([math]::Round((Get-Item $tarPath).Length / 1MB, 2)) MB" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "[Step 4] Copy to K3s container..." -ForegroundColor Yellow
|
|
||||||
docker cp $tarPath "${k3sContainer}:/tmp/metrics-server.tar"
|
|
||||||
Write-Host "[OK] Copied" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "[Step 5] Import in K3s..." -ForegroundColor Yellow
|
|
||||||
docker exec $k3sContainer ctr -n k8s.io images import /tmp/metrics-server.tar
|
|
||||||
docker exec $k3sContainer rm /tmp/metrics-server.tar
|
|
||||||
Remove-Item $tarPath
|
|
||||||
Write-Host "[OK] Imported" -ForegroundColor Green
|
|
||||||
|
|
||||||
Write-Host "[Step 6] Restart metrics-server pod..." -ForegroundColor Yellow
|
|
||||||
kubectl -n kube-system delete pod -l k8s-app=metrics-server --force --grace-period=0
|
|
||||||
|
|
||||||
Write-Host "Waiting for pod to start..." -ForegroundColor Cyan
|
|
||||||
Start-Sleep -Seconds 15
|
|
||||||
|
|
||||||
for ($i = 1; $i -le 30; $i++) {
|
|
||||||
$status = kubectl -n kube-system get pods -l k8s-app=metrics-server -o jsonpath='{.items[0].status.phase}' 2>$null
|
|
||||||
$ready = kubectl -n kube-system get pods -l k8s-app=metrics-server -o jsonpath='{.items[0].status.conditions[?(@.type=="Ready")].status}' 2>$null
|
|
||||||
|
|
||||||
if ($status -eq "Running" -and $ready -eq "True") {
|
|
||||||
Write-Host "[SUCCESS] metrics-server is ready!" -ForegroundColor Green
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($i % 5 -eq 0) {
|
|
||||||
Write-Host " Waiting... ($i/30) Current: $status" -ForegroundColor Gray
|
|
||||||
}
|
|
||||||
Start-Sleep -Seconds 5
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "Testing metrics API..." -ForegroundColor Cyan
|
|
||||||
Start-Sleep -Seconds 5
|
|
||||||
kubectl top pods
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "=== Done ===" -ForegroundColor Green
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"dataengine/controller/copydata"
|
|
||||||
"dataengine/controller/dict"
|
"dataengine/controller/dict"
|
||||||
"dataengine/controller/tencent"
|
syncCtrl "dataengine/controller/sync"
|
||||||
|
syncSvc "dataengine/service/sync"
|
||||||
|
|
||||||
"gitea.com/red-future/common/http"
|
"gitea.com/red-future/common/http"
|
||||||
"gitea.com/red-future/common/jaeger"
|
"gitea.com/red-future/common/jaeger"
|
||||||
@@ -17,21 +17,15 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
defer jaeger.ShutDown(ctx)
|
defer jaeger.ShutDown(ctx)
|
||||||
|
|
||||||
|
// 启动自动同步(后台循环执行,首次全量后续增量)
|
||||||
|
syncSvc.InitAndStartAutoSync(ctx)
|
||||||
|
|
||||||
http.RouteRegister([]interface{}{
|
http.RouteRegister([]interface{}{
|
||||||
// 接口管理
|
// 接口管理
|
||||||
dict.ApiInterface,
|
dict.ApiInterface,
|
||||||
dict.FieldMappingConfig,
|
|
||||||
dict.DatasourcePlatform,
|
dict.DatasourcePlatform,
|
||||||
copydata.AccountReportDetail,
|
// 平台同步引擎
|
||||||
copydata.TaskReport,
|
syncCtrl.PlatformSyncController,
|
||||||
copydata.PopulationReport,
|
|
||||||
copydata.MaterialReport,
|
|
||||||
copydata.StorewideReport,
|
|
||||||
copydata.CreativeReport,
|
|
||||||
copydata.UnitReport,
|
|
||||||
copydata.CampaignReport,
|
|
||||||
// 腾讯广告OAuth
|
|
||||||
tencent.OauthController,
|
|
||||||
})
|
})
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,321 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateCidAccountReportDetailReq 创建广告数据报表详情请求
|
|
||||||
type CreateCidAccountReportDetailReq struct {
|
|
||||||
g.Meta `path:"/createCidAccountReportDetail" method:"post" tags:"广告数据报表" summary:"创建广告数据报表详情" dc:"创建新的广告数据报表详情"`
|
|
||||||
*CidAccountReportDetailItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCidAccountReportDetailRes 创建广告数据报表详情响应
|
|
||||||
type CreateCidAccountReportDetailRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告数据ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportDetailReq 批量创建广告数据报表详情请求
|
|
||||||
type BatchCreateCidAccountReportDetailReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCidAccountReportDetail" method:"post" tags:"广告数据报表" summary:"批量创建广告数据报表详情" dc:"批量创建广告数据报表详情"`
|
|
||||||
Items []*CidAccountReportDetailItem `json:"items" v:"required" dc:"广告数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportDetailRes 批量创建广告数据报表详情响应
|
|
||||||
type BatchCreateCidAccountReportDetailRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CidAccountReportDetailItem 广告数据报表详情项
|
|
||||||
type CidAccountReportDetailItem struct {
|
|
||||||
// 基础信息字段
|
|
||||||
DataType string `json:"dataType" v:"required" dc:"类型type"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
T0OrderPaymentAmt string `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面URL"`
|
|
||||||
CoverId int64 `json:"coverId" dc:"封面Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频id"`
|
|
||||||
|
|
||||||
// 受众属性字段
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品5秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品3秒播放率"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
|
|
||||||
// 商品信息字段
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
|
|
||||||
// 点击相关字段
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长字段
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 播放数据字段
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品3秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品3秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品5秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品5秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
|
|
||||||
// 互动数据字段
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动字段
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
|
|
||||||
// 播放效果字段
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化字段
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接GMV"`
|
|
||||||
|
|
||||||
// GMV时间序列字段
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计GMV"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3日累计GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7日累计GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15日累计GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30日累计GMV"`
|
|
||||||
|
|
||||||
// ROI时间序列字段
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计ROI"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3日累计ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7日累计ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15日累计ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30日累计ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30日累计订单数"`
|
|
||||||
|
|
||||||
// 粉丝相关字段
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约字段
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看字段
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
|
|
||||||
// 商品点击字段
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30日累计店铺新客"`
|
|
||||||
|
|
||||||
// 间接订单字段
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额字段
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本字段
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝GMV字段
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉7日GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉15日GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉30日GMV"`
|
|
||||||
|
|
||||||
// 粉丝ROI字段
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉7日ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉15日ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉30日ROI"`
|
|
||||||
|
|
||||||
// 新客GMV字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后1日新客GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后3日新客GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后7日新客GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后15日新客GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后30日新客GMV"`
|
|
||||||
|
|
||||||
// 新客订单量字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后1日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后3日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后7日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后15日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后30日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后1日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后3日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后7日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后15日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后30日新客复购率"`
|
|
||||||
|
|
||||||
// 新客ROI字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后1日新客ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后3日新客ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后7日新客ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后15日新客ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后30日新客ROI"`
|
|
||||||
|
|
||||||
// 电话卡相关字段
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
|
|
||||||
// 分页字段
|
|
||||||
PageNumber int `json:"pageNumber" dc:"页码"`
|
|
||||||
|
|
||||||
// 广告结构字段
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
|
|
||||||
// 补贴相关字段
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCidAccountReportDetailReq 获取广告数据报表详情列表请求
|
|
||||||
type ListCidAccountReportDetailReq struct {
|
|
||||||
g.Meta `path:"/listCidAccountReportDetail" method:"get" tags:"广告数据报表" summary:"获取广告数据报表详情列表" dc:"分页查询广告数据报表详情列表"`
|
|
||||||
*beans.Page
|
|
||||||
DataType string `json:"dataType" dc:"类型type"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCidAccountReportDetailRes 获取广告数据报表详情列表响应
|
|
||||||
type ListCidAccountReportDetailRes struct {
|
|
||||||
List []*CidAccountReportDetailItem `json:"list" dc:"广告数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,321 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateCidAccountReportSumReq 创建广告数据报表详情请求
|
|
||||||
type CreateCidAccountReportSumReq struct {
|
|
||||||
g.Meta `path:"/createCidAccountReportSum" method:"post" tags:"广告数据报表" summary:"创建广告数据报表详情" dc:"创建新的广告数据报表详情"`
|
|
||||||
*CidAccountReportSumItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCidAccountReportSumRes 创建广告数据报表详情响应
|
|
||||||
type CreateCidAccountReportSumRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告数据ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportSumReq 批量创建广告数据报表详情请求
|
|
||||||
type BatchCreateCidAccountReportSumReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCidAccountReportSum" method:"post" tags:"广告数据报表" summary:"批量创建广告数据报表详情" dc:"批量创建广告数据报表详情"`
|
|
||||||
Items []*CidAccountReportSumItem `json:"items" v:"required" dc:"广告数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCidAccountReportSumRes 批量创建广告数据报表详情响应
|
|
||||||
type BatchCreateCidAccountReportSumRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CidAccountReportSumItem 广告数据报表详情项
|
|
||||||
type CidAccountReportSumItem struct {
|
|
||||||
// 基础信息字段
|
|
||||||
DataType string `json:"dataType" v:"required" dc:"类型type"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
T0OrderPaymentAmt string `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面URL"`
|
|
||||||
CoverId int64 `json:"coverId" dc:"封面Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频id"`
|
|
||||||
|
|
||||||
// 受众属性字段
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品5秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品3秒播放率"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
|
|
||||||
// 商品信息字段
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
|
|
||||||
// 点击相关字段
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长字段
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 播放数据字段
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品3秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品3秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品5秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品5秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
|
|
||||||
// 互动数据字段
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动字段
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
|
|
||||||
// 播放效果字段
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化字段
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接GMV"`
|
|
||||||
|
|
||||||
// GMV时间序列字段
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计GMV"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3日累计GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7日累计GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15日累计GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30日累计GMV"`
|
|
||||||
|
|
||||||
// ROI时间序列字段
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计ROI"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3日累计ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7日累计ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15日累计ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30日累计ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30日累计订单数"`
|
|
||||||
|
|
||||||
// 粉丝相关字段
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约字段
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看字段
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
|
|
||||||
// 商品点击字段
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30日累计店铺新客"`
|
|
||||||
|
|
||||||
// 间接订单字段
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额字段
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本字段
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝GMV字段
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉7日GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉15日GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉30日GMV"`
|
|
||||||
|
|
||||||
// 粉丝ROI字段
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉7日ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉15日ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉30日ROI"`
|
|
||||||
|
|
||||||
// 新客GMV字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后1日新客GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后3日新客GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后7日新客GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后15日新客GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后30日新客GMV"`
|
|
||||||
|
|
||||||
// 新客订单量字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后1日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后3日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后7日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后15日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后30日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后1日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后3日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后7日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后15日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后30日新客复购率"`
|
|
||||||
|
|
||||||
// 新客ROI字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后1日新客ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后3日新客ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后7日新客ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后15日新客ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后30日新客ROI"`
|
|
||||||
|
|
||||||
// 电话卡相关字段
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
|
|
||||||
// 分页字段
|
|
||||||
PageNumber int `json:"pageNumber" dc:"页码"`
|
|
||||||
|
|
||||||
// 广告结构字段
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
|
|
||||||
// 补贴相关字段
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCidAccountReportSumReq 获取广告数据报表详情列表请求
|
|
||||||
type ListCidAccountReportSumReq struct {
|
|
||||||
g.Meta `path:"/listCidAccountReportSum" method:"get" tags:"广告数据报表" summary:"获取广告数据报表详情列表" dc:"分页查询广告数据报表详情列表"`
|
|
||||||
*beans.Page
|
|
||||||
DataType string `json:"dataType" dc:"类型type"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCidAccountReportSumRes 获取广告数据报表详情列表响应
|
|
||||||
type ListCidAccountReportSumRes struct {
|
|
||||||
List []*CidAccountReportSumItem `json:"list" dc:"广告数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CreateCampaignReportDetailReq struct {
|
|
||||||
g.Meta `path:"/createCampaignReportDetail" method:"post" tags:"广告效果明细报表" summary:"创建广告效果指标明细表" dc:"创建新的广告效果指标明细表"`
|
|
||||||
*CampaignReportDetailItem
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateCampaignReportDetailRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告效果明细 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchCreateCampaignReportDetailReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCampaignReportDetail" method:"post" tags:"广告效果明细报表" summary:"批量创建广告效果指标明细表" dc:"批量创建广告效果指标明细表"`
|
|
||||||
Items []*CampaignReportDetailItem `json:"items" v:"required" dc:"广告效果明细列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchCreateCampaignReportDetailRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type CampaignReportDetailItem struct {
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ListCampaignReportDetailReq struct {
|
|
||||||
g.Meta `path:"/listCampaignReportDetail" method:"get" tags:"广告效果明细报表" summary:"获取广告效果指标明细表列表" dc:"分页查询广告效果指标明细表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ListCampaignReportDetailRes struct {
|
|
||||||
List []*CampaignReportDetailItem `json:"list" dc:"广告效果明细列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateCampaignReportSumReq 创建广告计划效果指标表请求
|
|
||||||
type CreateCampaignReportSumReq struct {
|
|
||||||
g.Meta `path:"/createCampaignReportSum" method:"post" tags:"广告计划报表" summary:"创建广告计划效果指标表" dc:"创建新的广告计划效果指标表"`
|
|
||||||
*CampaignReportSumItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCampaignReportSumRes 创建广告计划效果指标表响应
|
|
||||||
type CreateCampaignReportSumRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告计划效果 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCampaignReportSumReq 批量创建广告计划效果指标表请求
|
|
||||||
type BatchCreateCampaignReportSumReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCampaignReportSum" method:"post" tags:"广告计划报表" summary:"批量创建广告计划效果指标表" dc:"批量创建广告计划效果指标表"`
|
|
||||||
Items []*CampaignReportSumItem `json:"items" v:"required" dc:"广告计划效果列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCampaignReportSumRes 批量创建广告计划效果指标表响应
|
|
||||||
type BatchCreateCampaignReportSumRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CampaignReportSumItem 广告计划效果指标表项
|
|
||||||
type CampaignReportSumItem struct {
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCampaignReportSumReq 获取广告计划效果指标表列表请求
|
|
||||||
type ListCampaignReportSumReq struct {
|
|
||||||
g.Meta `path:"/listCampaignReportSum" method:"get" tags:"广告计划报表" summary:"获取广告计划效果指标表列表" dc:"分页查询广告计划效果指标表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCampaignReportSumRes 获取广告计划效果指标表列表响应
|
|
||||||
type ListCampaignReportSumRes struct {
|
|
||||||
List []*CampaignReportSumItem `json:"list" dc:"广告计划效果列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CreateCreativeReportDetailReq struct {
|
|
||||||
g.Meta `path:"/createCreativeReportDetail" method:"post" tags:"广告效果明细报表" summary:"创建广告效果指标明细表" dc:"创建新的广告效果指标明细表"`
|
|
||||||
*CreativeReportDetailItem
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateCreativeReportDetailRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告效果明细 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchCreateCreativeReportDetailReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCreativeReportDetail" method:"post" tags:"广告效果明细报表" summary:"批量创建广告效果指标明细表" dc:"批量创建广告效果指标明细表"`
|
|
||||||
Items []*CreativeReportDetailItem `json:"items" v:"required" dc:"广告效果明细列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchCreateCreativeReportDetailRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreativeReportDetailItem struct {
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ListCreativeReportDetailReq struct {
|
|
||||||
g.Meta `path:"/listCreativeReportDetail" method:"get" tags:"广告效果明细报表" summary:"获取广告效果指标明细表列表" dc:"分页查询广告效果指标明细表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ListCreativeReportDetailRes struct {
|
|
||||||
List []*CreativeReportDetailItem `json:"list" dc:"广告效果明细列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,342 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateCreativeReportSumReq 创建广告效果指标表请求
|
|
||||||
type CreateCreativeReportSumReq struct {
|
|
||||||
g.Meta `path:"/createCreativeReportSum" method:"post" tags:"广告效果报表" summary:"创建广告效果指标表" dc:"创建新的广告效果指标表"`
|
|
||||||
*CreativeReportSumItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateCreativeReportSumRes 创建广告效果指标表响应
|
|
||||||
type CreateCreativeReportSumRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告效果 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCreativeReportSumReq 批量创建广告效果指标表请求
|
|
||||||
type BatchCreateCreativeReportSumReq struct {
|
|
||||||
g.Meta `path:"/batchCreateCreativeReportSum" method:"post" tags:"广告效果报表" summary:"批量创建广告效果指标表" dc:"批量创建广告效果指标表"`
|
|
||||||
Items []*CreativeReportSumItem `json:"items" v:"required" dc:"广告效果列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateCreativeReportSumRes 批量创建广告效果指标表响应
|
|
||||||
type BatchCreateCreativeReportSumRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreativeReportSumItem 广告效果指标表项
|
|
||||||
type CreativeReportSumItem struct {
|
|
||||||
// 订单金额相关字段
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
|
|
||||||
// 素材类型字段
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
|
|
||||||
// 直播相关字段
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
|
|
||||||
// 图片相关字段
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
|
|
||||||
// 成本相关字段
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
|
|
||||||
// 净成交相关字段
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频相关字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
|
|
||||||
// 用户属性相关字段
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
|
|
||||||
// 订单提交相关字段
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
|
|
||||||
// 用户行为相关字段
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
|
|
||||||
// 转化成本相关字段
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
|
|
||||||
// 商品相关字段
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
|
|
||||||
// 曝光相关字段
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
|
|
||||||
// 行为相关字段
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长相关字段
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 作品播放相关字段
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
|
|
||||||
// 作品互动相关字段
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动相关字段
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
|
|
||||||
// 有效播放相关字段
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化相关字段
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
|
|
||||||
// 累计 GMV 相关字段
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
|
|
||||||
// 累计 ROI 相关字段
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
|
|
||||||
// 涨粉相关字段
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约相关字段
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
|
|
||||||
// 直播间商品相关字段
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
|
|
||||||
// 3 日累计相关字段
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
|
|
||||||
// 7 日间接订单相关字段
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额相关字段
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本相关字段
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券相关字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝 GMV 相关字段
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
|
|
||||||
// 粉丝 ROI 相关字段
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
|
|
||||||
// 新客 GMV 相关字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
|
|
||||||
// 新客订单数相关字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率相关字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
|
|
||||||
// 新客 ROI 相关字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
|
|
||||||
// 制卡订单相关字段
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
|
|
||||||
// 电话卡激活相关字段
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
|
|
||||||
// 制卡订单率相关字段
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
|
|
||||||
// 电话卡激活率相关字段
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
|
|
||||||
// 报告日期字段
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
|
|
||||||
// 广告计划相关字段
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
|
|
||||||
// 广告单元相关字段
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
|
|
||||||
// 广告创意相关字段
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
|
|
||||||
// 新增字段
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCreativeReportSumReq 获取广告效果指标表列表请求
|
|
||||||
type ListCreativeReportSumReq struct {
|
|
||||||
g.Meta `path:"/listCreativeReportSum" method:"get" tags:"广告效果报表" summary:"获取广告效果指标表列表" dc:"分页查询广告效果指标表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCreativeReportSumRes 获取广告效果指标表列表响应
|
|
||||||
type ListCreativeReportSumRes struct {
|
|
||||||
List []*CreativeReportSumItem `json:"list" dc:"广告效果列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateMaterialReportReq 创建素材报表数据请求
|
|
||||||
type CreateMaterialReportReq struct {
|
|
||||||
g.Meta `path:"/createMaterialReport" method:"post" tags:"素材报表" summary:"创建素材报表数据" dc:"创建新的素材报表数据"`
|
|
||||||
*MaterialReportItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateMaterialReportRes 创建素材报表数据响应
|
|
||||||
type CreateMaterialReportRes struct {
|
|
||||||
Id int64 `json:"id" dc:"素材报表数据 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateMaterialReportReq 批量创建素材报表数据请求
|
|
||||||
type BatchCreateMaterialReportReq struct {
|
|
||||||
g.Meta `path:"/batchCreateMaterialReport" method:"post" tags:"素材报表" summary:"批量创建素材报表数据" dc:"批量创建素材报表数据"`
|
|
||||||
Items []*MaterialReportItem `json:"items" v:"required" dc:"素材报表数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateMaterialReportRes 批量创建素材报表数据响应
|
|
||||||
type BatchCreateMaterialReportRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// MaterialReportItem 素材报表数据项
|
|
||||||
type MaterialReportItem struct {
|
|
||||||
CreatedBy *string `json:"createdBy" dc:"创建人"`
|
|
||||||
UpdatedBy *string `json:"updatedBy" dc:"更新人"`
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日订单支付金额"`
|
|
||||||
CreativeMaterialType *string `json:"creativeMaterialType" dc:"创意素材类型"`
|
|
||||||
LiveName *string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId *string `json:"authorId" dc:"作者 ID"`
|
|
||||||
PicUrl *string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName *string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId *string `json:"picId" dc:"图片 ID"`
|
|
||||||
CoverUrl *string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 ID"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"商品订单转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"商品卡点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"商家涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"商家涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"当日净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"当日净成交 GMV"`
|
|
||||||
PhotoName *string `json:"photoName" dc:"照片名称"`
|
|
||||||
PhotoIdStr *string `json:"photoIdStr" dc:"照片 ID 字符串"`
|
|
||||||
PhotoId *string `json:"photoId" dc:"照片 ID"`
|
|
||||||
ModPriceSegment *string `json:"modPriceSegment" dc:"价格区间"`
|
|
||||||
AgeSegment *string `json:"ageSegment" dc:"年龄段"`
|
|
||||||
Province *string `json:"province" dc:"省份"`
|
|
||||||
Gender *string `json:"gender" dc:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"广告照片播放 5 秒比率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"广告照片播放 3 秒比率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"提交订单 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"提交订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"事件订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"事件订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"事件订单支付 ROI"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"事件 APP 调用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"事件加购数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化数量成本"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"广告有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"广告商品点击数"`
|
|
||||||
MerchantProductId *string `json:"merchantProductId" dc:"商家商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"总花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"广告展示数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"千次展示成本"`
|
|
||||||
Impression *int64 `json:"impression" dc:"曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"照片点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"照片点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"点击数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"操作栏点击数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"操作栏点击成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"ESP 点击率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"操作比率"`
|
|
||||||
AdItemCount *int64 `json:"adItemCount" dc:"广告商品点击次数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"ESP 直播播放秒数"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"播放 3 秒数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"播放 5 秒数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"播放结束数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"商品负反馈数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播分享数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播打赏数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本 ESP"`
|
|
||||||
Roi *float64 `json:"roi" dc:"ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"支付订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"订单比率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"当日订单比率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"商家推荐粉丝数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日留存率"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日留存率"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日留存率"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日留存率"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日留存比率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日留存比率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日留存比率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日留存比率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"预约成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"标准直播开始数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"广告直播播放数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"广告直播播放成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观众成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播事件商品浏览数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接吸引平台新买家数"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日吸引平台总买家数"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接吸引商家新买家数"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日吸引商家总买家数"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"粉丝当日人均 GMV"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"粉丝 3 日人均 GMV"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"粉丝 7 日人均 GMV"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"粉丝 15 日人均 GMV"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"粉丝 30 日人均 GMV"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"推荐粉丝成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"白盒直接订单支付金额"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"白盒直接订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"粉丝当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"粉丝次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"粉丝 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"粉丝 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"粉丝 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"粉丝当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"粉丝次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"粉丝 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"粉丝 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"粉丝 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日店铺新客订单支付金额"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"次日店铺新客订单支付金额"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"3 日店铺新客订单支付金额"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"7 日店铺新客订单支付金额"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"15 日店铺新客订单支付金额"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"30 日店铺新客订单支付金额"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日店铺新客订单数"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"次日店铺新客订单数"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"3 日店铺新客订单数"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"7 日店铺新客订单数"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"15 日店铺新客订单数"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"30 日店铺新客订单数"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"次日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"当日店铺新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"次日店铺新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"3 日店铺新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"7 日店铺新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"15 日店铺新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"30 日店铺新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"创建卡片订单数"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"转发 TS 创建卡片订单数"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"创建卡片订单成本"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"转发 TS 创建卡片订单成本"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"激活卡片订单数"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"转发 TS 激活卡片订单数"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"激活卡片订单成本"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"转发 TS 激活卡片订单成本"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"创建卡片订单比率"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"转发 TS 创建卡片订单比率"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"激活卡片订单比率"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"转发 TS 激活卡片订单比率"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"直播播放数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"商品入口点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"展示数"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"报告日期(格式:YYYY-MM-DD)"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName *string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName *string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName *string `json:"creativeName" dc:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMaterialReportReq 获取素材报表数据列表请求
|
|
||||||
type ListMaterialReportReq struct {
|
|
||||||
g.Meta `path:"/listMaterialReport" method:"get" tags:"素材报表" summary:"获取素材报表数据列表" dc:"分页查询素材报表数据列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"报告日期"`
|
|
||||||
PhotoId string `json:"photoId" dc:"照片 ID"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索照片名称、计划名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMaterialReportRes 获取素材报表数据列表响应
|
|
||||||
type ListMaterialReportRes struct {
|
|
||||||
List []*MaterialReportItem `json:"list" dc:"素材报表数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,210 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PopulationReportItem 调控任务数据项
|
|
||||||
type PopulationReportItem struct {
|
|
||||||
PhotoName string `json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `json:"province" description:"省份名称"`
|
|
||||||
Gender string `json:"gender" description:"性别"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" description:"商品 ID"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" description:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" description:"创意名称"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" description:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" description:"行为数"`
|
|
||||||
CostTotal *float64 `json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" description:"全站曝光"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreatePopulationReportReq 创建调控任务数据请求参数
|
|
||||||
type CreatePopulationReportReq struct {
|
|
||||||
g.Meta `path:"/createPopulationReport" method:"post"`
|
|
||||||
*PopulationReportItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreatePopulationReportRes 创建调控任务数据响应参数
|
|
||||||
type CreatePopulationReportRes struct {
|
|
||||||
Id int64 `json:"id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreatePopulationReportReq 批量创建调控任务数据请求参数
|
|
||||||
type BatchCreatePopulationReportReq struct {
|
|
||||||
g.Meta `path:"/batchCreatePopulationReport" method:"post"`
|
|
||||||
Items []*PopulationReportItem `json:"items" v:"required"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreatePopulationReportRes 批量创建调控任务数据响应参数
|
|
||||||
type BatchCreatePopulationReportRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount"`
|
|
||||||
FailCount int64 `json:"failCount"`
|
|
||||||
FailedItems []int64 `json:"failedItems"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListPopulationReportReq 查询调控任务数据列表请求参数
|
|
||||||
type ListPopulationReportReq struct {
|
|
||||||
g.Meta `path:"/listPopulationReport" method:"post"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" description:"时间"`
|
|
||||||
PhotoId string `json:"photoId" description:"视频 id"`
|
|
||||||
Keyword string `json:"keyword" description:"关键词"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListPopulationReportRes 查询调控任务数据列表响应参数
|
|
||||||
type ListPopulationReportRes struct {
|
|
||||||
List []*PopulationReportItem `json:"list"`
|
|
||||||
Total int `json:"total"`
|
|
||||||
}
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateStorewideReportDetailReq 创建广告效果指标表请求
|
|
||||||
type CreateStorewideReportDetailReq struct {
|
|
||||||
g.Meta `path:"/createStorewideReportDetail" method:"post" tags:"广告效果指标" summary:"创建广告效果指标表" dc:"创建新的广告效果指标表"`
|
|
||||||
*StorewideReportDetailItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateStorewideReportDetailRes 创建广告效果指标表响应
|
|
||||||
type CreateStorewideReportDetailRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告效果指标 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReportDetailReq 批量创建广告效果指标表请求
|
|
||||||
type BatchCreateStorewideReportDetailReq struct {
|
|
||||||
g.Meta `path:"/batchCreateStorewideReportDetail" method:"post" tags:"广告效果指标" summary:"批量创建广告效果指标表" dc:"批量创建广告效果指标表"`
|
|
||||||
Items []*StorewideReportDetailItem `json:"items" v:"required" dc:"广告效果指标列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReportDetailRes 批量创建广告效果指标表响应
|
|
||||||
type BatchCreateStorewideReportDetailRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StorewideReportDetailItem 广告效果指标表项
|
|
||||||
type StorewideReportDetailItem struct {
|
|
||||||
// 订单金额相关字段
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
|
|
||||||
// 素材类型字段
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
|
|
||||||
// 直播相关字段
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
|
|
||||||
// 图片相关字段
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
|
|
||||||
// 商品卡点击相关字段
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
|
|
||||||
// 净成交相关字段
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频相关字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
|
|
||||||
// 行为相关字段
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
|
|
||||||
// 商品相关字段
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
|
|
||||||
// 行为率字段
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
|
|
||||||
// 当日 GMV 相关字段
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
|
|
||||||
// 当日订单相关字段
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
|
|
||||||
// 智能优惠券相关字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
|
|
||||||
// 商品入口点击相关字段
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
|
|
||||||
// 曝光相关字段
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
|
|
||||||
// 报告日期字段
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
|
|
||||||
// 广告计划相关字段
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
|
|
||||||
// 广告单元相关字段
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
|
|
||||||
// 广告创意相关字段
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListStorewideReportDetailReq 获取广告效果指标表列表请求
|
|
||||||
type ListStorewideReportDetailReq struct {
|
|
||||||
g.Meta `path:"/listStorewideReportDetail" method:"get" tags:"广告效果指标" summary:"获取广告效果指标表列表" dc:"分页查询广告效果指标表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListStorewideReportDetailRes 获取广告效果指标表列表响应
|
|
||||||
type ListStorewideReportDetailRes struct {
|
|
||||||
List []*StorewideReportDetailItem `json:"list" dc:"广告效果指标列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateStorewideReportSumReq 创建广告效果指标表请求
|
|
||||||
type CreateStorewideReportSumReq struct {
|
|
||||||
g.Meta `path:"/createStorewideReportSum" method:"post" tags:"广告效果指标" summary:"创建广告效果指标表" dc:"创建新的广告效果指标表"`
|
|
||||||
*StorewideReportSumItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateStorewideReportSumRes 创建广告效果指标表响应
|
|
||||||
type CreateStorewideReportSumRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告效果指标 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReportSumReq 批量创建广告效果指标表请求
|
|
||||||
type BatchCreateStorewideReportSumReq struct {
|
|
||||||
g.Meta `path:"/batchCreateStorewideReportSum" method:"post" tags:"广告效果指标" summary:"批量创建广告效果指标表" dc:"批量创建广告效果指标表"`
|
|
||||||
Items []*StorewideReportSumItem `json:"items" v:"required" dc:"广告效果指标列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateStorewideReportSumRes 批量创建广告效果指标表响应
|
|
||||||
type BatchCreateStorewideReportSumRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StorewideReportSumItem 广告效果指标表项
|
|
||||||
type StorewideReportSumItem struct {
|
|
||||||
// 新增字段
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 原有字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListStorewideReportSumReq 获取广告效果指标表列表请求
|
|
||||||
type ListStorewideReportSumReq struct {
|
|
||||||
g.Meta `path:"/listStorewideReportSum" method:"get" tags:"广告效果指标" summary:"获取广告效果指标表列表" dc:"分页查询广告效果指标表列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListStorewideReportSumRes 获取广告效果指标表列表响应
|
|
||||||
type ListStorewideReportSumRes struct {
|
|
||||||
List []*StorewideReportSumItem `json:"list" dc:"广告效果指标列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,8 @@ package copydata
|
|||||||
type CreateSyncTaskLogReq struct {
|
type CreateSyncTaskLogReq struct {
|
||||||
TaskID string `json:"taskId"`
|
TaskID string `json:"taskId"`
|
||||||
TaskType string `json:"taskType"`
|
TaskType string `json:"taskType"`
|
||||||
|
PlatformCode string `json:"platformCode"`
|
||||||
|
InterfaceCode string `json:"interfaceCode"`
|
||||||
AdvertiserID int64 `json:"advertiserId"`
|
AdvertiserID int64 `json:"advertiserId"`
|
||||||
StartTime interface{} `json:"startTime"`
|
StartTime interface{} `json:"startTime"`
|
||||||
EndTime interface{} `json:"endTime"`
|
EndTime interface{} `json:"endTime"`
|
||||||
@@ -39,6 +41,8 @@ type SyncTaskLogItem struct {
|
|||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
TaskID string `json:"taskId"`
|
TaskID string `json:"taskId"`
|
||||||
TaskType string `json:"taskType"`
|
TaskType string `json:"taskType"`
|
||||||
|
PlatformCode string `json:"platformCode"`
|
||||||
|
InterfaceCode string `json:"interfaceCode"`
|
||||||
AdvertiserID int64 `json:"advertiserId"`
|
AdvertiserID int64 `json:"advertiserId"`
|
||||||
StartTime interface{} `json:"startTime"`
|
StartTime interface{} `json:"startTime"`
|
||||||
EndTime interface{} `json:"endTime"`
|
EndTime interface{} `json:"endTime"`
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateTaskReportReq 创建调控任务数据请求
|
|
||||||
type CreateTaskReportReq struct {
|
|
||||||
g.Meta `path:"/createTaskReport" method:"post" tags:"调控任务" summary:"创建调控任务数据" dc:"创建新的调控任务数据"`
|
|
||||||
*TaskReportItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateTaskReportRes 创建调控任务数据响应
|
|
||||||
type CreateTaskReportRes struct {
|
|
||||||
Id int64 `json:"id" dc:"调控任务数据 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateTaskReportReq 批量创建调控任务数据请求
|
|
||||||
type BatchCreateTaskReportReq struct {
|
|
||||||
g.Meta `path:"/batchCreateTaskReport" method:"post" tags:"调控任务" summary:"批量创建调控任务数据" dc:"批量创建调控任务数据"`
|
|
||||||
Items []*TaskReportItem `json:"items" v:"required" dc:"调控任务数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateTaskReportRes 批量创建调控任务数据响应
|
|
||||||
type BatchCreateTaskReportRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TaskReportItem 调控任务数据项
|
|
||||||
type TaskReportItem struct {
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
|
|
||||||
// 粉丝 GMV 字段
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
|
|
||||||
// 粉丝 ROI 字段
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间(格式:YYYY-MM-DD)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListTaskReportReq 获取调控任务数据列表请求
|
|
||||||
type ListTaskReportReq struct {
|
|
||||||
g.Meta `path:"/listTaskReport" method:"get" tags:"调控任务" summary:"获取调控任务数据列表" dc:"分页查询调控任务数据列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListTaskReportRes 获取调控任务数据列表响应
|
|
||||||
type ListTaskReportRes struct {
|
|
||||||
List []*TaskReportItem `json:"list" dc:"调控任务数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateUnitReportDetailReq 创建广告效果指标详情请求
|
|
||||||
type CreateUnitReportDetailReq struct {
|
|
||||||
g.Meta `path:"/createUnitReportDetail" method:"post" tags:"广告效果指标详情" summary:"创建广告效果指标详情" dc:"创建新的广告效果指标详情"`
|
|
||||||
*UnitReportDetailItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateUnitReportDetailRes 创建广告效果指标详情响应
|
|
||||||
type CreateUnitReportDetailRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告数据 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateUnitReportDetailReq 批量创建广告效果指标详情请求
|
|
||||||
type BatchCreateUnitReportDetailReq struct {
|
|
||||||
g.Meta `path:"/batchCreateUnitReportDetail" method:"post" tags:"广告效果指标详情" summary:"批量创建广告效果指标详情" dc:"批量创建广告效果指标详情"`
|
|
||||||
Items []*UnitReportDetailItem `json:"items" v:"required" dc:"广告数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateUnitReportDetailRes 批量创建广告效果指标详情响应
|
|
||||||
type BatchCreateUnitReportDetailRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnitReportDetailItem 广告效果指标详情项
|
|
||||||
type UnitReportDetailItem struct {
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间,"0-500", "501-1000", "1001-1500", "1501-2000", "2001-2500", "2501-3000", "3001-3500", "3501-4000", "4001-4500", "4501-5000", "5001-5500", "5501+", "未知""`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"0-17", "18-23", "24-30", "31-40", "41-49", "50+","未知""`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"男,女,未知三种类型"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListUnitReportDetailReq 获取广告效果指标详情列表请求
|
|
||||||
type ListUnitReportDetailReq struct {
|
|
||||||
g.Meta `path:"/listUnitReportDetail" method:"get" tags:"广告效果指标详情" summary:"获取广告效果指标详情列表" dc:"分页查询广告效果指标详情列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListUnitReportDetailRes 获取广告效果指标详情列表响应
|
|
||||||
type ListUnitReportDetailRes struct {
|
|
||||||
List []*UnitReportDetailItem `json:"list" dc:"广告数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateUnitReportSumReq 创建广告效果指标请求
|
|
||||||
type CreateUnitReportSumReq struct {
|
|
||||||
g.Meta `path:"/createUnitReportSum" method:"post" tags:"广告效果指标" summary:"创建广告效果指标" dc:"创建新的广告效果指标"`
|
|
||||||
*UnitReportSumItem
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateUnitReportSumRes 创建广告效果指标响应
|
|
||||||
type CreateUnitReportSumRes struct {
|
|
||||||
Id int64 `json:"id" dc:"广告数据 ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateUnitReportSumReq 批量创建广告效果指标请求
|
|
||||||
type BatchCreateUnitReportSumReq struct {
|
|
||||||
g.Meta `path:"/batchCreateUnitReportSum" method:"post" tags:"广告效果指标" summary:"批量创建广告效果指标" dc:"批量创建广告效果指标"`
|
|
||||||
Items []*UnitReportSumItem `json:"items" v:"required" dc:"广告数据列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateUnitReportSumRes 批量创建广告效果指标响应
|
|
||||||
type BatchCreateUnitReportSumRes struct {
|
|
||||||
SuccessCount int64 `json:"successCount" dc:"成功数量"`
|
|
||||||
FailCount int64 `json:"failCount" dc:"失败数量"`
|
|
||||||
FailedItems []int64 `json:"failedItems" dc:"失败项索引"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnitReportSumItem 广告效果指标项
|
|
||||||
type UnitReportSumItem struct {
|
|
||||||
T0OrderPaymentAmt *float64 `json:"t0OrderPaymentAmt" dc:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `json:"creativeMaterialType" dc:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `json:"liveName" dc:"直播间名称"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
PicUrl string `json:"picUrl" dc:"图片 URL"`
|
|
||||||
PicName string `json:"picName" dc:"图片名称"`
|
|
||||||
PicId string `json:"picId" dc:"图片 Id"`
|
|
||||||
CoverUrl string `json:"coverUrl" dc:"封面 URL"`
|
|
||||||
CoverId *int64 `json:"coverId" dc:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `json:"itemOrderConversionRatio" dc:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `json:"itemCardClickRatio" dc:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `json:"itemCardClkCnt" dc:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `json:"livePlayCntCost" dc:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `json:"adMerchantFollowCost" dc:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `json:"adMerchantFollow" dc:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `json:"netT0OrderCnt" dc:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `json:"netT0Roi" dc:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `json:"netT0Gmv" dc:"净成交 GMV"`
|
|
||||||
PhotoName string `json:"photoName" dc:"视频名称"`
|
|
||||||
PhotoIdStr string `json:"photoIdStr" dc:"视频 id"`
|
|
||||||
PhotoId string `json:"photoId" dc:"视频 id"`
|
|
||||||
ModPriceSegment string `json:"modPriceSegment" dc:"设备价格区间,"0-500", "501-1000", "1001-1500", "1501-2000", "2001-2500", "2501-3000", "3001-3500", "3501-4000", "4001-4500", "4501-5000", "5001-5500", "5501+", "未知""`
|
|
||||||
AgeSegment string `json:"ageSegment" dc:"年龄段"0-17", "18-23", "24-30", "31-40", "41-49", "50+","未知""`
|
|
||||||
Province string `json:"province" dc:"省份名称"`
|
|
||||||
Gender string `json:"gender" dc:"男,女,未知三种类型"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `json:"adPhotoPlayedFiveRatio" dc:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `json:"adPhotoPlayedThreeRatio" dc:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `json:"orderSubmitRoi" dc:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `json:"orderSubmitAmt" dc:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `json:"eventOrderSubmitCost" dc:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `json:"eventOrderSubmit" dc:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `json:"eventOrderPaidRoi" dc:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `json:"eventAppInvoked" dc:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `json:"eventAddShoppingCart" dc:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `json:"conversionNumCost" dc:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `json:"adEffectivePlayNum" dc:"有效播放数"`
|
|
||||||
AdItemClick *int64 `json:"adItemClick" dc:"行为数"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
CostTotal *float64 `json:"costTotal" dc:"花费"`
|
|
||||||
AdShow *int64 `json:"adShow" dc:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `json:"adShow1kCost" dc:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `json:"impression" dc:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `json:"photoClick" dc:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `json:"photoClickRatio" dc:"封面点击率"`
|
|
||||||
Click *int64 `json:"click" dc:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `json:"actionbarClick" dc:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `json:"actionbarClickCost" dc:"行为成本"`
|
|
||||||
EspClickRatio *float64 `json:"espClickRatio" dc:"行为率"`
|
|
||||||
ActionRatio *float64 `json:"actionRatio" dc:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `json:"adItemClickCount" dc:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `json:"espLivePlayedSeconds" dc:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `json:"playedThreeSeconds" dc:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `json:"play3sRatio" dc:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `json:"playedFiveSeconds" dc:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `json:"play5sRatio" dc:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `json:"playedEnd" dc:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `json:"playEndRatio" dc:"作品完播率"`
|
|
||||||
Share *int64 `json:"share" dc:"作品分享数"`
|
|
||||||
Comment *int64 `json:"comment" dc:"作品评论数"`
|
|
||||||
Likes *int64 `json:"likes" dc:"作品点赞数"`
|
|
||||||
Report *int64 `json:"report" dc:"作品举报数"`
|
|
||||||
Block *int64 `json:"block" dc:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `json:"itemNegative" dc:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `json:"liveShare" dc:"直播送礼数"`
|
|
||||||
LiveComment *int64 `json:"liveComment" dc:"直播评论数"`
|
|
||||||
LiveReward *int64 `json:"liveReward" dc:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `json:"effectivePlayCount" dc:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `json:"effectivePlayRatio" dc:"有效播放率"`
|
|
||||||
ConversionNum *int64 `json:"conversionNum" dc:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `json:"conversionCostEsp" dc:"转化成本"`
|
|
||||||
Roi *float64 `json:"roi" dc:"直接 ROI"`
|
|
||||||
Gmv *float64 `json:"gmv" dc:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `json:"t0Gmv" dc:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `json:"t1Gmv" dc:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `json:"t7Gmv" dc:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `json:"t15Gmv" dc:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `json:"t30Gmv" dc:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `json:"t0Roi" dc:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `json:"t1Roi" dc:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `json:"t7Roi" dc:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `json:"t15Roi" dc:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `json:"t30Roi" dc:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `json:"paiedOrder" dc:"直接订单数"`
|
|
||||||
OrderRatio *float64 `json:"orderRatio" dc:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `json:"t0OrderCnt" dc:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `json:"t0OrderCntCost" dc:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `json:"t0OrderCntRatio" dc:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `json:"t1OrderCnt" dc:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `json:"t7OrderCnt" dc:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `json:"t15OrderCnt" dc:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `json:"t30OrderCnt" dc:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `json:"merchantRecoFans" dc:"涨粉数"`
|
|
||||||
T1Retention *float64 `json:"t1Retention" dc:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `json:"t7Retention" dc:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `json:"t15Retention" dc:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `json:"t30Retention" dc:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `json:"t1RetentionRatio" dc:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `json:"t7RetentionRatio" dc:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `json:"t15RetentionRatio" dc:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `json:"t30RetentionRatio" dc:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `json:"reservationSuccess" dc:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `json:"reservationCost" dc:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `json:"standardLivePlayedStarted" dc:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `json:"adLivePlayCnt" dc:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `json:"adLivePlayCntCost" dc:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `json:"liveAudienceCost" dc:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `json:"liveEventGoodsView" dc:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `json:"goodsClickRatio" dc:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `json:"directAttrPlatNewBuyerCnt" dc:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `json:"t30AttrPlatTotalBuyerCnt" dc:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `json:"directAttrSellerNewBuyerCnt" dc:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `json:"t30AttrSellerTotalBuyerCnt" dc:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `json:"t3Gmv" dc:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `json:"t3OrderCnt" dc:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `json:"t3Roi" dc:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `json:"t7IndirectOrderAmt" dc:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `json:"t7IndirectOrderCnt" dc:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `json:"fansT0GmvPerFans" dc:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `json:"fansT3GmvPerFans" dc:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `json:"fansT7GmvPerFans" dc:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `json:"fansT15GmvPerFans" dc:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `json:"fansT30GmvPerFans" dc:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `json:"recoFansCost" dc:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `json:"qcpxWhiteboxDirectOrderPaymentAmt" dc:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `json:"qcpxWhiteboxDirectOrderCnt" dc:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `json:"fansT0Gmv" dc:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `json:"fansT1Gmv" dc:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `json:"fansT7Gmv" dc:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `json:"fansT15Gmv" dc:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `json:"fansT30Gmv" dc:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `json:"fansT0Roi" dc:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `json:"fansT1Roi" dc:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `json:"fansT7Roi" dc:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `json:"fansT15Roi" dc:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `json:"fansT30Roi" dc:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `json:"t0ShopNewBuyerOrderPaymentAmt" dc:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `json:"t1ShopNewBuyerOrderPaymentAmt" dc:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `json:"t3ShopNewBuyerOrderPaymentAmt" dc:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `json:"t7ShopNewBuyerOrderPaymentAmt" dc:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `json:"t15ShopNewBuyerOrderPaymentAmt" dc:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `json:"t30ShopNewBuyerOrderPaymentAmt" dc:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `json:"t0ShopNewBuyerOrderCnt" dc:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `json:"t1ShopNewBuyerOrderCnt" dc:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `json:"t3ShopNewBuyerOrderCnt" dc:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `json:"t7ShopNewBuyerOrderCnt" dc:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `json:"t15ShopNewBuyerOrderCnt" dc:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `json:"t30ShopNewBuyerOrderCnt" dc:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `json:"t1NewBuyerRepurchaseRatio" dc:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `json:"t3NewBuyerRepurchaseRatio" dc:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `json:"t7NewBuyerRepurchaseRatio" dc:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `json:"t15NewBuyerRepurchaseRatio" dc:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `json:"t30NewBuyerRepurchaseRatio" dc:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `json:"t0ShopNewBuyerRoi" dc:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `json:"t1ShopNewBuyerRoi" dc:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `json:"t3ShopNewBuyerRoi" dc:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `json:"t7ShopNewBuyerRoi" dc:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `json:"t15ShopNewBuyerRoi" dc:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `json:"t30ShopNewBuyerRoi" dc:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `json:"createCardOrderCnt" dc:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `json:"forwardTsCreateCardOrderCnt" dc:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `json:"createCardOrderCost" dc:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `json:"forwardTsCreateCardOrderCost" dc:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `json:"activateCardOrderCnt" dc:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `json:"forwardTsActivateCardOrderCnt" dc:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `json:"activateCardOrderCost" dc:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `json:"forwardTsActivateCardOrderCost" dc:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `json:"createCardOrderRatio" dc:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `json:"forwardTsCreateCardOrderRatio" dc:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `json:"activateCardOrderCntRatio" dc:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `json:"forwardTsActivateCardOrderRatio" dc:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `json:"livePlayCnt" dc:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `json:"itemEntranceClkCnt" dc:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `json:"showCnt" dc:"全站曝光"`
|
|
||||||
ReportDateStr string `json:"reportDateStr" v:"required" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
CampaignName string `json:"campaignName" dc:"计划名称"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
UnitName string `json:"unitName" dc:"单元名称"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
CreativeName string `json:"creativeName" dc:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `json:"cidActualRoiAfterSubsidy" dc:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `json:"cidCouponAmount" dc:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `json:"cidCouponCallbackPaidRefundAmount" dc:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `json:"cidVoucherCost" dc:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListUnitReportSumReq 获取广告效果指标列表请求
|
|
||||||
type ListUnitReportSumReq struct {
|
|
||||||
g.Meta `path:"/listUnitReportSum" method:"get" tags:"广告效果指标" summary:"获取广告效果指标列表" dc:"分页查询广告效果指标列表"`
|
|
||||||
*beans.Page
|
|
||||||
ReportDateStr string `json:"reportDateStr" dc:"时间"`
|
|
||||||
CampaignId *int64 `json:"campaignId" dc:"计划 ID"`
|
|
||||||
UnitId *int64 `json:"unitId" dc:"单元 ID"`
|
|
||||||
CreativeId *int64 `json:"creativeId" dc:"创意 ID"`
|
|
||||||
AuthorId string `json:"authorId" dc:"直播用户快手 Id"`
|
|
||||||
MerchantProductId string `json:"merchantProductId" dc:"商品 ID"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字(搜索直播间名称、视频名称等)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListUnitReportSumRes 获取广告效果指标列表响应
|
|
||||||
type ListUnitReportSumRes struct {
|
|
||||||
List []*UnitReportSumItem `json:"list" dc:"广告数据列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
@@ -27,6 +27,7 @@ type CreateDatasourcePlatformReq struct {
|
|||||||
RequestTimeoutMs int `json:"requestTimeoutMs" dc:"请求超时时间(毫秒)" d:"30000"`
|
RequestTimeoutMs int `json:"requestTimeoutMs" dc:"请求超时时间(毫秒)" d:"30000"`
|
||||||
MaxRetries int `json:"maxRetries" dc:"最大重试次数" d:"3"`
|
MaxRetries int `json:"maxRetries" dc:"最大重试次数" d:"3"`
|
||||||
RetryDelayMs int `json:"retryDelayMs" dc:"重试延迟(毫秒)" d:"1000"`
|
RetryDelayMs int `json:"retryDelayMs" dc:"重试延迟(毫秒)" d:"1000"`
|
||||||
|
AuthConfig map[string]interface{} `json:"authConfig" dc:"自定义认证配置(JSON),支持各平台特有认证方式"`
|
||||||
CreatedBy string `json:"createdBy" v:"required" dc:"创建人"`
|
CreatedBy string `json:"createdBy" v:"required" dc:"创建人"`
|
||||||
CreatedAt string `json:"createdAt" v:"required" dc:"创建时间"`
|
CreatedAt string `json:"createdAt" v:"required" dc:"创建时间"`
|
||||||
UpdatedBy string `json:"updatedBy" v:"required" dc:"修改人"`
|
UpdatedBy string `json:"updatedBy" v:"required" dc:"修改人"`
|
||||||
@@ -108,6 +109,7 @@ type UpdateDatasourcePlatformReq struct {
|
|||||||
RequestTimeoutMs int `json:"requestTimeoutMs" dc:"请求超时时间(毫秒)"`
|
RequestTimeoutMs int `json:"requestTimeoutMs" dc:"请求超时时间(毫秒)"`
|
||||||
MaxRetries int `json:"maxRetries" dc:"最大重试次数"`
|
MaxRetries int `json:"maxRetries" dc:"最大重试次数"`
|
||||||
RetryDelayMs int `json:"retryDelayMs" dc:"重试延迟(毫秒)"`
|
RetryDelayMs int `json:"retryDelayMs" dc:"重试延迟(毫秒)"`
|
||||||
|
AuthConfig map[string]interface{} `json:"authConfig" dc:"自定义认证配置(JSON)"`
|
||||||
UpdatedBy string `json:"updatedBy" v:"required" dc:"更新人"`
|
UpdatedBy string `json:"updatedBy" v:"required" dc:"更新人"`
|
||||||
UpdatedAt string `json:"updatedAt" v:"required" dc:"更新时间"`
|
UpdatedAt string `json:"updatedAt" v:"required" dc:"更新时间"`
|
||||||
Version string `json:"version" v:"required" dc:"版本"`
|
Version string `json:"version" v:"required" dc:"版本"`
|
||||||
|
|||||||
@@ -1,221 +0,0 @@
|
|||||||
package api_feature
|
|
||||||
|
|
||||||
import (
|
|
||||||
entity "dataengine/model/entity/dict"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateFieldMappingConfigReq 创建字段映射配置请求
|
|
||||||
type CreateFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs" method:"post" tags:"字段映射配置" summary:"创建字段映射配置" dc:"创建新的字段映射配置"`
|
|
||||||
ConfigName string `json:"configName" v:"required#配置名称不能为空" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" v:"required#厂商名称不能为空" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" v:"required#接口名称不能为空" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" v:"required#源字段不能为空" dc:"源字段名"`
|
|
||||||
SourceFieldType string `json:"sourceFieldType" dc:"源字段数据类型"`
|
|
||||||
SourceFieldDesc string `json:"sourceFieldDesc" dc:"源字段描述"`
|
|
||||||
TargetField string `json:"targetField" v:"required#目标字段不能为空" dc:"目标字段名"`
|
|
||||||
TargetFieldType string `json:"targetFieldType" v:"required#目标字段类型不能为空" dc:"目标数据类型"`
|
|
||||||
TargetFieldDesc string `json:"targetFieldDesc" dc:"字段描述"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型" d:"direct"`
|
|
||||||
TransformParams map[string]interface{} `json:"transformParams" dc:"转换参数"`
|
|
||||||
ValidationRules map[string]interface{} `json:"validationRules" dc:"验证规则"`
|
|
||||||
DefaultValue string `json:"defaultValue" dc:"默认值"`
|
|
||||||
IsRequired bool `json:"isRequired" dc:"是否必填" d:"false"`
|
|
||||||
IsActive bool `json:"isActive" dc:"是否启用" d:"true"`
|
|
||||||
Priority int `json:"priority" dc:"优先级" d:"0"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
ConfigVersion int `json:"configVersion" dc:"配置版本号" d:"1"`
|
|
||||||
EffectiveDate *time.Time `json:"effectiveDate" dc:"生效时间"`
|
|
||||||
ExpiryDate *time.Time `json:"expiryDate" dc:"失效时间"`
|
|
||||||
CreatedBy string `json:"createdBy" dc:"创建人"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateFieldMappingConfigRes 创建字段映射配置响应
|
|
||||||
type CreateFieldMappingConfigRes struct {
|
|
||||||
Id int64 `json:"id" dc:"配置ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListFieldMappingConfigReq 获取字段映射配置列表请求
|
|
||||||
type ListFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs" method:"get" tags:"字段映射配置" summary:"获取字段映射配置列表" dc:"分页查询字段映射配置列表"`
|
|
||||||
*beans.Page
|
|
||||||
ConfigName string `json:"configName" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" dc:"源字段名"`
|
|
||||||
TargetField string `json:"targetField" dc:"目标字段名"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型"`
|
|
||||||
IsActive *bool `json:"isActive" dc:"是否启用"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
Keyword string `json:"keyword" dc:"关键字搜索"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListFieldMappingConfigRes 获取字段映射配置列表响应
|
|
||||||
type ListFieldMappingConfigRes struct {
|
|
||||||
List []FieldMappingConfigItem `json:"list" dc:"配置列表"`
|
|
||||||
Total int `json:"total" dc:"总数"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FieldMappingConfigItem 字段映射配置列表项
|
|
||||||
type FieldMappingConfigItem struct {
|
|
||||||
Id int64 `json:"id,string" dc:"配置ID"`
|
|
||||||
ConfigName string `json:"configName" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" dc:"源字段名"`
|
|
||||||
TargetField string `json:"targetField" dc:"目标字段名"`
|
|
||||||
TargetFieldType string `json:"targetFieldType" dc:"目标数据类型"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型"`
|
|
||||||
TransformTypeName string `json:"transformTypeName" dc:"转换类型名称"`
|
|
||||||
IsActive bool `json:"isActive" dc:"是否启用"`
|
|
||||||
Priority int `json:"priority" dc:"优先级"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
BusinessDomainName string `json:"businessDomainName" dc:"业务域名称"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
ConfigVersion int `json:"configVersion" dc:"配置版本号"`
|
|
||||||
CreatedBy string `json:"createdBy" dc:"创建人"`
|
|
||||||
CreatedTime time.Time `json:"createdTime" dc:"创建时间"`
|
|
||||||
UpdatedBy string `json:"updatedBy" dc:"更新人"`
|
|
||||||
UpdatedTime time.Time `json:"updatedTime" dc:"更新时间"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFieldMappingConfigReq 获取字段映射配置详情请求
|
|
||||||
type GetFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/{id}" method:"get" tags:"字段映射配置" summary:"获取字段映射配置详情" dc:"获取字段映射配置详情"`
|
|
||||||
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFieldMappingConfigRes 获取字段映射配置详情响应
|
|
||||||
type GetFieldMappingConfigRes struct {
|
|
||||||
*entity.FieldMappingConfig
|
|
||||||
TransformTypeName string `json:"transformTypeName,omitempty" dc:"转换类型名称"`
|
|
||||||
BusinessDomainName string `json:"businessDomainName,omitempty" dc:"业务域名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateFieldMappingConfigReq 更新字段映射配置请求
|
|
||||||
type UpdateFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/{id}" method:"put" tags:"字段映射配置" summary:"更新字段映射配置" dc:"更新字段映射配置信息"`
|
|
||||||
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
|
||||||
ConfigName string `json:"configName" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" dc:"源字段名"`
|
|
||||||
SourceFieldType string `json:"sourceFieldType" dc:"源字段数据类型"`
|
|
||||||
SourceFieldDesc string `json:"sourceFieldDesc" dc:"源字段描述"`
|
|
||||||
TargetField string `json:"targetField" dc:"目标字段名"`
|
|
||||||
TargetFieldType string `json:"targetFieldType" dc:"目标数据类型"`
|
|
||||||
TargetFieldDesc string `json:"targetFieldDesc" dc:"字段描述"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型"`
|
|
||||||
TransformParams map[string]interface{} `json:"transformParams" dc:"转换参数"`
|
|
||||||
ValidationRules map[string]interface{} `json:"validationRules" dc:"验证规则"`
|
|
||||||
DefaultValue string `json:"defaultValue" dc:"默认值"`
|
|
||||||
IsRequired bool `json:"isRequired" dc:"是否必填"`
|
|
||||||
IsActive bool `json:"isActive" dc:"是否启用"`
|
|
||||||
Priority int `json:"priority" dc:"优先级"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
ConfigVersion int `json:"configVersion" dc:"配置版本号"`
|
|
||||||
EffectiveDate *time.Time `json:"effectiveDate" dc:"生效时间"`
|
|
||||||
ExpiryDate *time.Time `json:"expiryDate" dc:"失效时间"`
|
|
||||||
UpdatedBy string `json:"updatedBy" dc:"更新人"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteFieldMappingConfigReq 删除字段映射配置请求
|
|
||||||
type DeleteFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/{id}" method:"delete" tags:"字段映射配置" summary:"删除字段映射配置" dc:"删除字段映射配置"`
|
|
||||||
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateFieldMappingConfigStatusReq 更新字段映射配置状态请求
|
|
||||||
type UpdateFieldMappingConfigStatusReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/{id}/status" method:"put" tags:"字段映射配置" summary:"更新字段映射配置状态" dc:"更新字段映射配置状态"`
|
|
||||||
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"配置ID"`
|
|
||||||
IsActive bool `json:"isActive" v:"required#状态不能为空" dc:"是否启用:true启用/false停用"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateFieldMappingConfigReq 批量创建字段映射配置请求
|
|
||||||
type BatchCreateFieldMappingConfigReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/batch" method:"post" tags:"字段映射配置" summary:"批量创建字段映射配置" dc:"批量创建字段映射配置"`
|
|
||||||
Configs []BatchFieldMappingConfigItem `json:"configs" v:"required#配置列表不能为空" dc:"配置列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchFieldMappingConfigItem 批量创建配置项
|
|
||||||
type BatchFieldMappingConfigItem struct {
|
|
||||||
ConfigName string `json:"configName" v:"required#配置名称不能为空" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" v:"required#厂商名称不能为空" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" v:"required#接口名称不能为空" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" v:"required#源字段不能为空" dc:"源字段名"`
|
|
||||||
SourceFieldType string `json:"sourceFieldType" dc:"源字段数据类型"`
|
|
||||||
SourceFieldDesc string `json:"sourceFieldDesc" dc:"源字段描述"`
|
|
||||||
TargetField string `json:"targetField" v:"required#目标字段不能为空" dc:"目标字段名"`
|
|
||||||
TargetFieldType string `json:"targetFieldType" v:"required#目标字段类型不能为空" dc:"目标数据类型"`
|
|
||||||
TargetFieldDesc string `json:"targetFieldDesc" dc:"字段描述"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型" d:"direct"`
|
|
||||||
TransformParams map[string]interface{} `json:"transformParams" dc:"转换参数"`
|
|
||||||
ValidationRules map[string]interface{} `json:"validationRules" dc:"验证规则"`
|
|
||||||
DefaultValue string `json:"defaultValue" dc:"默认值"`
|
|
||||||
IsRequired bool `json:"isRequired" dc:"是否必填" d:"false"`
|
|
||||||
IsActive bool `json:"isActive" dc:"是否启用" d:"true"`
|
|
||||||
Priority int `json:"priority" dc:"优先级" d:"0"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
ConfigVersion int `json:"configVersion" dc:"配置版本号" d:"1"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateFieldMappingConfigRes 批量创建字段映射配置响应
|
|
||||||
type BatchCreateFieldMappingConfigRes struct {
|
|
||||||
SuccessCount int `json:"successCount" dc:"成功数量"`
|
|
||||||
FailedCount int `json:"failedCount" dc:"失败数量"`
|
|
||||||
FailedItems []BatchCreateFailedItem `json:"failedItems" dc:"失败项列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateFailedItem 批量创建失败项
|
|
||||||
type BatchCreateFailedItem struct {
|
|
||||||
Index int `json:"index" dc:"项索引"`
|
|
||||||
ConfigName string `json:"configName" dc:"配置名称"`
|
|
||||||
Error string `json:"error" dc:"错误信息"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryFieldMappingByVendorApiReq 根据厂商和接口查询字段映射请求
|
|
||||||
type QueryFieldMappingByVendorApiReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/query" method:"get" tags:"字段映射配置" summary:"根据厂商和接口查询字段映射" dc:"根据厂商和接口查询字段映射配置"`
|
|
||||||
VendorName string `json:"vendorName" v:"required#厂商名称不能为空" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" v:"required#接口名称不能为空" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
IsActive *bool `json:"isActive" dc:"是否启用" d:"true"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryFieldMappingByVendorApiRes 根据厂商和接口查询字段映射响应
|
|
||||||
type QueryFieldMappingByVendorApiRes struct {
|
|
||||||
List []*entity.FieldMappingConfig `json:"list" dc:"字段映射配置列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ValidateFieldMappingReq 验证字段映射配置请求
|
|
||||||
type ValidateFieldMappingReq struct {
|
|
||||||
g.Meta `path:"/field-mapping-configs/validate" method:"post" tags:"字段映射配置" summary:"验证字段映射配置" dc:"验证字段映射配置的有效性"`
|
|
||||||
ConfigName string `json:"configName" v:"required#配置名称不能为空" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" v:"required#厂商名称不能为空" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" v:"required#接口名称不能为空" dc:"接口名称"`
|
|
||||||
SourceField string `json:"sourceField" v:"required#源字段不能为空" dc:"源字段名"`
|
|
||||||
TargetField string `json:"targetField" v:"required#目标字段不能为空" dc:"目标字段名"`
|
|
||||||
TestValue interface{} `json:"testValue" dc:"测试值"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ValidateFieldMappingRes 验证字段映射配置响应
|
|
||||||
type ValidateFieldMappingRes struct {
|
|
||||||
IsValid bool `json:"isValid" dc:"是否有效"`
|
|
||||||
TransformedValue interface{} `json:"transformedValue" dc:"转换后的值"`
|
|
||||||
Error string `json:"error" dc:"错误信息"`
|
|
||||||
Warnings []string `json:"warnings" dc:"警告信息"`
|
|
||||||
}
|
|
||||||
@@ -10,17 +10,18 @@ import (
|
|||||||
|
|
||||||
// CreateApiInterfaceReq 创建接口请求
|
// CreateApiInterfaceReq 创建接口请求
|
||||||
type CreateApiInterfaceReq struct {
|
type CreateApiInterfaceReq struct {
|
||||||
g.Meta `path:"/createApiInterface" method:"post" tags:"接口管理" summary:"创建接口" dc:"创建新的数据接口"`
|
g.Meta `path:"/createApiInterface" method:"post" tags:"接口管理" summary:"创建接口" dc:"创建新的数据接口"`
|
||||||
PlatformId int64 `json:"platformId" v:"required" dc:"所属平台ID"`
|
PlatformId int64 `json:"platformId" v:"required" dc:"所属平台ID"`
|
||||||
Name string `json:"name" v:"required" dc:"接口名称"`
|
Name string `json:"name" v:"required" dc:"接口名称"`
|
||||||
Code string `json:"code" v:"required" dc:"接口编码"`
|
Code string `json:"code" v:"required" dc:"接口编码"`
|
||||||
Url string `json:"url" v:"required" dc:"接口地址"`
|
Url string `json:"url" v:"required" dc:"接口地址"`
|
||||||
Method api_feature.ApiMethod `json:"method" v:"required" dc:"请求方法"`
|
Method api_feature.ApiMethod `json:"method" v:"required" dc:"请求方法"`
|
||||||
Status api_feature.PlatformStatus `json:"status" dc:"接口状态" d:"active"`
|
Status api_feature.PlatformStatus `json:"status" dc:"接口状态" d:"active"`
|
||||||
AuthType string `json:"authType" dc:"认证类型"`
|
AuthType string `json:"authType" dc:"认证类型"`
|
||||||
RequestConfig map[string]interface{} `json:"requestConfig" dc:"请求配置"`
|
RequestConfig map[string]interface{} `json:"requestConfig" dc:"请求配置"`
|
||||||
ResponseConfig map[string]interface{} `json:"responseConfig" dc:"响应配置"`
|
ResponseConfig map[string]interface{} `json:"responseConfig" dc:"响应配置"`
|
||||||
LimitConfig map[string]interface{} `json:"limitConfig" dc:"接口独立限流配置"`
|
LimitConfig map[string]interface{} `json:"limitConfig" dc:"接口独立限流配置"`
|
||||||
|
TableDefinition map[string]interface{} `json:"tableDefinition" dc:"表结构定义(JSON),用于自动建表"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateApiInterfaceRes 创建接口响应
|
// CreateApiInterfaceRes 创建接口响应
|
||||||
@@ -74,18 +75,19 @@ type GetApiInterfaceRes struct {
|
|||||||
|
|
||||||
// UpdateApiInterfaceReq 更新接口请求
|
// UpdateApiInterfaceReq 更新接口请求
|
||||||
type UpdateApiInterfaceReq struct {
|
type UpdateApiInterfaceReq struct {
|
||||||
g.Meta `path:"/updateApiInterface" method:"put" tags:"接口管理" summary:"更新接口" dc:"更新接口信息"`
|
g.Meta `path:"/updateApiInterface" method:"put" tags:"接口管理" summary:"更新接口" dc:"更新接口信息"`
|
||||||
Id int64 `json:"id" v:"required" dc:"接口ID"`
|
Id int64 `json:"id" v:"required" dc:"接口ID"`
|
||||||
PlatformId int64 `json:"platformId" dc:"所属平台ID"`
|
PlatformId int64 `json:"platformId" dc:"所属平台ID"`
|
||||||
Name string `json:"name" dc:"接口名称"`
|
Name string `json:"name" dc:"接口名称"`
|
||||||
Code string `json:"code" dc:"接口编码"`
|
Code string `json:"code" dc:"接口编码"`
|
||||||
Url string `json:"url" dc:"接口地址"`
|
Url string `json:"url" dc:"接口地址"`
|
||||||
Method api_feature.ApiMethod `json:"method" dc:"请求方法"`
|
Method api_feature.ApiMethod `json:"method" dc:"请求方法"`
|
||||||
Status api_feature.PlatformStatus `json:"status,omitempty" dc:"接口状态"`
|
Status api_feature.PlatformStatus `json:"status,omitempty" dc:"接口状态"`
|
||||||
AuthType string `json:"authType" dc:"认证类型"`
|
AuthType string `json:"authType" dc:"认证类型"`
|
||||||
RequestConfig map[string]interface{} `json:"requestConfig" dc:"请求配置"`
|
RequestConfig map[string]interface{} `json:"requestConfig" dc:"请求配置"`
|
||||||
ResponseConfig map[string]interface{} `json:"responseConfig" dc:"响应配置"`
|
ResponseConfig map[string]interface{} `json:"responseConfig" dc:"响应配置"`
|
||||||
LimitConfig map[string]interface{} `json:"limitConfig" dc:"接口独立限流配置"`
|
LimitConfig map[string]interface{} `json:"limitConfig" dc:"接口独立限流配置"`
|
||||||
|
TableDefinition map[string]interface{} `json:"tableDefinition" dc:"表结构定义(JSON),用于自动建表"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteApiInterfaceReq 删除接口请求
|
// DeleteApiInterfaceReq 删除接口请求
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import "github.com/gogf/gf/v2/frame/g"
|
|
||||||
|
|
||||||
// GetAccountRelationReq 获取账户关系请求
|
|
||||||
type GetAccountRelationReq struct {
|
|
||||||
g.Meta `path:"/getAccountRelation" method:"post" tags:"腾讯广告账户关系" summary:"获取账户关系列表" dc:"从腾讯广告API获取账户关系数据"`
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌"`
|
|
||||||
Timestamp int64 `json:"timestamp" dc:"时间戳"`
|
|
||||||
Nonce string `json:"nonce" dc:"随机字符串"`
|
|
||||||
PaginationMode string `json:"pagination_mode" dc:"分页模式" d:"PAGINATION_MODE_NORMAL"`
|
|
||||||
Page int `json:"page" dc:"页码" d:"1"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量" d:"100"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncAccountRelationReq 同步账户关系请求
|
|
||||||
type SyncAccountRelationReq struct {
|
|
||||||
g.Meta `path:"/syncAccountRelation" method:"post" tags:"腾讯广告账户关系" summary:"同步账户关系" dc:"自动分页获取所有账户关系并保存到数据库"`
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌(可选,不传则从配置读取)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncAccountRelationRes 同步账户关系响应
|
|
||||||
type SyncAccountRelationRes struct {
|
|
||||||
TotalNumber int `json:"total_number" dc:"总记录数"`
|
|
||||||
TotalPage int `json:"total_page" dc:"总页数"`
|
|
||||||
SyncedCount int `json:"synced_count" dc:"同步成功数量"`
|
|
||||||
Message string `json:"message" dc:"消息"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAccountRelationReq 获取账户关系列表请求
|
|
||||||
type ListAccountRelationReq struct {
|
|
||||||
g.Meta `path:"/listAccountRelation" method:"post" tags:"腾讯广告账户关系" summary:"获取账户关系列表" dc:"从本地数据库查询账户关系列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAccountRelationRes 获取账户关系列表响应
|
|
||||||
type ListAccountRelationRes struct {
|
|
||||||
List []AccountRelationItem `json:"list" dc:"账户关系列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AccountRelationItem 账户关系项
|
|
||||||
type AccountRelationItem struct {
|
|
||||||
ID int64 `json:"id" dc:"主键ID"`
|
|
||||||
AccountID int64 `json:"account_id" dc:"账户ID"`
|
|
||||||
CorporationName string `json:"corporation_name" dc:"公司名称"`
|
|
||||||
IsAdx bool `json:"is_adx" dc:"是否ADX"`
|
|
||||||
IsBid bool `json:"is_bid" dc:"是否BID"`
|
|
||||||
IsMp bool `json:"is_mp" dc:"是否MP"`
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import "github.com/gogf/gf/v2/frame/g"
|
|
||||||
|
|
||||||
// SyncAudioReq 同步音乐素材请求
|
|
||||||
type SyncAudioReq struct {
|
|
||||||
g.Meta `path:"/syncAudio" method:"post" tags:"腾讯广告音乐素材" summary:"同步音乐素材" dc:"自动分页获取所有音乐素材并保存到数据库"`
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌(可选,不传则从配置读取)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListAudioReq 获取音乐素材列表请求
|
|
||||||
type ListAudioReq struct {
|
|
||||||
g.Meta `path:"/listAudio" method:"post" tags:"腾讯广告音乐素材" summary:"获取音乐素材列表" dc:"从本地数据库查询音乐素材列表"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncAudioRes 同步音乐素材响应
|
|
||||||
type SyncAudioRes struct {
|
|
||||||
TotalNumber int `json:"total_number" dc:"总记录数"`
|
|
||||||
TotalPage int `json:"total_page" dc:"总页数"`
|
|
||||||
SyncedCount int `json:"synced_count" dc:"同步成功数量"`
|
|
||||||
Message string `json:"message" dc:"消息"`
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import "github.com/gogf/gf/v2/frame/g"
|
|
||||||
|
|
||||||
// SyncImageReq 同步图片素材请求
|
|
||||||
type SyncImageReq struct {
|
|
||||||
g.Meta `path:"/syncImage" method:"post" tags:"腾讯广告图片素材" summary:"同步图片素材" dc:"遍历所有账户,自动分页获取图片素材并保存到数据库"`
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌(可选,不传则从配置读取)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncImageRes 同步图片素材响应
|
|
||||||
type SyncImageRes struct {
|
|
||||||
TotalAccounts int `json:"total_accounts" dc:"处理的账户数"`
|
|
||||||
TotalImages int `json:"total_images" dc:"总图片数"`
|
|
||||||
SyncedCount int `json:"synced_count" dc:"同步成功数量"`
|
|
||||||
Message string `json:"message" dc:"消息"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImageReq 获取图片素材列表请求(旧接口,无分页)
|
|
||||||
type ListImageReq struct {
|
|
||||||
g.Meta `path:"/listImage" method:"post" tags:"腾讯广告图片素材" summary:"获取图片素材列表" dc:"从本地数据库查询所有图片素材(无分页)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImagePageReq 分页查询图片素材请求
|
|
||||||
type ListImagePageReq struct {
|
|
||||||
g.Meta `path:"/listImagePage" method:"post" tags:"腾讯广告图片素材" summary:"分页查询图片素材" dc:"支持分页、时间过滤、账户过滤等条件查询"`
|
|
||||||
Page int `json:"page" dc:"页码" d:"1"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量" d:"20"`
|
|
||||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
|
||||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
|
||||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
|
||||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImageQueryReq 图片素材查询请求(Service层使用)
|
|
||||||
type ListImageQueryReq struct {
|
|
||||||
Page int `json:"page" dc:"页码"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量"`
|
|
||||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
|
||||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
|
||||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
|
||||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListImageRes 获取图片素材列表响应
|
|
||||||
type ListImageRes struct {
|
|
||||||
List []ImageItem `json:"list" dc:"图片素材列表"`
|
|
||||||
Total int `json:"total" dc:"总记录数"`
|
|
||||||
Page int `json:"page" dc:"当前页码"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量"`
|
|
||||||
TotalPages int `json:"total_pages" dc:"总页数"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ImageItem 图片素材项
|
|
||||||
type ImageItem struct {
|
|
||||||
Id int64 `json:"id" dc:"主键ID"`
|
|
||||||
ImageId string `json:"image_id" dc:"图片ID"`
|
|
||||||
AccountId int64 `json:"account_id" dc:"账户ID"`
|
|
||||||
Width int `json:"width" dc:"宽度"`
|
|
||||||
Height int `json:"height" dc:"高度"`
|
|
||||||
FileSize int64 `json:"file_size" dc:"文件大小"`
|
|
||||||
Type string `json:"type" dc:"图片类型"`
|
|
||||||
Signature string `json:"signature" dc:"签名"`
|
|
||||||
Description string `json:"description" dc:"描述"`
|
|
||||||
PreviewUrl string `json:"preview_url" dc:"预览URL"`
|
|
||||||
ThumbPreviewUrl string `json:"thumb_preview_url" dc:"缩略图URL"`
|
|
||||||
Status string `json:"status" dc:"状态"`
|
|
||||||
CreatedTime int64 `json:"created_time" dc:"创建时间戳"`
|
|
||||||
LastModifiedTime int64 `json:"last_modified_time" dc:"最后修改时间戳"`
|
|
||||||
CreatedAt string `json:"created_at" dc:"数据库创建时间"`
|
|
||||||
UpdatedAt string `json:"updated_at" dc:"数据库更新时间"`
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import "github.com/gogf/gf/v2/frame/g"
|
|
||||||
|
|
||||||
// RefreshTokenReq 刷新Token请求
|
|
||||||
type RefreshTokenReq struct {
|
|
||||||
g.Meta `path:"/refreshToken" method:"post" tags:"腾讯广告OAuth" summary:"刷新访问令牌" dc:"使用refresh_token获取新的access_token"`
|
|
||||||
ClientID string `json:"client_id" dc:"客户端ID"`
|
|
||||||
ClientSecret string `json:"client_secret" dc:"客户端密钥"`
|
|
||||||
RefreshToken string `json:"refresh_token" dc:"刷新令牌"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// RefreshTokenRes 刷新Token响应
|
|
||||||
type RefreshTokenRes struct {
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌"`
|
|
||||||
RefreshToken string `json:"refresh_token" dc:"新的刷新令牌"`
|
|
||||||
AccessTokenExpiresIn int64 `json:"access_token_expires_in" dc:"访问令牌过期时间(秒)"`
|
|
||||||
RefreshTokenExpiresIn int64 `json:"refresh_token_expires_in" dc:"刷新令牌过期时间(秒)"`
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import "github.com/gogf/gf/v2/frame/g"
|
|
||||||
|
|
||||||
// SyncVideoReq 同步视频素材请求
|
|
||||||
type SyncVideoReq struct {
|
|
||||||
g.Meta `path:"/syncVideo" method:"post" tags:"腾讯广告视频素材" summary:"同步视频素材" dc:"遍历所有账户,自动分页获取视频素材并保存到数据库"`
|
|
||||||
AccessToken string `json:"access_token" dc:"访问令牌(可选,不传则从配置读取)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SyncVideoRes 同步视频素材响应
|
|
||||||
type SyncVideoRes struct {
|
|
||||||
TotalAccounts int `json:"total_accounts" dc:"处理的账户数"`
|
|
||||||
TotalVideos int `json:"total_videos" dc:"总视频数"`
|
|
||||||
SyncedCount int `json:"synced_count" dc:"同步成功数量"`
|
|
||||||
Message string `json:"message" dc:"消息"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideoReq 获取视频素材列表请求(旧接口,无分页)
|
|
||||||
type ListVideoReq struct {
|
|
||||||
g.Meta `path:"/listVideo" method:"post" tags:"腾讯广告视频素材" summary:"获取视频素材列表" dc:"从本地数据库查询所有视频素材(无分页)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideoPageReq 分页查询视频素材请求
|
|
||||||
type ListVideoPageReq struct {
|
|
||||||
g.Meta `path:"/listVideoPage" method:"post" tags:"腾讯广告视频素材" summary:"分页查询视频素材" dc:"支持分页、时间过滤、账户过滤等条件查询"`
|
|
||||||
Page int `json:"page" dc:"页码" d:"1"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量" d:"20"`
|
|
||||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
|
||||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
|
||||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
|
||||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideoQueryReq 视频素材查询请求(Service层使用)
|
|
||||||
type ListVideoQueryReq struct {
|
|
||||||
Page int `json:"page" dc:"页码"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量"`
|
|
||||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
|
||||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
|
||||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
|
||||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListVideoRes 获取视频素材列表响应
|
|
||||||
type ListVideoRes struct {
|
|
||||||
List []VideoItem `json:"list" dc:"视频素材列表"`
|
|
||||||
Total int `json:"total" dc:"总记录数"`
|
|
||||||
Page int `json:"page" dc:"当前页码"`
|
|
||||||
PageSize int `json:"page_size" dc:"每页数量"`
|
|
||||||
TotalPages int `json:"total_pages" dc:"总页数"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// VideoItem 视频素材项
|
|
||||||
type VideoItem struct {
|
|
||||||
Id int64 `json:"id" dc:"主键ID"`
|
|
||||||
VideoId string `json:"video_id" dc:"视频ID"`
|
|
||||||
AccountId int64 `json:"account_id" dc:"账户ID"`
|
|
||||||
Width int `json:"width" dc:"宽度"`
|
|
||||||
Height int `json:"height" dc:"高度"`
|
|
||||||
VideoFrames int `json:"video_frames" dc:"视频帧数"`
|
|
||||||
VideoFps int `json:"video_fps" dc:"帧率"`
|
|
||||||
FileSize int64 `json:"file_size" dc:"文件大小"`
|
|
||||||
Type string `json:"type" dc:"媒体类型"`
|
|
||||||
Description string `json:"description" dc:"描述"`
|
|
||||||
PreviewUrl string `json:"preview_url" dc:"预览URL"`
|
|
||||||
KeyFrameImageUrl string `json:"key_frame_image_url" dc:"关键帧图片URL"`
|
|
||||||
Status string `json:"status" dc:"状态"`
|
|
||||||
CreatedTime int64 `json:"created_time" dc:"创建时间戳"`
|
|
||||||
LastModifiedTime int64 `json:"last_modified_time" dc:"最后修改时间戳"`
|
|
||||||
CreatedAt string `json:"created_at" dc:"数据库创建时间"`
|
|
||||||
UpdatedAt string `json:"updated_at" dc:"数据库更新时间"`
|
|
||||||
}
|
|
||||||
@@ -1,667 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CidAccountReportDetail 广告数据报表详情实体
|
|
||||||
type CidAccountReportDetail struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 基础信息字段
|
|
||||||
DataType string `orm:"data_type" json:"dataType" description:"类型type"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
T0OrderPaymentAmt string `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面URL"`
|
|
||||||
CoverId int64 `orm:"cover_id" json:"coverId" description:"封面Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频id"`
|
|
||||||
|
|
||||||
// 受众属性字段
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品5秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品3秒播放率"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
|
|
||||||
// 商品信息字段
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
|
|
||||||
// 点击相关字段
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长字段
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 播放数据字段
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品3秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品3秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品5秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品5秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
|
|
||||||
// 互动数据字段
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动字段
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
|
|
||||||
// 播放效果字段
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化字段
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接GMV"`
|
|
||||||
|
|
||||||
// GMV时间序列字段
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计GMV"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3日累计GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7日累计GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15日累计GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30日累计GMV"`
|
|
||||||
|
|
||||||
// ROI时间序列字段
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计ROI"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3日累计ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7日累计ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15日累计ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30日累计ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30日累计订单数"`
|
|
||||||
|
|
||||||
// 粉丝相关字段
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约字段
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看字段
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
|
|
||||||
// 商品点击字段
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30日累计店铺新客"`
|
|
||||||
|
|
||||||
// 间接订单字段
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额字段
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本字段
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝GMV字段
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉7日GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉15日GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉30日GMV"`
|
|
||||||
|
|
||||||
// 粉丝ROI字段
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉7日ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉15日ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉30日ROI"`
|
|
||||||
|
|
||||||
// 新客GMV字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后1日新客GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后3日新客GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后7日新客GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后15日新客GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后30日新客GMV"`
|
|
||||||
|
|
||||||
// 新客订单量字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后1日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后3日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后7日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后15日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后30日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后1日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后3日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后7日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后15日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后30日新客复购率"`
|
|
||||||
|
|
||||||
// 新客ROI字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后1日新客ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后3日新客ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后7日新客ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后15日新客ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后30日新客ROI"`
|
|
||||||
|
|
||||||
// 电话卡相关字段
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string
|
|
||||||
|
|
||||||
// 分页字段
|
|
||||||
PageNumber string
|
|
||||||
|
|
||||||
// 广告结构字段
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
|
|
||||||
// 补贴相关字段
|
|
||||||
CidActualRoiAfterSubsidy *float64
|
|
||||||
CidCouponAmount *int64
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64
|
|
||||||
CidVoucherCost *float64
|
|
||||||
}
|
|
||||||
|
|
||||||
// CidAccountReportDetailCol 广告数据报表详情表字段定义
|
|
||||||
type CidAccountReportDetailCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
DataType string
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T3Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T3Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T3OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CidAccountReportDetail) TableName() string {
|
|
||||||
return "cid_account_report_detail"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CidAccountReportDetail) GetCols() *CidAccountReportDetailCol {
|
|
||||||
return &CidAccountReportDetailCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
DataType: "data_type",
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,670 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CidAccountReportSum 广告数据报表详情实体
|
|
||||||
type CidAccountReportSum struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 基础信息字段
|
|
||||||
DataType string `orm:"data_type" json:"dataType" description:"类型type"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
T0OrderPaymentAmt string `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面URL"`
|
|
||||||
CoverId int64 `orm:"cover_id" json:"coverId" description:"封面Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频id"`
|
|
||||||
|
|
||||||
// 受众属性字段
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品5秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品3秒播放率"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
|
|
||||||
// 商品信息字段
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
|
|
||||||
// 点击相关字段
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长字段
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 播放数据字段
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品3秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品3秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品5秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品5秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
|
|
||||||
// 互动数据字段
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动字段
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
|
|
||||||
// 播放效果字段
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化字段
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接GMV"`
|
|
||||||
|
|
||||||
// GMV时间序列字段
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计GMV"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3日累计GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7日累计GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15日累计GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30日累计GMV"`
|
|
||||||
|
|
||||||
// ROI时间序列字段
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计ROI"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3日累计ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7日累计ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15日累计ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30日累计ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30日累计订单数"`
|
|
||||||
|
|
||||||
// 粉丝相关字段
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约字段
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看字段
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
|
|
||||||
// 商品点击字段
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30日累计店铺新客"`
|
|
||||||
|
|
||||||
// 间接订单字段
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额字段
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本字段
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝GMV字段
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉7日GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉15日GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉30日GMV"`
|
|
||||||
|
|
||||||
// 粉丝ROI字段
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉7日ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉15日ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉30日ROI"`
|
|
||||||
|
|
||||||
// 新客GMV字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后1日新客GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后3日新客GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后7日新客GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后15日新客GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后30日新客GMV"`
|
|
||||||
|
|
||||||
// 新客订单量字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后1日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后3日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后7日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后15日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后30日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后1日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后3日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后7日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后15日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后30日新客复购率"`
|
|
||||||
|
|
||||||
// 新客ROI字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后1日新客ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后3日新客ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后7日新客ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后15日新客ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后30日新客ROI"`
|
|
||||||
|
|
||||||
// 电话卡相关字段
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
|
|
||||||
// 分页字段
|
|
||||||
PageNumber int `orm:"page_number" json:"pageNumber" description:"页码"`
|
|
||||||
|
|
||||||
// 广告结构字段
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
|
|
||||||
// 补贴相关字段
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CidAccountReportSumCol 广告数据报表详情表字段定义
|
|
||||||
type CidAccountReportSumCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
DataType string
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T3Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T3Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T3OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
// model/entity/cid_account_report_detail.go (续)
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
PageNumber string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CidAccountReportSum) TableName() string {
|
|
||||||
return "cid_account_report_detail"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CidAccountReportSum) GetCols() *CidAccountReportSumCol {
|
|
||||||
return &CidAccountReportSumCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
DataType: "data_type",
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
PageNumber: "page_number",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,582 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CampaignReportDetail 广告效果指标明细表实体
|
|
||||||
type CampaignReportDetail struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CampaignReportDetailCol 广告效果指标明细表字段定义
|
|
||||||
type CampaignReportDetailCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T3Gmv string
|
|
||||||
T3OrderCnt string
|
|
||||||
T3Roi string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CampaignReportDetail) TableName() string {
|
|
||||||
return "campaign_report_detail"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CampaignReportDetail) GetCols() *CampaignReportDetailCol {
|
|
||||||
return &CampaignReportDetailCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,582 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CampaignReportSum 广告计划效果指标表实体
|
|
||||||
type CampaignReportSum struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CampaignReportSumCol 广告计划效果指标表字段定义
|
|
||||||
type CampaignReportSumCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T3Gmv string
|
|
||||||
T3OrderCnt string
|
|
||||||
T3Roi string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CampaignReportSum) TableName() string {
|
|
||||||
return "campaign_report_sum"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CampaignReportSum) GetCols() *CampaignReportSumCol {
|
|
||||||
return &CampaignReportSumCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,582 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CreativeReportDetail 广告效果指标明细表实体
|
|
||||||
type CreativeReportDetail struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreativeReportDetailCol 广告效果指标明细表字段定义
|
|
||||||
type CreativeReportDetailCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T3Gmv string
|
|
||||||
T3OrderCnt string
|
|
||||||
T3Roi string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CreativeReportDetail) TableName() string {
|
|
||||||
return "creative_report_detail"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CreativeReportDetail) GetCols() *CreativeReportDetailCol {
|
|
||||||
return &CreativeReportDetailCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,687 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// CreativeReportSum 广告效果指标表实体
|
|
||||||
type CreativeReportSum struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 订单金额相关字段
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
|
|
||||||
// 素材类型字段
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
|
|
||||||
// 直播相关字段
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
|
|
||||||
// 图片相关字段
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
|
|
||||||
// 成本相关字段
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
|
|
||||||
// 净成交相关字段
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频相关字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
|
|
||||||
// 用户属性相关字段
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
|
|
||||||
// 订单提交相关字段
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
|
|
||||||
// 用户行为相关字段
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
|
|
||||||
// 转化成本相关字段
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
|
|
||||||
// 商品相关字段
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
|
|
||||||
// 曝光相关字段
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
|
|
||||||
// 行为相关字段
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长相关字段
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 作品播放相关字段
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
|
|
||||||
// 作品互动相关字段
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动相关字段
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
|
|
||||||
// 有效播放相关字段
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化相关字段
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
|
|
||||||
// 累计 GMV 相关字段
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
|
|
||||||
// 累计 ROI 相关字段
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
|
|
||||||
// 涨粉相关字段
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约相关字段
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
|
|
||||||
// 直播间商品相关字段
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
|
|
||||||
// 3 日累计相关字段
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
|
|
||||||
// 7 日间接订单相关字段
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额相关字段
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本相关字段
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券相关字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝 GMV 相关字段
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
|
|
||||||
// 粉丝 ROI 相关字段
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
|
|
||||||
// 新客 GMV 相关字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
|
|
||||||
// 新客订单数相关字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率相关字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
|
|
||||||
// 新客 ROI 相关字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
|
|
||||||
// 制卡订单相关字段
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
|
|
||||||
// 电话卡激活相关字段
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
|
|
||||||
// 制卡订单率相关字段
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
|
|
||||||
// 电话卡激活率相关字段
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
|
|
||||||
// 报告日期字段
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
|
|
||||||
// 广告计划相关字段
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
|
|
||||||
// 广告单元相关字段
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
|
|
||||||
// 广告创意相关字段
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
|
|
||||||
// 新增字段
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreativeReportSumCol 广告效果指标表字段定义
|
|
||||||
type CreativeReportSumCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T3Gmv string
|
|
||||||
T3OrderCnt string
|
|
||||||
T3Roi string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
CidActualRoiAfterSubsidy string
|
|
||||||
CidCouponAmount string
|
|
||||||
CidCouponCallbackPaidRefundAmount string
|
|
||||||
CidVoucherCost string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *CreativeReportSum) TableName() string {
|
|
||||||
return "creative_report_sum"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *CreativeReportSum) GetCols() *CreativeReportSumCol {
|
|
||||||
return &CreativeReportSumCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
CidActualRoiAfterSubsidy: "cid_actual_roi_after_subsidy",
|
|
||||||
CidCouponAmount: "cid_coupon_amount",
|
|
||||||
CidCouponCallbackPaidRefundAmount: "cid_coupon_callback_paid_refund_amount",
|
|
||||||
CidVoucherCost: "cid_voucher_cost",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,576 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// MaterialReport 素材报表数据实体
|
|
||||||
type MaterialReport struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
CreatedBy *string `orm:"created_by" json:"createdBy" description:"创建人"`
|
|
||||||
UpdatedBy *string `orm:"updated_by" json:"updatedBy" description:"更新人"`
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日订单支付金额"`
|
|
||||||
CreativeMaterialType *string `orm:"creative_material_type" json:"creativeMaterialType" description:"创意素材类型"`
|
|
||||||
LiveName *string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId *string `orm:"author_id" json:"authorId" description:"作者 ID"`
|
|
||||||
PicUrl *string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName *string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId *string `orm:"pic_id" json:"picId" description:"图片 ID"`
|
|
||||||
CoverUrl *string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 ID"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"商品订单转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"商品卡点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"商家涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"商家涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"当日净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"当日净成交 GMV"`
|
|
||||||
PhotoName *string `orm:"photo_name" json:"photoName" description:"照片名称"`
|
|
||||||
PhotoIdStr *string `orm:"photo_id_str" json:"photoIdStr" description:"照片 ID 字符串"`
|
|
||||||
PhotoId *string `orm:"photo_id" json:"photoId" description:"照片 ID"`
|
|
||||||
ModPriceSegment *string `orm:"mod_price_segment" json:"modPriceSegment" description:"价格区间"`
|
|
||||||
AgeSegment *string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province *string `orm:"province" json:"province" description:"省份"`
|
|
||||||
Gender *string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"广告照片播放 5 秒比率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"广告照片播放 3 秒比率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"提交订单 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"提交订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"事件订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"事件订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"事件订单支付 ROI"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"事件 APP 调用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"事件加购数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化数量成本"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"广告有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"广告商品点击数"`
|
|
||||||
MerchantProductId *string `orm:"merchant_product_id" json:"merchantProductId" description:"商家商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"总花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"广告展示数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"千次展示成本"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"照片点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"照片点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"点击数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"操作栏点击数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"操作栏点击成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"ESP 点击率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"操作比率"`
|
|
||||||
AdItemCount *int64 `orm:"ad_item_click_count" json:"adItemCount" description:"广告商品点击次数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"ESP 直播播放秒数"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"播放 3 秒数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"播放 5 秒数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"播放结束数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"商品负反馈数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播分享数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播打赏数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本 ESP"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"支付订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"订单比率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"当日订单比率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"商家推荐粉丝数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日留存率"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日留存率"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日留存率"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日留存率"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日留存比率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日留存比率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日留存比率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日留存比率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"预约成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"标准直播开始数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"广告直播播放数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"广告直播播放成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观众成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播事件商品浏览数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接吸引平台新买家数"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日吸引平台总买家数"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接吸引商家新买家数"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日吸引商家总买家数"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"粉丝当日人均 GMV"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"粉丝 3 日人均 GMV"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"粉丝 7 日人均 GMV"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"粉丝 15 日人均 GMV"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"粉丝 30 日人均 GMV"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"推荐粉丝成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"白盒直接订单支付金额"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"白盒直接订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"粉丝当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"粉丝次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"粉丝 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"粉丝 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"粉丝 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"粉丝当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"粉丝次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"粉丝 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"粉丝 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"粉丝 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日店铺新客订单支付金额"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"次日店铺新客订单支付金额"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"3 日店铺新客订单支付金额"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"7 日店铺新客订单支付金额"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"15 日店铺新客订单支付金额"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"30 日店铺新客订单支付金额"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日店铺新客订单数"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"次日店铺新客订单数"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"3 日店铺新客订单数"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"7 日店铺新客订单数"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"15 日店铺新客订单数"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"30 日店铺新客订单数"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"次日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"当日店铺新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"次日店铺新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"3 日店铺新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"7 日店铺新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"15 日店铺新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"30 日店铺新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"创建卡片订单数"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"转发 TS 创建卡片订单数"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"创建卡片订单成本"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"转发 TS 创建卡片订单成本"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"激活卡片订单数"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"转发 TS 激活卡片订单数"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"激活卡片订单成本"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"转发 TS 激活卡片订单成本"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"创建卡片订单比率"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"转发 TS 创建卡片订单比率"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"激活卡片订单比率"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"转发 TS 激活卡片订单比率"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"直播播放数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"商品入口点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"展示数"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"报告日期(格式:YYYY-MM-DD)"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName *string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName *string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName *string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// MaterialReportCol 素材报表数据表字段定义
|
|
||||||
type MaterialReportCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
CreatedBy string
|
|
||||||
UpdatedBy string
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T3Gmv string
|
|
||||||
T3OrderCnt string
|
|
||||||
T3Roi string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *MaterialReport) TableName() string {
|
|
||||||
return "material_report"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *MaterialReport) GetCols() *MaterialReportCol {
|
|
||||||
return &MaterialReportCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
CreatedBy: "created_by",
|
|
||||||
UpdatedBy: "updated_by",
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T3OrderCnt: "t3_order_cnt",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,578 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// PopulationReport 人群报表实体
|
|
||||||
type PopulationReport struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 基础信息字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间"`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"性别"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
|
|
||||||
// 广告结构字段
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
|
|
||||||
// 播放率相关字段
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
|
|
||||||
// 点击相关字段
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
|
|
||||||
// 直播时长字段
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
|
|
||||||
// 播放数据字段
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
|
|
||||||
// 互动数据字段
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
|
|
||||||
// 直播互动字段
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
|
|
||||||
// 播放效果字段
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
|
|
||||||
// 转化字段
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
|
|
||||||
// GMV 时间序列字段
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
|
|
||||||
// ROI 时间序列字段
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
|
|
||||||
// 订单相关字段
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
|
|
||||||
// 粉丝相关字段
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
|
|
||||||
// 直播预约字段
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
|
|
||||||
// 直播观看字段
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
|
|
||||||
// 商品点击字段
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
|
|
||||||
// 新客相关字段
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
|
|
||||||
// 间接订单字段
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
|
|
||||||
// 粉丝人均销售额字段
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
|
|
||||||
// 涨粉成本字段
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
|
|
||||||
// 智能优惠券字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 粉丝 GMV 字段
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
|
|
||||||
// 粉丝 ROI 字段
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
|
|
||||||
// 新客 GMV 字段
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
|
|
||||||
// 新客订单量字段
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
|
|
||||||
// 新客复购率字段
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
|
|
||||||
// 新客 ROI 字段
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
|
|
||||||
// 电话卡相关字段
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PopulationReportCol 人群报表字段定义
|
|
||||||
type PopulationReportCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
ModPriceSegment string
|
|
||||||
AgeSegment string
|
|
||||||
Province string
|
|
||||||
Gender string
|
|
||||||
MerchantProductId string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
AdPhotoPlayedFiveRatio string
|
|
||||||
AdPhotoPlayedThreeRatio string
|
|
||||||
OrderSubmitRoi string
|
|
||||||
OrderSubmitAmt string
|
|
||||||
EventOrderSubmitCost string
|
|
||||||
EventOrderSubmit string
|
|
||||||
EventOrderPaidRoi string
|
|
||||||
EventAppInvoked string
|
|
||||||
EventAddShoppingCart string
|
|
||||||
ConversionNumCost string
|
|
||||||
AdEffectivePlayNum string
|
|
||||||
AdItemClick string
|
|
||||||
CostTotal string
|
|
||||||
AdShow string
|
|
||||||
AdShow1kCost string
|
|
||||||
Impression string
|
|
||||||
PhotoClick string
|
|
||||||
PhotoClickRatio string
|
|
||||||
Click string
|
|
||||||
ActionbarClick string
|
|
||||||
ActionbarClickCost string
|
|
||||||
EspClickRatio string
|
|
||||||
ActionRatio string
|
|
||||||
AdItemClickCount string
|
|
||||||
EspLivePlayedSeconds string
|
|
||||||
PlayedThreeSeconds string
|
|
||||||
Play3sRatio string
|
|
||||||
PlayedFiveSeconds string
|
|
||||||
Play5sRatio string
|
|
||||||
PlayedEnd string
|
|
||||||
PlayEndRatio string
|
|
||||||
Share string
|
|
||||||
Comment string
|
|
||||||
Likes string
|
|
||||||
Report string
|
|
||||||
Block string
|
|
||||||
ItemNegative string
|
|
||||||
LiveShare string
|
|
||||||
LiveComment string
|
|
||||||
LiveReward string
|
|
||||||
EffectivePlayCount string
|
|
||||||
EffectivePlayRatio string
|
|
||||||
ConversionNum string
|
|
||||||
ConversionCostEsp string
|
|
||||||
Roi string
|
|
||||||
Gmv string
|
|
||||||
T0Gmv string
|
|
||||||
T1Gmv string
|
|
||||||
T3Gmv string
|
|
||||||
T7Gmv string
|
|
||||||
T15Gmv string
|
|
||||||
T30Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T1Roi string
|
|
||||||
T3Roi string
|
|
||||||
T7Roi string
|
|
||||||
T15Roi string
|
|
||||||
T30Roi string
|
|
||||||
PaiedOrder string
|
|
||||||
OrderRatio string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
T0OrderCntRatio string
|
|
||||||
T1OrderCnt string
|
|
||||||
T7OrderCnt string
|
|
||||||
T15OrderCnt string
|
|
||||||
T30OrderCnt string
|
|
||||||
MerchantRecoFans string
|
|
||||||
T1Retention string
|
|
||||||
T7Retention string
|
|
||||||
T15Retention string
|
|
||||||
T30Retention string
|
|
||||||
T1RetentionRatio string
|
|
||||||
T7RetentionRatio string
|
|
||||||
T15RetentionRatio string
|
|
||||||
T30RetentionRatio string
|
|
||||||
ReservationSuccess string
|
|
||||||
ReservationCost string
|
|
||||||
StandardLivePlayedStarted string
|
|
||||||
AdLivePlayCnt string
|
|
||||||
AdLivePlayCntCost string
|
|
||||||
LiveAudienceCost string
|
|
||||||
LiveEventGoodsView string
|
|
||||||
GoodsClickRatio string
|
|
||||||
DirectAttrPlatNewBuyerCnt string
|
|
||||||
T30AttrPlatTotalBuyerCnt string
|
|
||||||
DirectAttrSellerNewBuyerCnt string
|
|
||||||
T30AttrSellerTotalBuyerCnt string
|
|
||||||
T7IndirectOrderAmt string
|
|
||||||
T7IndirectOrderCnt string
|
|
||||||
FansT0GmvPerFans string
|
|
||||||
FansT3GmvPerFans string
|
|
||||||
FansT7GmvPerFans string
|
|
||||||
FansT15GmvPerFans string
|
|
||||||
FansT30GmvPerFans string
|
|
||||||
RecoFansCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt string
|
|
||||||
T0ShopNewBuyerOrderCnt string
|
|
||||||
T1ShopNewBuyerOrderCnt string
|
|
||||||
T3ShopNewBuyerOrderCnt string
|
|
||||||
T7ShopNewBuyerOrderCnt string
|
|
||||||
T15ShopNewBuyerOrderCnt string
|
|
||||||
T30ShopNewBuyerOrderCnt string
|
|
||||||
T1NewBuyerRepurchaseRatio string
|
|
||||||
T3NewBuyerRepurchaseRatio string
|
|
||||||
T7NewBuyerRepurchaseRatio string
|
|
||||||
T15NewBuyerRepurchaseRatio string
|
|
||||||
T30NewBuyerRepurchaseRatio string
|
|
||||||
T0ShopNewBuyerRoi string
|
|
||||||
T1ShopNewBuyerRoi string
|
|
||||||
T3ShopNewBuyerRoi string
|
|
||||||
T7ShopNewBuyerRoi string
|
|
||||||
T15ShopNewBuyerRoi string
|
|
||||||
T30ShopNewBuyerRoi string
|
|
||||||
CreateCardOrderCnt string
|
|
||||||
ForwardTsCreateCardOrderCnt string
|
|
||||||
CreateCardOrderCost string
|
|
||||||
ForwardTsCreateCardOrderCost string
|
|
||||||
ActivateCardOrderCnt string
|
|
||||||
ForwardTsActivateCardOrderCnt string
|
|
||||||
ActivateCardOrderCost string
|
|
||||||
ForwardTsActivateCardOrderCost string
|
|
||||||
CreateCardOrderRatio string
|
|
||||||
ForwardTsCreateCardOrderRatio string
|
|
||||||
ActivateCardOrderCntRatio string
|
|
||||||
ForwardTsActivateCardOrderRatio string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *PopulationReport) TableName() string {
|
|
||||||
return "population_report"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *PopulationReport) GetCols() *PopulationReportCol {
|
|
||||||
return &PopulationReportCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
ModPriceSegment: "mod_price_segment",
|
|
||||||
AgeSegment: "age_segment",
|
|
||||||
Province: "province",
|
|
||||||
Gender: "gender",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
AdPhotoPlayedFiveRatio: "ad_photo_played_five_ratio",
|
|
||||||
AdPhotoPlayedThreeRatio: "ad_photo_played_three_ratio",
|
|
||||||
OrderSubmitRoi: "order_submit_roi",
|
|
||||||
OrderSubmitAmt: "order_submit_amt",
|
|
||||||
EventOrderSubmitCost: "event_order_submit_cost",
|
|
||||||
EventOrderSubmit: "event_order_submit",
|
|
||||||
EventOrderPaidRoi: "event_order_paid_roi",
|
|
||||||
EventAppInvoked: "event_app_invoked",
|
|
||||||
EventAddShoppingCart: "event_add_shopping_cart",
|
|
||||||
ConversionNumCost: "conversion_num_cost",
|
|
||||||
AdEffectivePlayNum: "ad_effective_play_num",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
AdShow: "ad_show",
|
|
||||||
AdShow1kCost: "ad_show1k_cost",
|
|
||||||
Impression: "impression",
|
|
||||||
PhotoClick: "photo_click",
|
|
||||||
PhotoClickRatio: "photo_click_ratio",
|
|
||||||
Click: "click",
|
|
||||||
ActionbarClick: "actionbar_click",
|
|
||||||
ActionbarClickCost: "actionbar_click_cost",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
ActionRatio: "action_ratio",
|
|
||||||
AdItemClickCount: "ad_item_click_count",
|
|
||||||
EspLivePlayedSeconds: "esp_live_played_seconds",
|
|
||||||
PlayedThreeSeconds: "played_three_seconds",
|
|
||||||
Play3sRatio: "play3s_ratio",
|
|
||||||
PlayedFiveSeconds: "played_five_seconds",
|
|
||||||
Play5sRatio: "play5s_ratio",
|
|
||||||
PlayedEnd: "played_end",
|
|
||||||
PlayEndRatio: "play_end_ratio",
|
|
||||||
Share: "share",
|
|
||||||
Comment: "comment",
|
|
||||||
Likes: "likes",
|
|
||||||
Report: "report",
|
|
||||||
Block: "block",
|
|
||||||
ItemNegative: "item_negative",
|
|
||||||
LiveShare: "live_share",
|
|
||||||
LiveComment: "live_comment",
|
|
||||||
LiveReward: "live_reward",
|
|
||||||
EffectivePlayCount: "effective_play_count",
|
|
||||||
EffectivePlayRatio: "effective_play_ratio",
|
|
||||||
ConversionNum: "conversion_num",
|
|
||||||
ConversionCostEsp: "conversion_cost_esp",
|
|
||||||
Roi: "roi",
|
|
||||||
Gmv: "gmv",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T1Gmv: "t1_gmv",
|
|
||||||
T3Gmv: "t3_gmv",
|
|
||||||
T7Gmv: "t7_gmv",
|
|
||||||
T15Gmv: "t15_gmv",
|
|
||||||
T30Gmv: "t30_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T1Roi: "t1_roi",
|
|
||||||
T3Roi: "t3_roi",
|
|
||||||
T7Roi: "t7_roi",
|
|
||||||
T15Roi: "t15_roi",
|
|
||||||
T30Roi: "t30_roi",
|
|
||||||
PaiedOrder: "paied_order",
|
|
||||||
OrderRatio: "order_ratio",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
T0OrderCntRatio: "t0_order_cnt_ratio",
|
|
||||||
T1OrderCnt: "t1_order_cnt",
|
|
||||||
T7OrderCnt: "t7_order_cnt",
|
|
||||||
T15OrderCnt: "t15_order_cnt",
|
|
||||||
T30OrderCnt: "t30_order_cnt",
|
|
||||||
MerchantRecoFans: "merchant_reco_fans",
|
|
||||||
T1Retention: "t1_retention",
|
|
||||||
T7Retention: "t7_retention",
|
|
||||||
T15Retention: "t15_retention",
|
|
||||||
T30Retention: "t30_retention",
|
|
||||||
T1RetentionRatio: "t1_retention_ratio",
|
|
||||||
T7RetentionRatio: "t7_retention_ratio",
|
|
||||||
T15RetentionRatio: "t15_retention_ratio",
|
|
||||||
T30RetentionRatio: "t30_retention_ratio",
|
|
||||||
ReservationSuccess: "reservation_success",
|
|
||||||
ReservationCost: "reservation_cost",
|
|
||||||
StandardLivePlayedStarted: "standard_live_played_started",
|
|
||||||
AdLivePlayCnt: "ad_live_play_cnt",
|
|
||||||
AdLivePlayCntCost: "ad_live_play_cnt_cost",
|
|
||||||
LiveAudienceCost: "live_audience_cost",
|
|
||||||
LiveEventGoodsView: "live_event_goods_view",
|
|
||||||
GoodsClickRatio: "goods_click_ratio",
|
|
||||||
DirectAttrPlatNewBuyerCnt: "direct_attr_plat_new_buyer_cnt",
|
|
||||||
T30AttrPlatTotalBuyerCnt: "t30_attr_plat_total_buyer_cnt",
|
|
||||||
DirectAttrSellerNewBuyerCnt: "direct_attr_seller_new_buyer_cnt",
|
|
||||||
T30AttrSellerTotalBuyerCnt: "t30_attr_seller_total_buyer_cnt",
|
|
||||||
T7IndirectOrderAmt: "t7_indirect_order_amt",
|
|
||||||
T7IndirectOrderCnt: "t7_indirect_order_cnt",
|
|
||||||
FansT0GmvPerFans: "fans_t0_gmv_per_fans",
|
|
||||||
FansT3GmvPerFans: "fans_t3_gmv_per_fans",
|
|
||||||
FansT7GmvPerFans: "fans_t7_gmv_per_fans",
|
|
||||||
FansT15GmvPerFans: "fans_t15_gmv_per_fans",
|
|
||||||
FansT30GmvPerFans: "fans_t30_gmv_per_fans",
|
|
||||||
RecoFansCost: "reco_fans_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: "t0_shop_new_buyer_order_payment_amt",
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: "t1_shop_new_buyer_order_payment_amt",
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: "t3_shop_new_buyer_order_payment_amt",
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: "t7_shop_new_buyer_order_payment_amt",
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: "t15_shop_new_buyer_order_payment_amt",
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: "t30_shop_new_buyer_order_payment_amt",
|
|
||||||
T0ShopNewBuyerOrderCnt: "t0_shop_new_buyer_order_cnt",
|
|
||||||
T1ShopNewBuyerOrderCnt: "t1_shop_new_buyer_order_cnt",
|
|
||||||
T3ShopNewBuyerOrderCnt: "t3_shop_new_buyer_order_cnt",
|
|
||||||
T7ShopNewBuyerOrderCnt: "t7_shop_new_buyer_order_cnt",
|
|
||||||
T15ShopNewBuyerOrderCnt: "t15_shop_new_buyer_order_cnt",
|
|
||||||
T30ShopNewBuyerOrderCnt: "t30_shop_new_buyer_order_cnt",
|
|
||||||
T1NewBuyerRepurchaseRatio: "t1_new_buyer_repurchase_ratio",
|
|
||||||
T3NewBuyerRepurchaseRatio: "t3_new_buyer_repurchase_ratio",
|
|
||||||
T7NewBuyerRepurchaseRatio: "t7_new_buyer_repurchase_ratio",
|
|
||||||
T15NewBuyerRepurchaseRatio: "t15_new_buyer_repurchase_ratio",
|
|
||||||
T30NewBuyerRepurchaseRatio: "t30_new_buyer_repurchase_ratio",
|
|
||||||
T0ShopNewBuyerRoi: "t0_shop_new_buyer_roi",
|
|
||||||
T1ShopNewBuyerRoi: "t1_shop_new_buyer_roi",
|
|
||||||
T3ShopNewBuyerRoi: "t3_shop_new_buyer_roi",
|
|
||||||
T7ShopNewBuyerRoi: "t7_shop_new_buyer_roi",
|
|
||||||
T15ShopNewBuyerRoi: "t15_shop_new_buyer_roi",
|
|
||||||
T30ShopNewBuyerRoi: "t30_shop_new_buyer_roi",
|
|
||||||
CreateCardOrderCnt: "create_card_order_cnt",
|
|
||||||
ForwardTsCreateCardOrderCnt: "forward_ts_create_card_order_cnt",
|
|
||||||
CreateCardOrderCost: "create_card_order_cost",
|
|
||||||
ForwardTsCreateCardOrderCost: "forward_ts_create_card_order_cost",
|
|
||||||
ActivateCardOrderCnt: "activate_card_order_cnt",
|
|
||||||
ForwardTsActivateCardOrderCnt: "forward_ts_activate_card_order_cnt",
|
|
||||||
ActivateCardOrderCost: "activate_card_order_cost",
|
|
||||||
ForwardTsActivateCardOrderCost: "forward_ts_activate_card_order_cost",
|
|
||||||
CreateCardOrderRatio: "create_card_order_ratio",
|
|
||||||
ForwardTsCreateCardOrderRatio: "forward_ts_create_card_order_ratio",
|
|
||||||
ActivateCardOrderCntRatio: "activate_card_order_cnt_ratio",
|
|
||||||
ForwardTsActivateCardOrderRatio: "forward_ts_activate_card_order_ratio",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// StorewideReportDetail 广告效果指标表实体
|
|
||||||
type StorewideReportDetail struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 订单金额相关字段
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
|
|
||||||
// 素材类型字段
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
|
|
||||||
// 直播相关字段
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
|
|
||||||
// 图片相关字段
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
|
|
||||||
// 封面相关字段
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
|
|
||||||
// 商品卡点击相关字段
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
|
|
||||||
// 净成交相关字段
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频相关字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
|
|
||||||
// 行为相关字段
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
|
|
||||||
// 商品相关字段
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
|
|
||||||
// 花费相关字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
|
|
||||||
// 行为率字段
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
|
|
||||||
// 当日 GMV 相关字段
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
|
|
||||||
// 当日订单相关字段
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
|
|
||||||
// 智能优惠券相关字段
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
|
|
||||||
// 直播观看相关字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
|
|
||||||
// 商品入口点击相关字段
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
|
|
||||||
// 曝光相关字段
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
|
|
||||||
// 报告日期字段
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
|
|
||||||
// 广告计划相关字段
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
|
|
||||||
// 广告单元相关字段
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
|
|
||||||
// 广告创意相关字段
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StorewideReportDetailCol 广告效果指标表表字段定义
|
|
||||||
type StorewideReportDetailCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
EspClickRatio string
|
|
||||||
T0Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *StorewideReportDetail) TableName() string {
|
|
||||||
return "storewide_report_detail"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *StorewideReportDetail) GetCols() *StorewideReportDetailCol {
|
|
||||||
return &StorewideReportDetailCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// StorewideReportSum 广告效果指标表实体
|
|
||||||
type StorewideReportSum struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 新增字段
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 原有字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StorewideReportSumCol 广告效果指标表表字段定义
|
|
||||||
type StorewideReportSumCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
T0OrderPaymentAmt string
|
|
||||||
CreativeMaterialType string
|
|
||||||
LiveName string
|
|
||||||
AuthorId string
|
|
||||||
PicUrl string
|
|
||||||
PicName string
|
|
||||||
PicId string
|
|
||||||
CoverUrl string
|
|
||||||
CoverId string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoIdStr string
|
|
||||||
PhotoId string
|
|
||||||
AdItemClick string
|
|
||||||
MerchantProductId string
|
|
||||||
CostTotal string
|
|
||||||
EspClickRatio string
|
|
||||||
T0Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt string
|
|
||||||
QcpxWhiteboxDirectOrderCnt string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
CampaignId string
|
|
||||||
CampaignName string
|
|
||||||
UnitId string
|
|
||||||
UnitName string
|
|
||||||
CreativeId string
|
|
||||||
CreativeName string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *StorewideReportSum) TableName() string {
|
|
||||||
return "storewide_report_sum"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *StorewideReportSum) GetCols() *StorewideReportSumCol {
|
|
||||||
return &StorewideReportSumCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
T0OrderPaymentAmt: "t0_order_payment_amt",
|
|
||||||
CreativeMaterialType: "creative_material_type",
|
|
||||||
LiveName: "live_name",
|
|
||||||
AuthorId: "author_id",
|
|
||||||
PicUrl: "pic_url",
|
|
||||||
PicName: "pic_name",
|
|
||||||
PicId: "pic_id",
|
|
||||||
CoverUrl: "cover_url",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoIdStr: "photo_id_str",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
AdItemClick: "ad_item_click",
|
|
||||||
MerchantProductId: "merchant_product_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
EspClickRatio: "esp_click_ratio",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: "qcpx_whitebox_direct_order_payment_amt",
|
|
||||||
QcpxWhiteboxDirectOrderCnt: "qcpx_whitebox_direct_order_cnt",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
CampaignId: "campaign_id",
|
|
||||||
CampaignName: "campaign_name",
|
|
||||||
UnitId: "unit_id",
|
|
||||||
UnitName: "unit_name",
|
|
||||||
CreativeId: "creative_id",
|
|
||||||
CreativeName: "creative_name",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,6 +8,8 @@ type SyncTaskLog struct {
|
|||||||
Id int64 `orm:"Id" json:"Id" description:"主键id"`
|
Id int64 `orm:"Id" json:"Id" description:"主键id"`
|
||||||
TaskID string `orm:"task_id" json:"taskId" description:"任务唯一标识"`
|
TaskID string `orm:"task_id" json:"taskId" description:"任务唯一标识"`
|
||||||
TaskType string `orm:"task_type" json:"taskType" description:"任务类型"`
|
TaskType string `orm:"task_type" json:"taskType" description:"任务类型"`
|
||||||
|
PlatformCode string `orm:"platform_code" json:"platformCode" description:"平台编码"`
|
||||||
|
InterfaceCode string `orm:"interface_code" json:"interfaceCode" description:"接口编码"`
|
||||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
||||||
StartTime interface{} `orm:"start_time" json:"startTime" description:"数据开始时间"`
|
StartTime interface{} `orm:"start_time" json:"startTime" description:"数据开始时间"`
|
||||||
EndTime interface{} `orm:"end_time" json:"endTime" description:"数据结束时间"`
|
EndTime interface{} `orm:"end_time" json:"endTime" description:"数据结束时间"`
|
||||||
|
|||||||
@@ -1,133 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// TaskReport 调控任务数据实体
|
|
||||||
type TaskReport struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 转化率相关字段
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
|
|
||||||
// 视频信息字段
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
|
|
||||||
// 核心指标字段
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
|
|
||||||
// 粉丝 GMV 字段
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
|
|
||||||
// 粉丝 ROI 字段
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
|
|
||||||
// 全站数据字段
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
|
|
||||||
// 时间字段
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间(格式:YYYY-MM-DD)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TaskReportCol 调控任务数据表字段定义
|
|
||||||
type TaskReportCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
ItemOrderConversionRatio string
|
|
||||||
ItemCardClickRatio string
|
|
||||||
ItemCardClkCnt string
|
|
||||||
LivePlayCntCost string
|
|
||||||
AdMerchantFollowCost string
|
|
||||||
AdMerchantFollow string
|
|
||||||
NetT0OrderCnt string
|
|
||||||
NetT0Roi string
|
|
||||||
NetT0Gmv string
|
|
||||||
PhotoName string
|
|
||||||
PhotoId string
|
|
||||||
CostTotal string
|
|
||||||
T0Gmv string
|
|
||||||
T0Roi string
|
|
||||||
T0OrderCnt string
|
|
||||||
T0OrderCntCost string
|
|
||||||
FansT0Gmv string
|
|
||||||
FansT1Gmv string
|
|
||||||
FansT7Gmv string
|
|
||||||
FansT15Gmv string
|
|
||||||
FansT30Gmv string
|
|
||||||
FansT0Roi string
|
|
||||||
FansT1Roi string
|
|
||||||
FansT7Roi string
|
|
||||||
FansT15Roi string
|
|
||||||
FansT30Roi string
|
|
||||||
LivePlayCnt string
|
|
||||||
ItemEntranceClkCnt string
|
|
||||||
ShowCnt string
|
|
||||||
ReportDateStr string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *TaskReport) TableName() string {
|
|
||||||
return "task_report"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCols 获取所有字段名
|
|
||||||
func (e *TaskReport) GetCols() *TaskReportCol {
|
|
||||||
return &TaskReportCol{
|
|
||||||
SQLBaseCol: beans.SQLBaseCol{
|
|
||||||
Id: "id",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
},
|
|
||||||
ItemOrderConversionRatio: "item_order_conversion_ratio",
|
|
||||||
ItemCardClickRatio: "item_card_click_ratio",
|
|
||||||
ItemCardClkCnt: "item_card_clk_cnt",
|
|
||||||
LivePlayCntCost: "live_play_cnt_cost",
|
|
||||||
AdMerchantFollowCost: "ad_merchant_follow_cost",
|
|
||||||
AdMerchantFollow: "ad_merchant_follow",
|
|
||||||
NetT0OrderCnt: "net_t0_order_cnt",
|
|
||||||
NetT0Roi: "net_t0_roi",
|
|
||||||
NetT0Gmv: "net_t0_gmv",
|
|
||||||
PhotoName: "photo_name",
|
|
||||||
PhotoId: "photo_id",
|
|
||||||
CostTotal: "cost_total",
|
|
||||||
T0Gmv: "t0_gmv",
|
|
||||||
T0Roi: "t0_roi",
|
|
||||||
T0OrderCnt: "t0_order_cnt",
|
|
||||||
T0OrderCntCost: "t0_order_cnt_cost",
|
|
||||||
FansT0Gmv: "fans_t0_gmv",
|
|
||||||
FansT1Gmv: "fans_t1_gmv",
|
|
||||||
FansT7Gmv: "fans_t7_gmv",
|
|
||||||
FansT15Gmv: "fans_t15_gmv",
|
|
||||||
FansT30Gmv: "fans_t30_gmv",
|
|
||||||
FansT0Roi: "fans_t0_roi",
|
|
||||||
FansT1Roi: "fans_t1_roi",
|
|
||||||
FansT7Roi: "fans_t7_roi",
|
|
||||||
FansT15Roi: "fans_t15_roi",
|
|
||||||
FansT30Roi: "fans_t30_roi",
|
|
||||||
LivePlayCnt: "live_play_cnt",
|
|
||||||
ItemEntranceClkCnt: "item_entrance_clk_cnt",
|
|
||||||
ShowCnt: "show_cnt",
|
|
||||||
ReportDateStr: "report_date_str",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// UnitReportDetail 广告效果指标详情表实体
|
|
||||||
type UnitReportDetail struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间,"0-500", "501-1000", "1001-1500", "1501-2000", "2001-2500", "2501-3000", "3001-3500", "3501-4000", "4001-4500", "4501-5000", "5001-5500", "5501+", "未知""`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"0-17", "18-23", "24-30", "31-40", "41-49", "50+","未知""`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"男,女,未知三种类型"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *UnitReportDetail) TableName() string {
|
|
||||||
return "unit_report_detail"
|
|
||||||
}
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import "gitea.com/red-future/common/beans"
|
|
||||||
|
|
||||||
// UnitReportSum 广告效果指标表实体
|
|
||||||
type UnitReportSum struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
// 基础字段
|
|
||||||
T0OrderPaymentAmt *float64 `orm:"t0_order_payment_amt" json:"t0OrderPaymentAmt" description:"当日总成交订单金额"`
|
|
||||||
CreativeMaterialType string `orm:"creative_material_type" json:"creativeMaterialType" description:"视频素材类型(视频:HORIZONTAL_SCREEN, VERTICAL_SCREEN, UNKNOWN_TYPE;图集:ATLAS;长图:ATLAS_VERTICAL)"`
|
|
||||||
LiveName string `orm:"live_name" json:"liveName" description:"直播间名称"`
|
|
||||||
AuthorId string `orm:"author_id" json:"authorId" description:"直播用户快手 Id"`
|
|
||||||
PicUrl string `orm:"pic_url" json:"picUrl" description:"图片 URL"`
|
|
||||||
PicName string `orm:"pic_name" json:"picName" description:"图片名称"`
|
|
||||||
PicId string `orm:"pic_id" json:"picId" description:"图片 Id"`
|
|
||||||
CoverUrl string `orm:"cover_url" json:"coverUrl" description:"封面 URL"`
|
|
||||||
CoverId *int64 `orm:"cover_id" json:"coverId" description:"封面 Id"`
|
|
||||||
ItemOrderConversionRatio *float64 `orm:"item_order_conversion_ratio" json:"itemOrderConversionRatio" description:"转化率"`
|
|
||||||
ItemCardClickRatio *float64 `orm:"item_card_click_ratio" json:"itemCardClickRatio" description:"点击率"`
|
|
||||||
ItemCardClkCnt *int64 `orm:"item_card_clk_cnt" json:"itemCardClkCnt" description:"商品卡点击数"`
|
|
||||||
LivePlayCntCost *float64 `orm:"live_play_cnt_cost" json:"livePlayCntCost" description:"直播间观看成本"`
|
|
||||||
AdMerchantFollowCost *float64 `orm:"ad_merchant_follow_cost" json:"adMerchantFollowCost" description:"涨粉成本"`
|
|
||||||
AdMerchantFollow *int64 `orm:"ad_merchant_follow" json:"adMerchantFollow" description:"涨粉数"`
|
|
||||||
NetT0OrderCnt *int64 `orm:"net_t0_order_cnt" json:"netT0OrderCnt" description:"当日累计净成交订单数"`
|
|
||||||
NetT0Roi *float64 `orm:"net_t0_roi" json:"netT0Roi" description:"净成交 ROI"`
|
|
||||||
NetT0Gmv *float64 `orm:"net_t0_gmv" json:"netT0Gmv" description:"净成交 GMV"`
|
|
||||||
PhotoName string `orm:"photo_name" json:"photoName" description:"视频名称"`
|
|
||||||
PhotoIdStr string `orm:"photo_id_str" json:"photoIdStr" description:"视频 id"`
|
|
||||||
PhotoId string `orm:"photo_id" json:"photoId" description:"视频 id"`
|
|
||||||
ModPriceSegment string `orm:"mod_price_segment" json:"modPriceSegment" description:"设备价格区间,"0-500", "501-1000", "1001-1500", "1501-2000", "2001-2500", "2501-3000", "3001-3500", "3501-4000", "4001-4500", "4501-5000", "5001-5500", "5501+", "未知""`
|
|
||||||
AgeSegment string `orm:"age_segment" json:"ageSegment" description:"年龄段"0-17", "18-23", "24-30", "31-40", "41-49", "50+","未知""`
|
|
||||||
Province string `orm:"province" json:"province" description:"省份名称"`
|
|
||||||
Gender string `orm:"gender" json:"gender" description:"男,女,未知三种类型"`
|
|
||||||
AdPhotoPlayedFiveRatio *float64 `orm:"ad_photo_played_five_ratio" json:"adPhotoPlayedFiveRatio" description:"作品 5 秒播放率"`
|
|
||||||
AdPhotoPlayedThreeRatio *float64 `orm:"ad_photo_played_three_ratio" json:"adPhotoPlayedThreeRatio" description:"作品 3 秒播放率"`
|
|
||||||
OrderSubmitRoi *float64 `orm:"order_submit_roi" json:"orderSubmitRoi" description:"订单提交 ROI"`
|
|
||||||
OrderSubmitAmt *int64 `orm:"order_submit_amt" json:"orderSubmitAmt" description:"外部订单金额"`
|
|
||||||
EventOrderSubmitCost *float64 `orm:"event_order_submit_cost" json:"eventOrderSubmitCost" description:"订单提交成本"`
|
|
||||||
EventOrderSubmit *int64 `orm:"event_order_submit" json:"eventOrderSubmit" description:"订单提交数"`
|
|
||||||
EventOrderPaidRoi *float64 `orm:"event_order_paid_roi" json:"eventOrderPaidRoi" description:"订单支付率"`
|
|
||||||
EventAppInvoked *int64 `orm:"event_app_invoked" json:"eventAppInvoked" description:"唤起应用数"`
|
|
||||||
EventAddShoppingCart *int64 `orm:"event_add_shopping_cart" json:"eventAddShoppingCart" description:"添加购物车次数"`
|
|
||||||
ConversionNumCost *float64 `orm:"conversion_num_cost" json:"conversionNumCost" description:"转化成本(回传时间)"`
|
|
||||||
AdEffectivePlayNum *int64 `orm:"ad_effective_play_num" json:"adEffectivePlayNum" description:"有效播放数"`
|
|
||||||
AdItemClick *int64 `orm:"ad_item_click" json:"adItemClick" description:"行为数"`
|
|
||||||
MerchantProductId string `orm:"merchant_product_id" json:"merchantProductId" description:"商品 ID"`
|
|
||||||
CostTotal *float64 `orm:"cost_total" json:"costTotal" description:"花费"`
|
|
||||||
AdShow *int64 `orm:"ad_show" json:"adShow" description:"曝光数"`
|
|
||||||
AdShow1kCost *float64 `orm:"ad_show1k_cost" json:"adShow1kCost" description:"平均千次广告曝光花费"`
|
|
||||||
Impression *int64 `orm:"impression" json:"impression" description:"封面曝光数"`
|
|
||||||
PhotoClick *int64 `orm:"photo_click" json:"photoClick" description:"封面点击数"`
|
|
||||||
PhotoClickRatio *float64 `orm:"photo_click_ratio" json:"photoClickRatio" description:"封面点击率"`
|
|
||||||
Click *int64 `orm:"click" json:"click" description:"素材曝光数"`
|
|
||||||
ActionbarClick *int64 `orm:"actionbar_click" json:"actionbarClick" description:"行为数"`
|
|
||||||
ActionbarClickCost *float64 `orm:"actionbar_click_cost" json:"actionbarClickCost" description:"行为成本"`
|
|
||||||
EspClickRatio *float64 `orm:"esp_click_ratio" json:"espClickRatio" description:"行为率"`
|
|
||||||
ActionRatio *float64 `orm:"action_ratio" json:"actionRatio" description:"素材点击率"`
|
|
||||||
AdItemClickCount *int64 `orm:"ad_item_click_count" json:"adItemClickCount" description:"预约组件点击数"`
|
|
||||||
EspLivePlayedSeconds *int64 `orm:"esp_live_played_seconds" json:"espLivePlayedSeconds" description:"直播平均观看时长"`
|
|
||||||
PlayedThreeSeconds *int64 `orm:"played_three_seconds" json:"playedThreeSeconds" description:"作品 3 秒播放数"`
|
|
||||||
Play3sRatio *float64 `orm:"play3s_ratio" json:"play3sRatio" description:"作品 3 秒播放率"`
|
|
||||||
PlayedFiveSeconds *int64 `orm:"played_five_seconds" json:"playedFiveSeconds" description:"作品 5 秒播放数"`
|
|
||||||
Play5sRatio *float64 `orm:"play5s_ratio" json:"play5sRatio" description:"作品 5 秒播放率"`
|
|
||||||
PlayedEnd *int64 `orm:"played_end" json:"playedEnd" description:"作品完播数"`
|
|
||||||
PlayEndRatio *float64 `orm:"play_end_ratio" json:"playEndRatio" description:"作品完播率"`
|
|
||||||
Share *int64 `orm:"share" json:"share" description:"作品分享数"`
|
|
||||||
Comment *int64 `orm:"comment" json:"comment" description:"作品评论数"`
|
|
||||||
Likes *int64 `orm:"likes" json:"likes" description:"作品点赞数"`
|
|
||||||
Report *int64 `orm:"report" json:"report" description:"作品举报数"`
|
|
||||||
Block *int64 `orm:"block" json:"block" description:"作品拉黑数"`
|
|
||||||
ItemNegative *int64 `orm:"item_negative" json:"itemNegative" description:"详情页减少此类作品数"`
|
|
||||||
LiveShare *int64 `orm:"live_share" json:"liveShare" description:"直播送礼数"`
|
|
||||||
LiveComment *int64 `orm:"live_comment" json:"liveComment" description:"直播评论数"`
|
|
||||||
LiveReward *int64 `orm:"live_reward" json:"liveReward" description:"直播送礼数"`
|
|
||||||
EffectivePlayCount *int64 `orm:"effective_play_count" json:"effectivePlayCount" description:"有效播放数"`
|
|
||||||
EffectivePlayRatio *float64 `orm:"effective_play_ratio" json:"effectivePlayRatio" description:"有效播放率"`
|
|
||||||
ConversionNum *int64 `orm:"conversion_num" json:"conversionNum" description:"转化数"`
|
|
||||||
ConversionCostEsp *float64 `orm:"conversion_cost_esp" json:"conversionCostEsp" description:"转化成本"`
|
|
||||||
Roi *float64 `orm:"roi" json:"roi" description:"直接 ROI"`
|
|
||||||
Gmv *float64 `orm:"gmv" json:"gmv" description:"直接 GMV"`
|
|
||||||
T0Gmv *float64 `orm:"t0_gmv" json:"t0Gmv" description:"当日累计 GMV"`
|
|
||||||
T1Gmv *float64 `orm:"t1_gmv" json:"t1Gmv" description:"次日累计 GMV"`
|
|
||||||
T7Gmv *float64 `orm:"t7_gmv" json:"t7Gmv" description:"7 日累计 GMV"`
|
|
||||||
T15Gmv *float64 `orm:"t15_gmv" json:"t15Gmv" description:"15 日累计 GMV"`
|
|
||||||
T30Gmv *float64 `orm:"t30_gmv" json:"t30Gmv" description:"30 日累计 GMV"`
|
|
||||||
T0Roi *float64 `orm:"t0_roi" json:"t0Roi" description:"当日累计 ROI"`
|
|
||||||
T1Roi *float64 `orm:"t1_roi" json:"t1Roi" description:"次日累计 ROI"`
|
|
||||||
T7Roi *float64 `orm:"t7_roi" json:"t7Roi" description:"7 日累计 ROI"`
|
|
||||||
T15Roi *float64 `orm:"t15_roi" json:"t15Roi" description:"15 日累计 ROI"`
|
|
||||||
T30Roi *float64 `orm:"t30_roi" json:"t30Roi" description:"30 日累计 ROI"`
|
|
||||||
PaiedOrder *int64 `orm:"paied_order" json:"paiedOrder" description:"直接订单数"`
|
|
||||||
OrderRatio *float64 `orm:"order_ratio" json:"orderRatio" description:"直接下单率"`
|
|
||||||
T0OrderCnt *int64 `orm:"t0_order_cnt" json:"t0OrderCnt" description:"当日累计订单数"`
|
|
||||||
T0OrderCntCost *float64 `orm:"t0_order_cnt_cost" json:"t0OrderCntCost" description:"当日累计订单成本"`
|
|
||||||
T0OrderCntRatio *float64 `orm:"t0_order_cnt_ratio" json:"t0OrderCntRatio" description:"累计订单下单率"`
|
|
||||||
T1OrderCnt *int64 `orm:"t1_order_cnt" json:"t1OrderCnt" description:"次日累计订单数"`
|
|
||||||
T7OrderCnt *int64 `orm:"t7_order_cnt" json:"t7OrderCnt" description:"7 日累计订单数"`
|
|
||||||
T15OrderCnt *int64 `orm:"t15_order_cnt" json:"t15OrderCnt" description:"15 日累计订单数"`
|
|
||||||
T30OrderCnt *int64 `orm:"t30_order_cnt" json:"t30OrderCnt" description:"30 日累计订单数"`
|
|
||||||
MerchantRecoFans *int64 `orm:"merchant_reco_fans" json:"merchantRecoFans" description:"涨粉数"`
|
|
||||||
T1Retention *float64 `orm:"t1_retention" json:"t1Retention" description:"次日涨粉留存数"`
|
|
||||||
T7Retention *float64 `orm:"t7_retention" json:"t7Retention" description:"7 日涨粉留存数"`
|
|
||||||
T15Retention *float64 `orm:"t15_retention" json:"t15Retention" description:"15 日涨粉留存数"`
|
|
||||||
T30Retention *float64 `orm:"t30_retention" json:"t30Retention" description:"30 日涨粉留存数"`
|
|
||||||
T1RetentionRatio *float64 `orm:"t1_retention_ratio" json:"t1RetentionRatio" description:"次日涨粉留存率"`
|
|
||||||
T7RetentionRatio *float64 `orm:"t7_retention_ratio" json:"t7RetentionRatio" description:"7 日涨粉留存率"`
|
|
||||||
T15RetentionRatio *float64 `orm:"t15_retention_ratio" json:"t15RetentionRatio" description:"15 日涨粉留存率"`
|
|
||||||
T30RetentionRatio *float64 `orm:"t30_retention_ratio" json:"t30RetentionRatio" description:"30 日涨粉留存率"`
|
|
||||||
ReservationSuccess *int64 `orm:"reservation_success" json:"reservationSuccess" description:"直播预约成功数"`
|
|
||||||
ReservationCost *float64 `orm:"reservation_cost" json:"reservationCost" description:"直播预约成功成本"`
|
|
||||||
StandardLivePlayedStarted *int64 `orm:"standard_live_played_started" json:"standardLivePlayedStarted" description:"直播观看数"`
|
|
||||||
AdLivePlayCnt *int64 `orm:"ad_live_play_cnt" json:"adLivePlayCnt" description:"直播间人气数"`
|
|
||||||
AdLivePlayCntCost *float64 `orm:"ad_live_play_cnt_cost" json:"adLivePlayCntCost" description:"直播间人气成本"`
|
|
||||||
LiveAudienceCost *float64 `orm:"live_audience_cost" json:"liveAudienceCost" description:"直播观看成本"`
|
|
||||||
LiveEventGoodsView *int64 `orm:"live_event_goods_view" json:"liveEventGoodsView" description:"直播间商品点击数"`
|
|
||||||
GoodsClickRatio *float64 `orm:"goods_click_ratio" json:"goodsClickRatio" description:"直播间商品点击率"`
|
|
||||||
DirectAttrPlatNewBuyerCnt *int64 `orm:"direct_attr_plat_new_buyer_cnt" json:"directAttrPlatNewBuyerCnt" description:"直接平台新客"`
|
|
||||||
T30AttrPlatTotalBuyerCnt *int64 `orm:"t30_attr_plat_total_buyer_cnt" json:"t30AttrPlatTotalBuyerCnt" description:"30 日累计平台新客"`
|
|
||||||
DirectAttrSellerNewBuyerCnt *int64 `orm:"direct_attr_seller_new_buyer_cnt" json:"directAttrSellerNewBuyerCnt" description:"直接店铺新客"`
|
|
||||||
T30AttrSellerTotalBuyerCnt *int64 `orm:"t30_attr_seller_total_buyer_cnt" json:"t30AttrSellerTotalBuyerCnt" description:"30 日累计店铺新客"`
|
|
||||||
T3Gmv *float64 `orm:"t3_gmv" json:"t3Gmv" description:"3 日累计 GMV"`
|
|
||||||
T3OrderCnt *int64 `orm:"t3_order_cnt" json:"t3OrderCnt" description:"3 日累计订单数"`
|
|
||||||
T3Roi *float64 `orm:"t3_roi" json:"t3Roi" description:"3 日累计 ROI"`
|
|
||||||
T7IndirectOrderAmt *float64 `orm:"t7_indirect_order_amt" json:"t7IndirectOrderAmt" description:"7 日间接订单金额"`
|
|
||||||
T7IndirectOrderCnt *int64 `orm:"t7_indirect_order_cnt" json:"t7IndirectOrderCnt" description:"7 日间接订单数"`
|
|
||||||
FansT0GmvPerFans *float64 `orm:"fans_t0_gmv_per_fans" json:"fansT0GmvPerFans" description:"新增粉丝人均销售额"`
|
|
||||||
FansT3GmvPerFans *float64 `orm:"fans_t3_gmv_per_fans" json:"fansT3GmvPerFans" description:"3 日新增粉丝人均销售额"`
|
|
||||||
FansT7GmvPerFans *float64 `orm:"fans_t7_gmv_per_fans" json:"fansT7GmvPerFans" description:"7 日新增粉丝人均销售额"`
|
|
||||||
FansT15GmvPerFans *float64 `orm:"fans_t15_gmv_per_fans" json:"fansT15GmvPerFans" description:"15 日新增粉丝人均销售额"`
|
|
||||||
FansT30GmvPerFans *float64 `orm:"fans_t30_gmv_per_fans" json:"fansT30GmvPerFans" description:"30 日新增粉丝人均销售额"`
|
|
||||||
RecoFansCost *float64 `orm:"reco_fans_cost" json:"recoFansCost" description:"涨粉成本"`
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt *float64 `orm:"qcpx_whitebox_direct_order_payment_amt" json:"qcpxWhiteboxDirectOrderPaymentAmt" description:"智能优惠券订单 GMV"`
|
|
||||||
QcpxWhiteboxDirectOrderCnt *int64 `orm:"qcpx_whitebox_direct_order_cnt" json:"qcpxWhiteboxDirectOrderCnt" description:"智能优惠券订单数"`
|
|
||||||
FansT0Gmv *float64 `orm:"fans_t0_gmv" json:"fansT0Gmv" description:"涨粉当日 GMV"`
|
|
||||||
FansT1Gmv *float64 `orm:"fans_t1_gmv" json:"fansT1Gmv" description:"涨粉次日 GMV"`
|
|
||||||
FansT7Gmv *float64 `orm:"fans_t7_gmv" json:"fansT7Gmv" description:"涨粉 7 日 GMV"`
|
|
||||||
FansT15Gmv *float64 `orm:"fans_t15_gmv" json:"fansT15Gmv" description:"涨粉 15 日 GMV"`
|
|
||||||
FansT30Gmv *float64 `orm:"fans_t30_gmv" json:"fansT30Gmv" description:"涨粉 30 日 GMV"`
|
|
||||||
FansT0Roi *float64 `orm:"fans_t0_roi" json:"fansT0Roi" description:"涨粉当日 ROI"`
|
|
||||||
FansT1Roi *float64 `orm:"fans_t1_roi" json:"fansT1Roi" description:"涨粉次日 ROI"`
|
|
||||||
FansT7Roi *float64 `orm:"fans_t7_roi" json:"fansT7Roi" description:"涨粉 7 日 ROI"`
|
|
||||||
FansT15Roi *float64 `orm:"fans_t15_roi" json:"fansT15Roi" description:"涨粉 15 日 ROI"`
|
|
||||||
FansT30Roi *float64 `orm:"fans_t30_roi" json:"fansT30Roi" description:"涨粉 30 日 ROI"`
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt *float64 `orm:"t0_shop_new_buyer_order_payment_amt" json:"t0ShopNewBuyerOrderPaymentAmt" description:"当日新客 GMV"`
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt *float64 `orm:"t1_shop_new_buyer_order_payment_amt" json:"t1ShopNewBuyerOrderPaymentAmt" description:"投后 1 日新客 GMV"`
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt *float64 `orm:"t3_shop_new_buyer_order_payment_amt" json:"t3ShopNewBuyerOrderPaymentAmt" description:"投后 3 日新客 GMV"`
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt *float64 `orm:"t7_shop_new_buyer_order_payment_amt" json:"t7ShopNewBuyerOrderPaymentAmt" description:"投后 7 日新客 GMV"`
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt *float64 `orm:"t15_shop_new_buyer_order_payment_amt" json:"t15ShopNewBuyerOrderPaymentAmt" description:"投后 15 日新客 GMV"`
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt *float64 `orm:"t30_shop_new_buyer_order_payment_amt" json:"t30ShopNewBuyerOrderPaymentAmt" description:"投后 30 日新客 GMV"`
|
|
||||||
T0ShopNewBuyerOrderCnt *int64 `orm:"t0_shop_new_buyer_order_cnt" json:"t0ShopNewBuyerOrderCnt" description:"当日新客成交订单量"`
|
|
||||||
T1ShopNewBuyerOrderCnt *int64 `orm:"t1_shop_new_buyer_order_cnt" json:"t1ShopNewBuyerOrderCnt" description:"投后 1 日新客成交订单量"`
|
|
||||||
T3ShopNewBuyerOrderCnt *int64 `orm:"t3_shop_new_buyer_order_cnt" json:"t3ShopNewBuyerOrderCnt" description:"投后 3 日新客成交订单量"`
|
|
||||||
T7ShopNewBuyerOrderCnt *int64 `orm:"t7_shop_new_buyer_order_cnt" json:"t7ShopNewBuyerOrderCnt" description:"投后 7 日新客成交订单量"`
|
|
||||||
T15ShopNewBuyerOrderCnt *int64 `orm:"t15_shop_new_buyer_order_cnt" json:"t15ShopNewBuyerOrderCnt" description:"投后 15 日新客成交订单量"`
|
|
||||||
T30ShopNewBuyerOrderCnt *int64 `orm:"t30_shop_new_buyer_order_cnt" json:"t30ShopNewBuyerOrderCnt" description:"投后 30 日新客成交订单量"`
|
|
||||||
T1NewBuyerRepurchaseRatio *float64 `orm:"t1_new_buyer_repurchase_ratio" json:"t1NewBuyerRepurchaseRatio" description:"投后 1 日新客复购率"`
|
|
||||||
T3NewBuyerRepurchaseRatio *float64 `orm:"t3_new_buyer_repurchase_ratio" json:"t3NewBuyerRepurchaseRatio" description:"投后 3 日新客复购率"`
|
|
||||||
T7NewBuyerRepurchaseRatio *float64 `orm:"t7_new_buyer_repurchase_ratio" json:"t7NewBuyerRepurchaseRatio" description:"投后 7 日新客复购率"`
|
|
||||||
T15NewBuyerRepurchaseRatio *float64 `orm:"t15_new_buyer_repurchase_ratio" json:"t15NewBuyerRepurchaseRatio" description:"投后 15 日新客复购率"`
|
|
||||||
T30NewBuyerRepurchaseRatio *float64 `orm:"t30_new_buyer_repurchase_ratio" json:"t30NewBuyerRepurchaseRatio" description:"投后 30 日新客复购率"`
|
|
||||||
T0ShopNewBuyerRoi *float64 `orm:"t0_shop_new_buyer_roi" json:"t0ShopNewBuyerRoi" description:"投后当日新客 ROI"`
|
|
||||||
T1ShopNewBuyerRoi *float64 `orm:"t1_shop_new_buyer_roi" json:"t1ShopNewBuyerRoi" description:"投后 1 日新客 ROI"`
|
|
||||||
T3ShopNewBuyerRoi *float64 `orm:"t3_shop_new_buyer_roi" json:"t3ShopNewBuyerRoi" description:"投后 3 日新客 ROI"`
|
|
||||||
T7ShopNewBuyerRoi *float64 `orm:"t7_shop_new_buyer_roi" json:"t7ShopNewBuyerRoi" description:"投后 7 日新客 ROI"`
|
|
||||||
T15ShopNewBuyerRoi *float64 `orm:"t15_shop_new_buyer_roi" json:"t15ShopNewBuyerRoi" description:"投后 15 日新客 ROI"`
|
|
||||||
T30ShopNewBuyerRoi *float64 `orm:"t30_shop_new_buyer_roi" json:"t30ShopNewBuyerRoi" description:"投后 30 日新客 ROI"`
|
|
||||||
CreateCardOrderCnt *int64 `orm:"create_card_order_cnt" json:"createCardOrderCnt" description:"有效制卡订单数(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCnt *int64 `orm:"forward_ts_create_card_order_cnt" json:"forwardTsCreateCardOrderCnt" description:"有效制卡订单数(计费时间)"`
|
|
||||||
CreateCardOrderCost *float64 `orm:"create_card_order_cost" json:"createCardOrderCost" description:"有效制卡订单成本(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderCost *float64 `orm:"forward_ts_create_card_order_cost" json:"forwardTsCreateCardOrderCost" description:"有效制卡订单成本(计费时间)"`
|
|
||||||
ActivateCardOrderCnt *int64 `orm:"activate_card_order_cnt" json:"activateCardOrderCnt" description:"电话卡激活订单数(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCnt *int64 `orm:"forward_ts_activate_card_order_cnt" json:"forwardTsActivateCardOrderCnt" description:"电话卡激活订单数(计费时间)"`
|
|
||||||
ActivateCardOrderCost *float64 `orm:"activate_card_order_cost" json:"activateCardOrderCost" description:"电话卡激活订单成本(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderCost *float64 `orm:"forward_ts_activate_card_order_cost" json:"forwardTsActivateCardOrderCost" description:"电话卡激活订单成本(计费时间)"`
|
|
||||||
CreateCardOrderRatio *float64 `orm:"create_card_order_ratio" json:"createCardOrderRatio" description:"有效制卡订单率(回传时间)"`
|
|
||||||
ForwardTsCreateCardOrderRatio *float64 `orm:"forward_ts_create_card_order_ratio" json:"forwardTsCreateCardOrderRatio" description:"有效制卡订单率(计费时间)"`
|
|
||||||
ActivateCardOrderCntRatio *float64 `orm:"activate_card_order_cnt_ratio" json:"activateCardOrderCntRatio" description:"电话卡激活率(回传时间)"`
|
|
||||||
ForwardTsActivateCardOrderRatio *float64 `orm:"forward_ts_activate_card_order_ratio" json:"forwardTsActivateCardOrderRatio" description:"电话卡激活率(计费时间)"`
|
|
||||||
LivePlayCnt *int64 `orm:"live_play_cnt" json:"livePlayCnt" description:"全站直播观看数"`
|
|
||||||
ItemEntranceClkCnt *int64 `orm:"item_entrance_clk_cnt" json:"itemEntranceClkCnt" description:"小黄车点击数"`
|
|
||||||
ShowCnt *int64 `orm:"show_cnt" json:"showCnt" description:"全站曝光"`
|
|
||||||
ReportDateStr string `orm:"report_date_str" json:"reportDateStr" description:"时间"`
|
|
||||||
CampaignId *int64 `orm:"campaign_id" json:"campaignId" description:"计划 ID"`
|
|
||||||
CampaignName string `orm:"campaign_name" json:"campaignName" description:"计划名称"`
|
|
||||||
UnitId *int64 `orm:"unit_id" json:"unitId" description:"单元 ID"`
|
|
||||||
UnitName string `orm:"unit_name" json:"unitName" description:"单元名称"`
|
|
||||||
CreativeId *int64 `orm:"creative_id" json:"creativeId" description:"创意 ID"`
|
|
||||||
CreativeName string `orm:"creative_name" json:"creativeName" description:"创意名称"`
|
|
||||||
CidActualRoiAfterSubsidy *float64 `orm:"cid_actual_roi_after_subsidy" json:"cidActualRoiAfterSubsidy" description:"补贴后实际 ROI"`
|
|
||||||
CidCouponAmount *int64 `orm:"cid_coupon_amount" json:"cidCouponAmount" description:"核销券金额"`
|
|
||||||
CidCouponCallbackPaidRefundAmount *int64 `orm:"cid_coupon_callback_paid_refund_amount" json:"cidCouponCallbackPaidRefundAmount" description:"退单有回传_核销券金额"`
|
|
||||||
CidVoucherCost *float64 `orm:"cid_voucher_cost" json:"cidVoucherCost" description:"券成本"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TableName 返回表名
|
|
||||||
func (e *UnitReportSum) TableName() string {
|
|
||||||
return "unit_report_sum"
|
|
||||||
}
|
|
||||||
@@ -33,6 +33,9 @@ type DatasourcePlatform struct {
|
|||||||
MaxRetries int `orm:"max_retries" json:"maxRetries" description:"最大重试次数"`
|
MaxRetries int `orm:"max_retries" json:"maxRetries" description:"最大重试次数"`
|
||||||
RetryDelayMs int `orm:"retry_delay_ms" json:"retryDelayMs" description:"重试延迟(毫秒)"`
|
RetryDelayMs int `orm:"retry_delay_ms" json:"retryDelayMs" description:"重试延迟(毫秒)"`
|
||||||
|
|
||||||
|
// 自定义认证配置 (JSONB)
|
||||||
|
AuthConfig map[string]interface{} `orm:"auth_config" json:"authConfig" description:"自定义认证配置,支持各平台特有的认证方式"`
|
||||||
|
|
||||||
// 元数据
|
// 元数据
|
||||||
CreatedBy string `orm:"created_by" json:"createdBy" description:"创建人"`
|
CreatedBy string `orm:"created_by" json:"createdBy" description:"创建人"`
|
||||||
CreatedAt *time.Time `orm:"created_at" json:"createdAt" description:"创建时间"`
|
CreatedAt *time.Time `orm:"created_at" json:"createdAt" description:"创建时间"`
|
||||||
@@ -60,6 +63,7 @@ type DatasourcePlatformCol struct {
|
|||||||
RequestTimeoutMs string
|
RequestTimeoutMs string
|
||||||
MaxRetries string
|
MaxRetries string
|
||||||
RetryDelayMs string
|
RetryDelayMs string
|
||||||
|
AuthConfig string
|
||||||
CreatedBy string
|
CreatedBy string
|
||||||
CreatedAt string
|
CreatedAt string
|
||||||
UpdatedBy string
|
UpdatedBy string
|
||||||
@@ -86,6 +90,7 @@ var DatasourcePlatformCols = DatasourcePlatformCol{
|
|||||||
RequestTimeoutMs: "request_timeout_ms",
|
RequestTimeoutMs: "request_timeout_ms",
|
||||||
MaxRetries: "max_retries",
|
MaxRetries: "max_retries",
|
||||||
RetryDelayMs: "retry_delay_ms",
|
RetryDelayMs: "retry_delay_ms",
|
||||||
|
AuthConfig: "auth_config",
|
||||||
CreatedBy: "created_by",
|
CreatedBy: "created_by",
|
||||||
CreatedAt: "created_at",
|
CreatedAt: "created_at",
|
||||||
UpdatedBy: "updated_by",
|
UpdatedBy: "updated_by",
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
package dict
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FieldMappingConfig 字段映射配置实体
|
|
||||||
type FieldMappingConfig struct {
|
|
||||||
Id int64 `json:"id,string" dc:"配置ID"`
|
|
||||||
ConfigName string `json:"configName" dc:"配置名称"`
|
|
||||||
VendorName string `json:"vendorName" dc:"厂商名称"`
|
|
||||||
ApiName string `json:"apiName" dc:"接口名称"`
|
|
||||||
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
||||||
SourceField string `json:"sourceField" dc:"源字段名"`
|
|
||||||
SourceFieldType string `json:"sourceFieldType" dc:"源字段数据类型"`
|
|
||||||
SourceFieldDesc string `json:"sourceFieldDesc" dc:"源字段描述"`
|
|
||||||
TargetField string `json:"targetField" dc:"目标字段名"`
|
|
||||||
TargetFieldType string `json:"targetFieldType" dc:"目标数据类型"`
|
|
||||||
TargetFieldDesc string `json:"targetFieldDesc" dc:"字段描述"`
|
|
||||||
TransformType string `json:"transformType" dc:"转换类型"`
|
|
||||||
TransformParams map[string]interface{} `json:"transformParams" dc:"转换参数"`
|
|
||||||
ValidationRules map[string]interface{} `json:"validationRules" dc:"验证规则"`
|
|
||||||
DefaultValue string `json:"defaultValue" dc:"默认值"`
|
|
||||||
IsRequired bool `json:"isRequired" dc:"是否必填"`
|
|
||||||
IsActive bool `json:"isActive" dc:"是否启用"`
|
|
||||||
Priority int `json:"priority" dc:"优先级"`
|
|
||||||
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
||||||
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
||||||
ConfigVersion int `json:"configVersion" dc:"配置版本号"`
|
|
||||||
EffectiveDate *time.Time `json:"effectiveDate" dc:"生效时间"`
|
|
||||||
ExpiryDate *time.Time `json:"expiryDate" dc:"失效时间"`
|
|
||||||
CreatedBy string `json:"createdBy" dc:"创建人"`
|
|
||||||
CreatedTime time.Time `json:"createdTime" dc:"创建时间"`
|
|
||||||
UpdatedBy string `json:"updatedBy" dc:"更新人"`
|
|
||||||
UpdatedTime time.Time `json:"updatedTime" dc:"更新时间"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FieldMappingConfigCols 字段映射配置表列名
|
|
||||||
type FieldMappingConfigCols struct {
|
|
||||||
Id string
|
|
||||||
ConfigName string
|
|
||||||
VendorName string
|
|
||||||
ApiName string
|
|
||||||
ApiVersion string
|
|
||||||
SourceField string
|
|
||||||
SourceFieldType string
|
|
||||||
SourceFieldDesc string
|
|
||||||
TargetField string
|
|
||||||
TargetFieldType string
|
|
||||||
TargetFieldDesc string
|
|
||||||
TransformType string
|
|
||||||
TransformParams string
|
|
||||||
ValidationRules string
|
|
||||||
DefaultValue string
|
|
||||||
IsRequired string
|
|
||||||
IsActive string
|
|
||||||
Priority string
|
|
||||||
BusinessDomain string
|
|
||||||
FieldGroup string
|
|
||||||
ConfigVersion string
|
|
||||||
EffectiveDate string
|
|
||||||
ExpiryDate string
|
|
||||||
CreatedBy string
|
|
||||||
CreatedTime string
|
|
||||||
UpdatedBy string
|
|
||||||
UpdatedTime string
|
|
||||||
}
|
|
||||||
|
|
||||||
// FieldMappingConfigCol 字段映射配置表列名常量
|
|
||||||
var FieldMappingConfigCol = FieldMappingConfigCols{
|
|
||||||
Id: "id",
|
|
||||||
ConfigName: "config_name",
|
|
||||||
VendorName: "vendor_name",
|
|
||||||
ApiName: "api_name",
|
|
||||||
ApiVersion: "api_version",
|
|
||||||
SourceField: "source_field",
|
|
||||||
SourceFieldType: "source_field_type",
|
|
||||||
SourceFieldDesc: "source_field_desc",
|
|
||||||
TargetField: "target_field",
|
|
||||||
TargetFieldType: "target_field_type",
|
|
||||||
TargetFieldDesc: "target_field_desc",
|
|
||||||
TransformType: "transform_type",
|
|
||||||
TransformParams: "transform_params",
|
|
||||||
ValidationRules: "validation_rules",
|
|
||||||
DefaultValue: "default_value",
|
|
||||||
IsRequired: "is_required",
|
|
||||||
IsActive: "is_active",
|
|
||||||
Priority: "priority",
|
|
||||||
BusinessDomain: "business_domain",
|
|
||||||
FieldGroup: "field_group",
|
|
||||||
ConfigVersion: "config_version",
|
|
||||||
EffectiveDate: "effective_date",
|
|
||||||
ExpiryDate: "expiry_date",
|
|
||||||
CreatedBy: "created_by",
|
|
||||||
CreatedTime: "created_time",
|
|
||||||
UpdatedBy: "updated_by",
|
|
||||||
UpdatedTime: "updated_time",
|
|
||||||
}
|
|
||||||
@@ -24,34 +24,38 @@ type ApiInterface struct {
|
|||||||
ResponseConfig map[string]interface{} `orm:"response_config" json:"responseConfig" description:"响应配置"`
|
ResponseConfig map[string]interface{} `orm:"response_config" json:"responseConfig" description:"响应配置"`
|
||||||
// 独立限流配置 (JSONB)
|
// 独立限流配置 (JSONB)
|
||||||
LimitConfig map[string]interface{} `orm:"limit_config" json:"limitConfig" description:"接口独立限流配置(可选,覆盖平台配置)"`
|
LimitConfig map[string]interface{} `orm:"limit_config" json:"limitConfig" description:"接口独立限流配置(可选,覆盖平台配置)"`
|
||||||
|
// 表结构定义 (JSONB) - 描述目标表的字段结构,用于自动建表
|
||||||
|
TableDefinition map[string]interface{} `orm:"table_definition" json:"tableDefinition" description:"表结构定义,用于自动建表"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApiInterfaceCol 接口表字段定义
|
// ApiInterfaceCol 接口表字段定义
|
||||||
type ApiInterfaceCol struct {
|
type ApiInterfaceCol struct {
|
||||||
beans.SQLBaseCol
|
beans.SQLBaseCol
|
||||||
PlatformId string
|
PlatformId string
|
||||||
Name string
|
Name string
|
||||||
Code string
|
Code string
|
||||||
Url string
|
Url string
|
||||||
Method string
|
Method string
|
||||||
Status string
|
Status string
|
||||||
AuthType string
|
AuthType string
|
||||||
RequestConfig string
|
RequestConfig string
|
||||||
ResponseConfig string
|
ResponseConfig string
|
||||||
LimitConfig string
|
LimitConfig string
|
||||||
|
TableDefinition string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApiInterfaceCols 接口表字段常量
|
// ApiInterfaceCols 接口表字段常量
|
||||||
var ApiInterfaceCols = ApiInterfaceCol{
|
var ApiInterfaceCols = ApiInterfaceCol{
|
||||||
SQLBaseCol: beans.DefSQLBaseCol,
|
SQLBaseCol: beans.DefSQLBaseCol,
|
||||||
PlatformId: "platform_id",
|
PlatformId: "platform_id",
|
||||||
Name: "name",
|
Name: "name",
|
||||||
Code: "code",
|
Code: "code",
|
||||||
Url: "url",
|
Url: "url",
|
||||||
Method: "method",
|
Method: "method",
|
||||||
Status: "status",
|
Status: "status",
|
||||||
AuthType: "auth_type",
|
AuthType: "auth_type",
|
||||||
RequestConfig: "request_config",
|
RequestConfig: "request_config",
|
||||||
ResponseConfig: "response_config",
|
ResponseConfig: "response_config",
|
||||||
LimitConfig: "limit_config",
|
LimitConfig: "limit_config",
|
||||||
|
TableDefinition: "table_definition",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AccountRelation 腾讯广告账户关系实体
|
|
||||||
type AccountRelation struct {
|
|
||||||
Id int64 `orm:"id" json:"id" description:"主键ID"`
|
|
||||||
TenantId int64 `orm:"tenant_id" json:"tenantId" description:"租户ID"`
|
|
||||||
Creator string `orm:"creator" json:"creator" description:"创建人"`
|
|
||||||
CreatedAt *time.Time `orm:"created_at" json:"createdAt" description:"创建时间"`
|
|
||||||
Updater string `orm:"updater" json:"updater" description:"更新人"`
|
|
||||||
UpdatedAt *time.Time `orm:"updated_at" json:"updatedAt" description:"更新时间"`
|
|
||||||
DeletedAt *time.Time `orm:"deleted_at" json:"deletedAt" description:"软删除时间"`
|
|
||||||
AccountID int64 `orm:"account_id" json:"accountId" description:"账户ID"`
|
|
||||||
CorporationName string `orm:"corporation_name" json:"corporationName" description:"公司名称"`
|
|
||||||
CommentDataList string `orm:"comment_data_list" json:"commentDataList" description:"备注数据列表JSON"`
|
|
||||||
IsAdx bool `orm:"is_adx" json:"isAdx" description:"是否ADX"`
|
|
||||||
IsBid bool `orm:"is_bid" json:"isBid" description:"是否BID"`
|
|
||||||
IsMp bool `orm:"is_mp" json:"isMp" description:"是否MP"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AccountRelationCol 账户关系表字段定义
|
|
||||||
type AccountRelationCol struct {
|
|
||||||
ID string
|
|
||||||
TenantID string
|
|
||||||
Creator string
|
|
||||||
CreatedAt string
|
|
||||||
Updater string
|
|
||||||
UpdatedAt string
|
|
||||||
DeletedAt string
|
|
||||||
AccountID string
|
|
||||||
CorporationName string
|
|
||||||
CommentDataList string
|
|
||||||
IsAdx string
|
|
||||||
IsBid string
|
|
||||||
IsMp string
|
|
||||||
}
|
|
||||||
|
|
||||||
// AccountRelationCols 账户关系表字段常量
|
|
||||||
var AccountRelationCols = AccountRelationCol{
|
|
||||||
ID: "id",
|
|
||||||
TenantID: "tenant_id",
|
|
||||||
Creator: "creator",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
Updater: "updater",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
DeletedAt: "deleted_at",
|
|
||||||
AccountID: "account_id",
|
|
||||||
CorporationName: "corporation_name",
|
|
||||||
CommentDataList: "comment_data_list",
|
|
||||||
IsAdx: "is_adx",
|
|
||||||
IsBid: "is_bid",
|
|
||||||
IsMp: "is_mp",
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Audio 腾讯广告音乐素材实体
|
|
||||||
type Audio struct {
|
|
||||||
Id int64 `orm:"id" json:"id" description:"主键ID"`
|
|
||||||
TenantId int64 `orm:"tenant_id" json:"tenantId" description:"租户ID"`
|
|
||||||
Creator string `orm:"creator" json:"creator" description:"创建人"`
|
|
||||||
CreatedAt *time.Time `orm:"created_at" json:"createdAt" description:"创建时间"`
|
|
||||||
Updater string `orm:"updater" json:"updater" description:"更新人"`
|
|
||||||
UpdatedAt *time.Time `orm:"updated_at" json:"updatedAt" description:"更新时间"`
|
|
||||||
DeletedAt *time.Time `orm:"deleted_at" json:"deletedAt" description:"软删除时间"`
|
|
||||||
AudioId string `orm:"audio_id" json:"audioId" description:"音乐ID"`
|
|
||||||
CoverImageUrl string `orm:"cover_image_url" json:"coverImageUrl" description:"封面图片URL"`
|
|
||||||
AudioName string `orm:"audio_name" json:"audioName" description:"音乐名称"`
|
|
||||||
Author string `orm:"author" json:"author" description:"作者"`
|
|
||||||
Duration float64 `orm:"duration" json:"duration" description:"时长(秒)"`
|
|
||||||
ExpireTime int64 `orm:"expire_time" json:"expireTime" description:"过期时间戳"`
|
|
||||||
FeelTags string `orm:"feel_tags" json:"feelTags" description:"情感标签数组JSON"`
|
|
||||||
GenreTags string `orm:"genre_tags" json:"genreTags" description:"风格标签数组JSON"`
|
|
||||||
|
|
||||||
// 本地校验状态
|
|
||||||
VerifyStatus string `orm:"verify_status" json:"verifyStatus" description:"校验状态(PENDING:待校验, VERIFIED:已校验, REJECTED:已拒绝)"`
|
|
||||||
VerifiedAt string `orm:"verified_at" json:"verifiedAt" description:"校验时间"`
|
|
||||||
VerifiedBy string `orm:"verified_by" json:"verifiedBy" description:"校验人"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AudioCol 音乐素材表字段定义
|
|
||||||
type AudioCol struct {
|
|
||||||
Id string
|
|
||||||
TenantId string
|
|
||||||
Creator string
|
|
||||||
CreatedAt string
|
|
||||||
Updater string
|
|
||||||
UpdatedAt string
|
|
||||||
DeletedAt string
|
|
||||||
AudioId string
|
|
||||||
CoverImageUrl string
|
|
||||||
AudioName string
|
|
||||||
Author string
|
|
||||||
Duration string
|
|
||||||
ExpireTime string
|
|
||||||
FeelTags string
|
|
||||||
GenreTags string
|
|
||||||
VerifyStatus string
|
|
||||||
VerifiedAt string
|
|
||||||
VerifiedBy string
|
|
||||||
}
|
|
||||||
|
|
||||||
// AudioCols 音乐素材表字段常量
|
|
||||||
var AudioCols = AudioCol{
|
|
||||||
Id: "id",
|
|
||||||
TenantId: "tenant_id",
|
|
||||||
Creator: "creator",
|
|
||||||
CreatedAt: "created_at",
|
|
||||||
Updater: "updater",
|
|
||||||
UpdatedAt: "updated_at",
|
|
||||||
DeletedAt: "deleted_at",
|
|
||||||
AudioId: "audio_id",
|
|
||||||
CoverImageUrl: "cover_image_url",
|
|
||||||
AudioName: "audio_name",
|
|
||||||
Author: "author",
|
|
||||||
Duration: "duration",
|
|
||||||
ExpireTime: "expire_time",
|
|
||||||
FeelTags: "feel_tags",
|
|
||||||
GenreTags: "genre_tags",
|
|
||||||
VerifyStatus: "verify_status",
|
|
||||||
VerifiedAt: "verified_at",
|
|
||||||
VerifiedBy: "verified_by",
|
|
||||||
}
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Image 腾讯广告图片素材实体
|
|
||||||
type Image struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
ImageId string `orm:"image_id" json:"imageId" description:"图片ID"`
|
|
||||||
AccountId int64 `orm:"account_id" json:"accountId" description:"账户ID"`
|
|
||||||
Width int `orm:"width" json:"width" description:"宽度"`
|
|
||||||
Height int `orm:"height" json:"height" description:"高度"`
|
|
||||||
FileSize int64 `orm:"file_size" json:"fileSize" description:"文件大小"`
|
|
||||||
Type string `orm:"type" json:"type" description:"图片类型"`
|
|
||||||
Signature string `orm:"signature" json:"signature" description:"签名"`
|
|
||||||
Description string `orm:"description" json:"description" description:"描述"`
|
|
||||||
SourceSignature string `orm:"source_signature" json:"sourceSignature" description:"源签名"`
|
|
||||||
PreviewUrl string `orm:"preview_url" json:"previewUrl" description:"预览URL"`
|
|
||||||
ThumbPreviewUrl string `orm:"thumb_preview_url" json:"thumbPreviewUrl" description:"缩略图URL"`
|
|
||||||
SourceType string `orm:"source_type" json:"sourceType" description:"来源类型"`
|
|
||||||
ImageUsage string `orm:"image_usage" json:"imageUsage" description:"图片用途"`
|
|
||||||
CreatedTime int64 `orm:"created_time" json:"createdTime" description:"创建时间戳"`
|
|
||||||
LastModifiedTime int64 `orm:"last_modified_time" json:"lastModifiedTime" description:"最后修改时间戳"`
|
|
||||||
ProductCatalogId int64 `orm:"product_catalog_id" json:"productCatalogId" description:"产品目录ID"`
|
|
||||||
ProductOuterId string `orm:"product_outer_id" json:"productOuterId" description:"产品外部ID"`
|
|
||||||
SourceReferenceId string `orm:"source_reference_id" json:"sourceReferenceId" description:"源引用ID"`
|
|
||||||
OwnerAccountId string `orm:"owner_account_id" json:"ownerAccountId" description:"所有者账户ID"`
|
|
||||||
Status string `orm:"status" json:"status" description:"状态"`
|
|
||||||
SampleAspectRatio string `orm:"sample_aspect_ratio" json:"sampleAspectRatio" description:"示例宽高比"`
|
|
||||||
SourceMaterialId string `orm:"source_material_id" json:"sourceMaterialId" description:"源素材ID"`
|
|
||||||
NewSourceType string `orm:"new_source_type" json:"newSourceType" description:"新来源类型"`
|
|
||||||
FirstPublicationStatus string `orm:"first_publication_status" json:"firstPublicationStatus" description:"首次发布状态"`
|
|
||||||
QualityStatus string `orm:"quality_status" json:"qualityStatus" description:"质量状态"`
|
|
||||||
SimilarityStatus string `orm:"similarity_status" json:"similarityStatus" description:"相似度状态"`
|
|
||||||
UserAigcStatus string `orm:"user_aigc_status" json:"userAigcStatus" description:"用户AIGC状态"`
|
|
||||||
SystemAigcStatus string `orm:"system_aigc_status" json:"systemAigcStatus" description:"系统AIGC状态"`
|
|
||||||
AigcSource string `orm:"aigc_source" json:"aigcSource" description:"AIGC来源"`
|
|
||||||
AigcFlag string `orm:"aigc_flag" json:"aigcFlag" description:"AIGC标志"`
|
|
||||||
MuseAigcVersion int `orm:"muse_aigc_version" json:"museAigcVersion" description:"Muse AIGC版本"`
|
|
||||||
AigcType int `orm:"aigc_type" json:"aigcType" description:"AIGC类型"`
|
|
||||||
|
|
||||||
// 本地校验状态
|
|
||||||
VerifyStatus string `orm:"verify_status" json:"verifyStatus" description:"校验状态(PENDING:待校验, VERIFIED:已校验, REJECTED:已拒绝)"`
|
|
||||||
VerifiedAt string `orm:"verified_at" json:"verifiedAt" description:"校验时间"`
|
|
||||||
VerifiedBy string `orm:"verified_by" json:"verifiedBy" description:"校验人"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ImageCol 图片素材表字段定义
|
|
||||||
type ImageCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
ImageId string
|
|
||||||
AccountId string
|
|
||||||
Width string
|
|
||||||
Height string
|
|
||||||
FileSize string
|
|
||||||
Type string
|
|
||||||
Signature string
|
|
||||||
Description string
|
|
||||||
SourceSignature string
|
|
||||||
PreviewUrl string
|
|
||||||
ThumbPreviewUrl string
|
|
||||||
SourceType string
|
|
||||||
ImageUsage string
|
|
||||||
CreatedTime string
|
|
||||||
LastModifiedTime string
|
|
||||||
ProductCatalogId string
|
|
||||||
ProductOuterId string
|
|
||||||
SourceReferenceId string
|
|
||||||
OwnerAccountId string
|
|
||||||
Status string
|
|
||||||
SampleAspectRatio string
|
|
||||||
SourceMaterialId string
|
|
||||||
NewSourceType string
|
|
||||||
FirstPublicationStatus string
|
|
||||||
QualityStatus string
|
|
||||||
SimilarityStatus string
|
|
||||||
UserAigcStatus string
|
|
||||||
SystemAigcStatus string
|
|
||||||
AigcSource string
|
|
||||||
AigcFlag string
|
|
||||||
MuseAigcVersion string
|
|
||||||
AigcType string
|
|
||||||
VerifyStatus string
|
|
||||||
VerifiedAt string
|
|
||||||
VerifiedBy string
|
|
||||||
}
|
|
||||||
|
|
||||||
// ImageCols 图片素材表字段常量
|
|
||||||
var ImageCols = ImageCol{
|
|
||||||
SQLBaseCol: beans.DefSQLBaseCol,
|
|
||||||
ImageId: "image_id",
|
|
||||||
AccountId: "account_id",
|
|
||||||
Width: "width",
|
|
||||||
Height: "height",
|
|
||||||
FileSize: "file_size",
|
|
||||||
Type: "type",
|
|
||||||
Signature: "signature",
|
|
||||||
Description: "description",
|
|
||||||
SourceSignature: "source_signature",
|
|
||||||
PreviewUrl: "preview_url",
|
|
||||||
ThumbPreviewUrl: "thumb_preview_url",
|
|
||||||
SourceType: "source_type",
|
|
||||||
ImageUsage: "image_usage",
|
|
||||||
CreatedTime: "created_time",
|
|
||||||
LastModifiedTime: "last_modified_time",
|
|
||||||
ProductCatalogId: "product_catalog_id",
|
|
||||||
ProductOuterId: "product_outer_id",
|
|
||||||
SourceReferenceId: "source_reference_id",
|
|
||||||
OwnerAccountId: "owner_account_id",
|
|
||||||
Status: "status",
|
|
||||||
SampleAspectRatio: "sample_aspect_ratio",
|
|
||||||
SourceMaterialId: "source_material_id",
|
|
||||||
NewSourceType: "new_source_type",
|
|
||||||
FirstPublicationStatus: "first_publication_status",
|
|
||||||
QualityStatus: "quality_status",
|
|
||||||
SimilarityStatus: "similarity_status",
|
|
||||||
UserAigcStatus: "user_aigc_status",
|
|
||||||
SystemAigcStatus: "system_aigc_status",
|
|
||||||
AigcSource: "aigc_source",
|
|
||||||
AigcFlag: "aigc_flag",
|
|
||||||
MuseAigcVersion: "muse_aigc_version",
|
|
||||||
AigcType: "aigc_type",
|
|
||||||
VerifyStatus: "verify_status",
|
|
||||||
VerifiedAt: "verified_at",
|
|
||||||
VerifiedBy: "verified_by",
|
|
||||||
}
|
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
package tencent
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Video 腾讯广告视频素材实体
|
|
||||||
type Video struct {
|
|
||||||
beans.SQLBaseDO `orm:",inherit"`
|
|
||||||
|
|
||||||
VideoId string `orm:"video_id" json:"videoId" description:"视频ID"`
|
|
||||||
AccountId int64 `orm:"account_id" json:"accountId" description:"账户ID"`
|
|
||||||
Width int `orm:"width" json:"width" description:"宽度"`
|
|
||||||
Height int `orm:"height" json:"height" description:"高度"`
|
|
||||||
VideoFrames int `orm:"video_frames" json:"videoFrames" description:"视频帧数"`
|
|
||||||
VideoFps int `orm:"video_fps" json:"videoFps" description:"帧率"`
|
|
||||||
VideoCodec string `orm:"video_codec" json:"videoCodec" description:"视频编码"`
|
|
||||||
VideoBitRate int64 `orm:"video_bit_rate" json:"videoBitRate" description:"视频码率"`
|
|
||||||
AudioCodec string `orm:"audio_codec" json:"audioCodec" description:"音频编码"`
|
|
||||||
AudioBitRate int64 `orm:"audio_bit_rate" json:"audioBitRate" description:"音频码率"`
|
|
||||||
FileSize int64 `orm:"file_size" json:"fileSize" description:"文件大小"`
|
|
||||||
Type string `orm:"type" json:"type" description:"媒体类型"`
|
|
||||||
Signature string `orm:"signature" json:"signature" description:"签名"`
|
|
||||||
SystemStatus string `orm:"system_status" json:"systemStatus" description:"系统状态"`
|
|
||||||
Description string `orm:"description" json:"description" description:"描述"`
|
|
||||||
PreviewUrl string `orm:"preview_url" json:"previewUrl" description:"预览URL"`
|
|
||||||
KeyFrameImageUrl string `orm:"key_frame_image_url" json:"keyFrameImageUrl" description:"关键帧图片URL"`
|
|
||||||
CreatedTime int64 `orm:"created_time" json:"createdTime" description:"创建时间戳"`
|
|
||||||
LastModifiedTime int64 `orm:"last_modified_time" json:"lastModifiedTime" description:"最后修改时间戳"`
|
|
||||||
VideoProfileName string `orm:"video_profile_name" json:"videoProfileName" description:"视频配置名称"`
|
|
||||||
AudioSampleRate int `orm:"audio_sample_rate" json:"audioSampleRate" description:"音频采样率"`
|
|
||||||
MaxKeyframeInterval int `orm:"max_keyframe_interval" json:"maxKeyframeInterval" description:"最大关键帧间隔"`
|
|
||||||
MinKeyframeInterval int `orm:"min_keyframe_interval" json:"minKeyframeInterval" description:"最小关键帧间隔"`
|
|
||||||
SampleAspectRatio string `orm:"sample_aspect_ratio" json:"sampleAspectRatio" description:"示例宽高比"`
|
|
||||||
AudioProfileName string `orm:"audio_profile_name" json:"audioProfileName" description:"音频配置名称"`
|
|
||||||
ScanType string `orm:"scan_type" json:"scanType" description:"扫描类型"`
|
|
||||||
ImageDurationMillisecond int64 `orm:"image_duration_millisecond" json:"imageDurationMillisecond" description:"图片时长(毫秒)"`
|
|
||||||
AudioDurationMillisecond int64 `orm:"audio_duration_millisecond" json:"audioDurationMillisecond" description:"音频时长(毫秒)"`
|
|
||||||
SourceType string `orm:"source_type" json:"sourceType" description:"来源类型"`
|
|
||||||
ProductCatalogId string `orm:"product_catalog_id" json:"productCatalogId" description:"产品目录ID"`
|
|
||||||
ProductOuterId string `orm:"product_outer_id" json:"productOuterId" description:"产品外部ID"`
|
|
||||||
SourceReferenceId string `orm:"source_reference_id" json:"sourceReferenceId" description:"源引用ID"`
|
|
||||||
OwnerAccountId string `orm:"owner_account_id" json:"ownerAccountId" description:"所有者账户ID"`
|
|
||||||
Status string `orm:"status" json:"status" description:"状态"`
|
|
||||||
SourceMaterialId string `orm:"source_material_id" json:"sourceMaterialId" description:"源素材ID"`
|
|
||||||
NewSourceType string `orm:"new_source_type" json:"newSourceType" description:"新来源类型"`
|
|
||||||
AigcType int `orm:"aigc_type" json:"aigcType" description:"AIGC类型"`
|
|
||||||
FirstPublicationStatus string `orm:"first_publication_status" json:"firstPublicationStatus" description:"首次发布状态"`
|
|
||||||
QualityStatus string `orm:"quality_status" json:"qualityStatus" description:"质量状态"`
|
|
||||||
CoverId string `orm:"cover_id" json:"coverId" description:"封面ID"`
|
|
||||||
SimilarityStatus string `orm:"similarity_status" json:"similarityStatus" description:"相似度状态"`
|
|
||||||
UserAigcStatus string `orm:"user_aigc_status" json:"userAigcStatus" description:"用户AIGC状态"`
|
|
||||||
SystemAigcStatus string `orm:"system_aigc_status" json:"systemAigcStatus" description:"系统AIGC状态"`
|
|
||||||
AigcSource string `orm:"aigc_source" json:"aigcSource" description:"AIGC来源"`
|
|
||||||
AigcFlag string `orm:"aigc_flag" json:"aigcFlag" description:"AIGC标志"`
|
|
||||||
MuseAigcVersion int `orm:"muse_aigc_version" json:"museAigcVersion" description:"Muse AIGC版本"`
|
|
||||||
|
|
||||||
// 本地校验状态
|
|
||||||
VerifyStatus string `orm:"verify_status" json:"verifyStatus" description:"校验状态(PENDING:待校验, VERIFIED:已校验, REJECTED:已拒绝)"`
|
|
||||||
VerifiedAt string `orm:"verified_at" json:"verifiedAt" description:"校验时间"`
|
|
||||||
VerifiedBy string `orm:"verified_by" json:"verifiedBy" description:"校验人"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// VideoCol 视频素材表字段定义
|
|
||||||
type VideoCol struct {
|
|
||||||
beans.SQLBaseCol
|
|
||||||
VideoId string
|
|
||||||
AccountId string
|
|
||||||
Width string
|
|
||||||
Height string
|
|
||||||
VideoFrames string
|
|
||||||
VideoFps string
|
|
||||||
VideoCodec string
|
|
||||||
VideoBitRate string
|
|
||||||
AudioCodec string
|
|
||||||
AudioBitRate string
|
|
||||||
FileSize string
|
|
||||||
Type string
|
|
||||||
Signature string
|
|
||||||
SystemStatus string
|
|
||||||
Description string
|
|
||||||
PreviewUrl string
|
|
||||||
KeyFrameImageUrl string
|
|
||||||
CreatedTime string
|
|
||||||
LastModifiedTime string
|
|
||||||
VideoProfileName string
|
|
||||||
AudioSampleRate string
|
|
||||||
MaxKeyframeInterval string
|
|
||||||
MinKeyframeInterval string
|
|
||||||
SampleAspectRatio string
|
|
||||||
AudioProfileName string
|
|
||||||
ScanType string
|
|
||||||
ImageDurationMillisecond string
|
|
||||||
AudioDurationMillisecond string
|
|
||||||
SourceType string
|
|
||||||
ProductCatalogId string
|
|
||||||
ProductOuterId string
|
|
||||||
SourceReferenceId string
|
|
||||||
OwnerAccountId string
|
|
||||||
Status string
|
|
||||||
SourceMaterialId string
|
|
||||||
NewSourceType string
|
|
||||||
AigcType string
|
|
||||||
FirstPublicationStatus string
|
|
||||||
QualityStatus string
|
|
||||||
CoverId string
|
|
||||||
SimilarityStatus string
|
|
||||||
UserAigcStatus string
|
|
||||||
SystemAigcStatus string
|
|
||||||
AigcSource string
|
|
||||||
AigcFlag string
|
|
||||||
MuseAigcVersion string
|
|
||||||
VerifyStatus string
|
|
||||||
VerifiedAt string
|
|
||||||
VerifiedBy string
|
|
||||||
}
|
|
||||||
|
|
||||||
// VideoCols 视频素材表字段常量
|
|
||||||
var VideoCols = VideoCol{
|
|
||||||
SQLBaseCol: beans.DefSQLBaseCol,
|
|
||||||
VideoId: "video_id",
|
|
||||||
AccountId: "account_id",
|
|
||||||
Width: "width",
|
|
||||||
Height: "height",
|
|
||||||
VideoFrames: "video_frames",
|
|
||||||
VideoFps: "video_fps",
|
|
||||||
VideoCodec: "video_codec",
|
|
||||||
VideoBitRate: "video_bit_rate",
|
|
||||||
AudioCodec: "audio_codec",
|
|
||||||
AudioBitRate: "audio_bit_rate",
|
|
||||||
FileSize: "file_size",
|
|
||||||
Type: "type",
|
|
||||||
Signature: "signature",
|
|
||||||
SystemStatus: "system_status",
|
|
||||||
Description: "description",
|
|
||||||
PreviewUrl: "preview_url",
|
|
||||||
KeyFrameImageUrl: "key_frame_image_url",
|
|
||||||
CreatedTime: "created_time",
|
|
||||||
LastModifiedTime: "last_modified_time",
|
|
||||||
VideoProfileName: "video_profile_name",
|
|
||||||
AudioSampleRate: "audio_sample_rate",
|
|
||||||
MaxKeyframeInterval: "max_keyframe_interval",
|
|
||||||
MinKeyframeInterval: "min_keyframe_interval",
|
|
||||||
SampleAspectRatio: "sample_aspect_ratio",
|
|
||||||
AudioProfileName: "audio_profile_name",
|
|
||||||
ScanType: "scan_type",
|
|
||||||
ImageDurationMillisecond: "image_duration_millisecond",
|
|
||||||
AudioDurationMillisecond: "audio_duration_millisecond",
|
|
||||||
SourceType: "source_type",
|
|
||||||
ProductCatalogId: "product_catalog_id",
|
|
||||||
ProductOuterId: "product_outer_id",
|
|
||||||
SourceReferenceId: "source_reference_id",
|
|
||||||
OwnerAccountId: "owner_account_id",
|
|
||||||
Status: "status",
|
|
||||||
SourceMaterialId: "source_material_id",
|
|
||||||
NewSourceType: "new_source_type",
|
|
||||||
AigcType: "aigc_type",
|
|
||||||
FirstPublicationStatus: "first_publication_status",
|
|
||||||
QualityStatus: "quality_status",
|
|
||||||
CoverId: "cover_id",
|
|
||||||
SimilarityStatus: "similarity_status",
|
|
||||||
UserAigcStatus: "user_aigc_status",
|
|
||||||
SystemAigcStatus: "system_aigc_status",
|
|
||||||
AigcSource: "aigc_source",
|
|
||||||
AigcFlag: "aigc_flag",
|
|
||||||
MuseAigcVersion: "muse_aigc_version",
|
|
||||||
VerifyStatus: "verify_status",
|
|
||||||
VerifiedAt: "verified_at",
|
|
||||||
VerifiedBy: "verified_by",
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,101 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"dataengine/syncdata"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
|
|
||||||
|
|
||||||
"github.com/gogf/gf/v2/os/gctx"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
ctx := gctx.New()
|
|
||||||
syncService := syncdata.NewSyncService()
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
|
|
||||||
now := time.Now()
|
|
||||||
lastHourEnd := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location())
|
|
||||||
lastHourStart := lastHourEnd.Add(-1 * time.Hour)
|
|
||||||
|
|
||||||
req := &syncdata.AccountReportRequest{
|
|
||||||
AdvertiserID: 10001,
|
|
||||||
StartTime: lastHourStart.UnixMilli(),
|
|
||||||
EndTime: lastHourEnd.UnixMilli(),
|
|
||||||
SelectColumns: []string{"impression", "click", "cost", "t0GMV"},
|
|
||||||
GroupType: 1,
|
|
||||||
QueryVersion: 1,
|
|
||||||
PageInfo: &syncdata.PageInfo{
|
|
||||||
CurrentPage: 1,
|
|
||||||
PageSize: 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
config := syncdata.ConcurrentSyncConfig{
|
|
||||||
MaxConcurrency: 5,
|
|
||||||
UseMock: true,
|
|
||||||
MaxRetries: 3,
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("=== 开始执行定时同步任务(并发模式)===")
|
|
||||||
logrus.Infof("时间区间:%s ~ %s", lastHourStart.Format("2006-01-02 15:04:05"), lastHourEnd.Format("2006-01-02 15:04:05"))
|
|
||||||
logrus.Infof("分页配置:每页大小=%d", req.PageInfo.PageSize)
|
|
||||||
logrus.Infof("并发配置:最大并发数=%d, 最大重试次数=%d", config.MaxConcurrency, config.MaxRetries)
|
|
||||||
|
|
||||||
result, err := syncService.SyncAccountReportConcurrent(ctx, req, config)
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("定时同步任务执行失败:%v", err)
|
|
||||||
logrus.Infof("主任务日志ID:%d", result.TaskLogID)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
hasFailedPages := result.DetailFailCount > 0
|
|
||||||
if hasFailedPages {
|
|
||||||
logrus.Warnf("⚠ 定时同步任务完成,但存在失败的页面")
|
|
||||||
} else {
|
|
||||||
logrus.Infof("✓ 定时同步任务全部成功")
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("主任务日志ID:%d", result.TaskLogID)
|
|
||||||
logrus.Infof("汇总数据:已保存=%v, ID=%d", result.SumSuccess, result.SumID)
|
|
||||||
logrus.Infof("明细统计:总记录数=%d, 成功页数=%d, 失败页数=%d",
|
|
||||||
result.DetailCount, result.DetailSuccessCount, result.DetailFailCount)
|
|
||||||
|
|
||||||
if hasFailedPages {
|
|
||||||
logrus.Warnf("失败的页面已记录到 sync_task_log 表,等待补偿调度器处理")
|
|
||||||
for _, pageResult := range result.PageResults {
|
|
||||||
if !pageResult.Success {
|
|
||||||
logrus.Warnf(" - 第 %d 页失败,任务日志ID=%d,错误:%s",
|
|
||||||
pageResult.PageNumber, pageResult.PageTaskLogID, pageResult.ErrorMessage)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Printf("\n=== 同步结果汇总 ===\n")
|
|
||||||
fmt.Printf("时间区间:%s ~ %s\n", lastHourStart.Format("2006-01-02 15:04:05"), lastHourEnd.Format("2006-01-02 15:04:05"))
|
|
||||||
fmt.Printf("汇总数据:已保存=%v, ID=%d\n", result.SumSuccess, result.SumID)
|
|
||||||
fmt.Printf("明细统计:总记录数=%d, 成功页数=%d, 失败页数=%d\n",
|
|
||||||
result.DetailCount, result.DetailSuccessCount, result.DetailFailCount)
|
|
||||||
fmt.Printf("主任务日志ID:%d\n", result.TaskLogID)
|
|
||||||
|
|
||||||
if len(result.PageResults) > 0 {
|
|
||||||
fmt.Printf("\n分页任务详情:\n")
|
|
||||||
for _, pageResult := range result.PageResults {
|
|
||||||
status := "✓ 成功"
|
|
||||||
if !pageResult.Success {
|
|
||||||
status = fmt.Sprintf("✗ 失败: %s", pageResult.ErrorMessage)
|
|
||||||
}
|
|
||||||
fmt.Printf(" - 第 %d 页:任务ID=%d, 记录数=%d, 耗时=%dms, 状态=%s\n",
|
|
||||||
pageResult.PageNumber, pageResult.PageTaskLogID,
|
|
||||||
pageResult.RecordCount, pageResult.DurationMs, status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if hasFailedPages {
|
|
||||||
fmt.Printf("\n⚠ 警告:存在 %d 个失败的页面,请检查日志并触发补偿任务\n", result.DetailFailCount)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,372 +2,131 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
dao "dataengine/dao/copydata"
|
dao "dataengine/dao/copydata"
|
||||||
taskDto "dataengine/model/dto/copydata"
|
taskDto "dataengine/model/dto/copydata"
|
||||||
"dataengine/syncdata"
|
syncSvc "dataengine/service/sync"
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
"sync/atomic"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
"gitea.com/red-future/common/beans"
|
||||||
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
|
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
|
||||||
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
"github.com/gogf/gf/v2/os/gctx"
|
"github.com/gogf/gf/v2/os/gctx"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"golang.org/x/sync/semaphore"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// CompensationScheduler 补偿调度器,负责扫描和补偿失败的分页同步任务
|
// CompensationScheduler 通用补偿调度器
|
||||||
type CompensationScheduler struct {
|
type CompensationScheduler struct {
|
||||||
syncService *syncdata.SyncService
|
interval time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCompensationScheduler 创建补偿调度器实例
|
// NewCompensationScheduler 创建调度器
|
||||||
func NewCompensationScheduler() *CompensationScheduler {
|
func NewCompensationScheduler() *CompensationScheduler {
|
||||||
return &CompensationScheduler{
|
|
||||||
syncService: syncdata.NewSyncService(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RunCompensationOnce 执行一次补偿任务(用于手动触发或定时任务调用)
|
|
||||||
func (s *CompensationScheduler) RunCompensationOnce() {
|
|
||||||
ctx := gctx.New()
|
ctx := gctx.New()
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
sec := g.Cfg().MustGet(ctx, "sync.compensation_interval_seconds", 300).Int()
|
||||||
|
if sec < 10 {
|
||||||
logrus.Info("=== 开始执行数据同步补偿任务 ===")
|
sec = 300
|
||||||
s.processCompensation(ctx)
|
}
|
||||||
logrus.Info("=== 补偿任务执行完毕 ===")
|
return &CompensationScheduler{interval: time.Duration(sec) * time.Second}
|
||||||
}
|
}
|
||||||
|
|
||||||
// processCompensation 处理补偿逻辑:扫描失败的分页任务并逐个补偿
|
// RunOnce 执行一次补偿
|
||||||
func (s *CompensationScheduler) processCompensation(ctx context.Context) {
|
func (s *CompensationScheduler) RunOnce() {
|
||||||
logrus.Info(">>> 开始扫描需要补偿的失败分页任务...")
|
ctx := gctx.New()
|
||||||
|
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin", TenantId: 1})
|
||||||
|
|
||||||
queryReq := &taskDto.QueryFailedTasksReq{
|
logrus.Info("=== 开始补偿扫描 ===")
|
||||||
Status: []string{"failed"},
|
|
||||||
TaskType: "account_report_page",
|
|
||||||
Limit: 50,
|
|
||||||
}
|
|
||||||
|
|
||||||
failedPageTasks, err := dao.SyncTaskLog.QueryFailedTasks(ctx, queryReq)
|
// 查询所有 failed 状态的任务,不限类型
|
||||||
|
tasks, err := dao.SyncTaskLog.QueryFailedTasks(ctx, &taskDto.QueryFailedTasksReq{
|
||||||
|
Status: []string{"failed"},
|
||||||
|
Limit: 50,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("查询失败的分页任务异常:%v", err)
|
logrus.Errorf("查询失败任务异常: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(tasks) == 0 {
|
||||||
|
logrus.Info("当前没有需要补偿的任务")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(failedPageTasks) == 0 {
|
logrus.Infof("发现 %d 个失败任务", len(tasks))
|
||||||
logrus.Info("✓ 当前没有需要补偿的失败分页任务")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("发现 %d 个需要补偿的失败分页任务,开始并发处理...", len(failedPageTasks))
|
for _, task := range tasks {
|
||||||
|
if task.RetryCount >= task.MaxRetry {
|
||||||
|
logrus.Warnf("任务 %s 已达最大重试次数 %d", task.TaskID, task.MaxRetry)
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "manual_review",
|
||||||
|
ErrorMessage: fmt.Sprintf("已达最大重试次数 %d", task.MaxRetry),
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
maxConcurrency := 5
|
platformCode := task.PlatformCode
|
||||||
var successCount int64
|
interfaceCode := task.InterfaceCode
|
||||||
var failCount int64
|
if platformCode == "" || interfaceCode == "" {
|
||||||
var manualReviewCount int64
|
logrus.Warnf("任务 %s 缺少 platform_code 或 interface_code,跳过", task.TaskID)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
sem := semaphore.NewWeighted(int64(maxConcurrency))
|
logrus.Infof("补偿: %s/%s (第 %d 次)", platformCode, interfaceCode, task.RetryCount+1)
|
||||||
var wg sync.WaitGroup
|
|
||||||
|
|
||||||
for _, pageTask := range failedPageTasks {
|
// 更新状态为 retrying
|
||||||
wg.Add(1)
|
retryCount := task.RetryCount + 1
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "retrying",
|
||||||
|
RetryCount: &retryCount,
|
||||||
|
})
|
||||||
|
|
||||||
go func(task *taskDto.SyncTaskLogItem) {
|
// 执行补偿(增量同步)
|
||||||
defer wg.Done()
|
_, err := syncSvc.SyncByConfig(ctx, platformCode, interfaceCode, false)
|
||||||
|
if err != nil {
|
||||||
if err := sem.Acquire(ctx, 1); err != nil {
|
logrus.Errorf("补偿失败: %v", err)
|
||||||
logrus.Errorf("获取信号量失败:%v", err)
|
// 更新状态为 failed,设置下次重试时间
|
||||||
atomic.AddInt64(&failCount, 1)
|
backoff := []int{5, 15, 30, 60, 120}
|
||||||
return
|
waitMin := 5
|
||||||
}
|
if retryCount <= len(backoff) {
|
||||||
defer sem.Release(1)
|
waitMin = backoff[retryCount-1]
|
||||||
|
|
||||||
if task.RetryCount >= task.MaxRetry {
|
|
||||||
logrus.Warnf("⚠ 分页任务 %s 已达到最大重试次数 %d,标记为需人工处理", task.TaskID, task.MaxRetry)
|
|
||||||
|
|
||||||
updateReq := &taskDto.UpdateSyncTaskLogReq{
|
|
||||||
ID: task.Id,
|
|
||||||
Status: "manual_review",
|
|
||||||
ErrorMessage: fmt.Sprintf("已达到最大重试次数 %d 次", task.MaxRetry),
|
|
||||||
ErrorCode: "MAX_RETRY_EXCEEDED",
|
|
||||||
}
|
|
||||||
dao.SyncTaskLog.Update(ctx, updateReq)
|
|
||||||
|
|
||||||
s.sendAlert(task)
|
|
||||||
atomic.AddInt64(&manualReviewCount, 1)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("▶ 开始补偿分页任务:%s (广告主=%d, 第 %d/%d 次重试)",
|
|
||||||
task.TaskID, task.AdvertiserID, task.RetryCount+1, task.MaxRetry)
|
|
||||||
|
|
||||||
if s.compensatePageTask(ctx, task) {
|
|
||||||
atomic.AddInt64(&successCount, 1)
|
|
||||||
logrus.Infof("✓ 分页任务 %s 补偿成功", task.TaskID)
|
|
||||||
|
|
||||||
parentTaskID := s.extractParentTaskID(task.TaskID)
|
|
||||||
if parentTaskID != "" {
|
|
||||||
s.checkAndUpdateParentTaskStatus(ctx, parentTaskID)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
atomic.AddInt64(&failCount, 1)
|
waitMin = backoff[len(backoff)-1]
|
||||||
logrus.Warnf("✗ 分页任务 %s 补偿失败", task.TaskID)
|
|
||||||
}
|
}
|
||||||
}(pageTask)
|
nextRetry := time.Now().Add(time.Duration(waitMin) * time.Minute)
|
||||||
}
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
wg.Wait()
|
Status: "failed",
|
||||||
|
ErrorMessage: err.Error(),
|
||||||
finalSuccess := atomic.LoadInt64(&successCount)
|
ErrorCode: "COMPENSATION_FAILED",
|
||||||
finalFail := atomic.LoadInt64(&failCount)
|
NextRetryTime: nextRetry,
|
||||||
finalManualReview := atomic.LoadInt64(&manualReviewCount)
|
})
|
||||||
|
} else {
|
||||||
logrus.Infof("=== 补偿任务执行完成:总计=%d, 成功=%d, 失败=%d, 需人工处理=%d ===",
|
logrus.Infof("补偿成功: %s/%s", platformCode, interfaceCode)
|
||||||
len(failedPageTasks), finalSuccess, finalFail, finalManualReview)
|
now := time.Now()
|
||||||
}
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
// compensatePageTask 补偿单个分页任务:重新请求API并插入数据
|
Status: "success",
|
||||||
// 返回 true 表示补偿成功,false 表示补偿失败
|
CompletedAt: now,
|
||||||
func (s *CompensationScheduler) compensatePageTask(ctx context.Context, pageTask *taskDto.SyncTaskLogItem) bool {
|
})
|
||||||
retryCount := pageTask.RetryCount + 1
|
|
||||||
|
|
||||||
updateReq := &taskDto.UpdateSyncTaskLogReq{
|
|
||||||
ID: pageTask.Id,
|
|
||||||
Status: "retrying",
|
|
||||||
RetryCount: &retryCount,
|
|
||||||
}
|
|
||||||
if err := dao.SyncTaskLog.Update(ctx, updateReq); err != nil {
|
|
||||||
logrus.Errorf("更新任务状态为 retrying 失败:%v", err)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
startTime := s.parseTime(pageTask.StartTime)
|
|
||||||
endTime := s.parseTime(pageTask.EndTime)
|
|
||||||
|
|
||||||
pageNumber := s.extractPageNumber(pageTask.TaskID)
|
|
||||||
if pageNumber == 0 {
|
|
||||||
logrus.Errorf("无法从任务ID %s 解析页码", pageTask.TaskID)
|
|
||||||
s.markPageTaskFailed(ctx, pageTask.Id, retryCount, "无法解析页码", "PARSE_PAGE_NUMBER_FAILED")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
pageSize := s.extractPageSize(pageTask)
|
|
||||||
|
|
||||||
req := &syncdata.AccountReportRequest{
|
|
||||||
AdvertiserID: pageTask.AdvertiserID,
|
|
||||||
StartTime: startTime.UnixMilli(),
|
|
||||||
EndTime: endTime.UnixMilli(),
|
|
||||||
SelectColumns: []string{"impression", "click", "cost", "t0GMV"},
|
|
||||||
GroupType: 1,
|
|
||||||
QueryVersion: 1,
|
|
||||||
PageInfo: &syncdata.PageInfo{
|
|
||||||
CurrentPage: pageNumber,
|
|
||||||
PageSize: pageSize,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
maxRetries := 3
|
|
||||||
parentTaskID := s.extractParentTaskID(pageTask.TaskID)
|
|
||||||
pageTaskID := fmt.Sprintf("%s_page_%d", parentTaskID, pageNumber)
|
|
||||||
|
|
||||||
result, _, err := s.syncService.SyncSinglePageWithTask(ctx, req, true, maxRetries, pageTaskID, pageNumber)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("补偿分页任务 %s 失败(第 %d 次):%v", pageTask.TaskID, retryCount, err)
|
|
||||||
s.markPageTaskFailed(ctx, pageTask.Id, retryCount, err.Error(), "PAGE_COMPENSATION_FAILED")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
logrus.Infof("✓ 补偿分页任务 %s 成功 - 记录数=%d", pageTask.TaskID, result.DetailCount)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// markPageTaskFailed 标记分页任务为失败状态,并设置下次重试时间(指数退避策略)
|
|
||||||
func (s *CompensationScheduler) markPageTaskFailed(ctx context.Context, taskID int64, retryCount int, errMsg, errCode string) {
|
|
||||||
backoffMinutes := s.calculateBackoff(retryCount)
|
|
||||||
nextRetry := time.Now().Add(time.Duration(backoffMinutes) * time.Minute)
|
|
||||||
|
|
||||||
updateReq := &taskDto.UpdateSyncTaskLogReq{
|
|
||||||
ID: taskID,
|
|
||||||
Status: "failed",
|
|
||||||
ErrorMessage: errMsg,
|
|
||||||
ErrorCode: errCode,
|
|
||||||
NextRetryTime: nextRetry,
|
|
||||||
}
|
|
||||||
dao.SyncTaskLog.Update(ctx, updateReq)
|
|
||||||
}
|
|
||||||
|
|
||||||
// checkAndUpdateParentTaskStatus 检查主任务的所有分页任务状态,如果全部成功则更新主任务状态
|
|
||||||
func (s *CompensationScheduler) checkAndUpdateParentTaskStatus(ctx context.Context, parentTaskID string) {
|
|
||||||
logrus.Infof(">>> 检查主任务 %s 的所有分页任务状态...", parentTaskID)
|
|
||||||
|
|
||||||
parentTask, err := dao.SyncTaskLog.GetByTaskID(ctx, parentTaskID, "account_report")
|
|
||||||
if err != nil || parentTask == nil {
|
|
||||||
logrus.Warnf("未找到主任务 %s,跳过状态更新", parentTaskID)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if parentTask.Status == "success" {
|
|
||||||
logrus.Infof("主任务 %s 已经是成功状态,无需更新", parentTaskID)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
allPageTasks, err := dao.SyncTaskLog.QueryAllPageTasksByParentID(ctx, parentTaskID, 1000)
|
|
||||||
if err != nil {
|
|
||||||
logrus.Errorf("查询主任务 %s 的分页任务失败:%v", parentTaskID, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(allPageTasks) == 0 {
|
|
||||||
logrus.Warnf("主任务 %s 没有找到任何分页任务", parentTaskID)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
failedPages := make([]int, 0)
|
|
||||||
successPages := make([]int, 0)
|
|
||||||
|
|
||||||
for _, pageTask := range allPageTasks {
|
|
||||||
pageNumber := s.extractPageNumber(pageTask.TaskID)
|
|
||||||
if pageTask.Status == "success" {
|
|
||||||
successPages = append(successPages, pageNumber)
|
|
||||||
} else if pageTask.Status == "failed" || pageTask.Status == "manual_review" {
|
|
||||||
failedPages = append(failedPages, pageNumber)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Infof("主任务 %s 分页状态:总数=%d, 成功=%d, 失败=%d",
|
logrus.Info("=== 补偿扫描完成 ===")
|
||||||
parentTaskID, len(allPageTasks), len(successPages), len(failedPages))
|
|
||||||
|
|
||||||
if len(failedPages) == 0 {
|
|
||||||
logrus.Infof("✓ 主任务 %s 的所有分页任务都已成功,更新主任务状态为 success", parentTaskID)
|
|
||||||
|
|
||||||
summary := map[string]interface{}{
|
|
||||||
"total_pages": len(allPageTasks),
|
|
||||||
"success_pages": len(successPages),
|
|
||||||
"failed_pages": 0,
|
|
||||||
"compensated": true,
|
|
||||||
}
|
|
||||||
|
|
||||||
updateReq := &taskDto.UpdateSyncTaskLogReq{
|
|
||||||
ID: parentTask.Id,
|
|
||||||
Status: "success",
|
|
||||||
ResultSummary: summary,
|
|
||||||
}
|
|
||||||
if err := dao.SyncTaskLog.Update(ctx, updateReq); err != nil {
|
|
||||||
logrus.Errorf("更新主任务 %s 状态失败:%v", parentTaskID, err)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logrus.Infof("⚠ 主任务 %s 仍有 %d 个失败的分页任务:%v,保持部分失败状态",
|
|
||||||
parentTaskID, len(failedPages), failedPages)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// extractParentTaskID 从分页任务ID中提取主任务ID
|
// Start 启动
|
||||||
// 例如:从 "12345_1234567890_account_page_2" 提取 "12345_1234567890_account"
|
func (s *CompensationScheduler) Start() {
|
||||||
func (s *CompensationScheduler) extractParentTaskID(taskID string) string {
|
logrus.Infof("补偿调度器启动,间隔: %v", s.interval)
|
||||||
if idx := strings.LastIndex(taskID, "_page_"); idx > 0 {
|
s.RunOnce()
|
||||||
return taskID[:idx]
|
ticker := time.NewTicker(s.interval)
|
||||||
|
defer ticker.Stop()
|
||||||
|
for range ticker.C {
|
||||||
|
s.RunOnce()
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// extractPageNumber 从分页任务ID中提取页码
|
|
||||||
// 例如:从 "12345_1234567890_account_page_2" 提取 2
|
|
||||||
func (s *CompensationScheduler) extractPageNumber(taskID string) int {
|
|
||||||
if idx := strings.LastIndex(taskID, "_page_"); idx > 0 {
|
|
||||||
var pageNum int
|
|
||||||
fmt.Sscanf(taskID[idx+6:], "%d", &pageNum)
|
|
||||||
return pageNum
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// extractPageSize 从任务日志的 PageInfo 或 RequestParams 字段中提取每页大小
|
|
||||||
// 优先级:PageInfo.page_size > RequestParams.page_size > 默认值10
|
|
||||||
func (s *CompensationScheduler) extractPageSize(pageTask *taskDto.SyncTaskLogItem) int {
|
|
||||||
logrus.Infof("DEBUG - PageInfo 类型: %T, 值: %+v", pageTask.PageInfo, pageTask.PageInfo)
|
|
||||||
logrus.Infof("DEBUG - RequestParams 类型: %T, 值: %+v", pageTask.RequestParams, pageTask.RequestParams)
|
|
||||||
|
|
||||||
// 优先从 PageInfo 中提取
|
|
||||||
if pageTask.PageInfo != nil {
|
|
||||||
switch v := pageTask.PageInfo.(type) {
|
|
||||||
case map[string]interface{}:
|
|
||||||
// 尝试 float64 类型(JSON 数字默认类型)
|
|
||||||
if pageSize, ok := v["page_size"].(float64); ok {
|
|
||||||
return int(pageSize)
|
|
||||||
}
|
|
||||||
// 尝试 string 类型
|
|
||||||
if pageSizeStr, ok := v["page_size"].(string); ok {
|
|
||||||
var pageSize int
|
|
||||||
fmt.Sscanf(pageSizeStr, "%d", &pageSize)
|
|
||||||
if pageSize > 0 {
|
|
||||||
return pageSize
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case map[string]string:
|
|
||||||
if pageSizeStr, ok := v["page_size"]; ok {
|
|
||||||
var pageSize int
|
|
||||||
fmt.Sscanf(pageSizeStr, "%d", &pageSize)
|
|
||||||
if pageSize > 0 {
|
|
||||||
return pageSize
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 其次从 RequestParams 中提取
|
|
||||||
if pageTask.RequestParams != nil {
|
|
||||||
switch v := pageTask.RequestParams.(type) {
|
|
||||||
case map[string]interface{}:
|
|
||||||
if pageSize, ok := v["page_size"].(float64); ok {
|
|
||||||
return int(pageSize)
|
|
||||||
}
|
|
||||||
if pageSizeStr, ok := v["page_size"].(string); ok {
|
|
||||||
var pageSize int
|
|
||||||
fmt.Sscanf(pageSizeStr, "%d", &pageSize)
|
|
||||||
if pageSize > 0 {
|
|
||||||
return pageSize
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 默认值改为 10
|
|
||||||
return 10
|
|
||||||
}
|
|
||||||
|
|
||||||
// calculateBackoff 根据重试次数计算退避时间(分钟)
|
|
||||||
// 重试次数:1->5分钟, 2->15分钟, 3->30分钟, 4->60分钟, 5+->120分钟
|
|
||||||
func (s *CompensationScheduler) calculateBackoff(retryCount int) int {
|
|
||||||
backoffs := []int{5, 15, 30, 60, 120}
|
|
||||||
if retryCount <= len(backoffs) {
|
|
||||||
return backoffs[retryCount-1]
|
|
||||||
}
|
|
||||||
return backoffs[len(backoffs)-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// parseTime 解析时间字段,支持 time.Time 和字符串格式
|
|
||||||
func (s *CompensationScheduler) parseTime(t interface{}) time.Time {
|
|
||||||
switch v := t.(type) {
|
|
||||||
case time.Time:
|
|
||||||
return v
|
|
||||||
case string:
|
|
||||||
if parsed, err := time.Parse("2006-01-02 15:04:05", v); err == nil {
|
|
||||||
return parsed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return time.Now()
|
|
||||||
}
|
|
||||||
|
|
||||||
// sendAlert 发送告警通知(当前仅记录错误日志)
|
|
||||||
func (s *CompensationScheduler) sendAlert(task *taskDto.SyncTaskLogItem) {
|
|
||||||
logrus.Errorf("【告警】分页任务 %s 需要人工介入:广告主=%d, 错误=%s",
|
|
||||||
task.TaskID, task.AdvertiserID, task.ErrorMessage)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
scheduler := NewCompensationScheduler()
|
NewCompensationScheduler().Start()
|
||||||
scheduler.RunCompensationOnce()
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,396 +0,0 @@
|
|||||||
package service
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
|
||||||
"math"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
entities "dataengine/entities"
|
|
||||||
)
|
|
||||||
|
|
||||||
// APIService API服务接口
|
|
||||||
type APIService interface {
|
|
||||||
GetCampaignReport(params *entities.RequestParams) (*entities.APIResponse, error)
|
|
||||||
GetCampaignReportByTimeRange(advertiserID int64, startTime, endTime int64) (*entities.APIResponse, error)
|
|
||||||
GetAllCampaignReport(params *entities.RequestParams) (*entities.APIResponse, error)
|
|
||||||
GetAllCampaignReportByTimeRange(advertiserID int64, startTime, endTime int64) (*entities.APIResponse, error)
|
|
||||||
GetCampaignReportWithCallback(params *entities.RequestParams, callback func(*entities.APIResponse, error) bool) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// KuaishouAPIService 快手API服务实现
|
|
||||||
type KuaishouAPIService struct {
|
|
||||||
BaseURL string
|
|
||||||
AccessToken string
|
|
||||||
HTTPClient *http.Client
|
|
||||||
MaxRetries int
|
|
||||||
RetryDelay time.Duration
|
|
||||||
RateLimit time.Duration // 请求间隔,避免触发限流
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewKuaishouAPIService 创建API服务实例
|
|
||||||
func NewKuaishouAPIService(accessToken string) *KuaishouAPIService {
|
|
||||||
return &KuaishouAPIService{
|
|
||||||
BaseURL: "https://ad.e.kuaishou.com/rest/openapi/gw/esp/report",
|
|
||||||
AccessToken: accessToken,
|
|
||||||
HTTPClient: &http.Client{
|
|
||||||
Timeout: 30 * time.Second,
|
|
||||||
},
|
|
||||||
MaxRetries: 3,
|
|
||||||
RetryDelay: 2 * time.Second,
|
|
||||||
RateLimit: 200 * time.Millisecond, // 默认200ms间隔
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetRateLimit 设置请求间隔
|
|
||||||
func (s *KuaishouAPIService) SetRateLimit(delay time.Duration) {
|
|
||||||
s.RateLimit = delay
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCampaignReport 获取广告计划报表(单页)
|
|
||||||
func (s *KuaishouAPIService) GetCampaignReport(params *entities.RequestParams) (*entities.APIResponse, error) {
|
|
||||||
for retry := 0; retry <= s.MaxRetries; retry++ {
|
|
||||||
response, err := s.doRequest(params)
|
|
||||||
if err == nil {
|
|
||||||
return response, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断是否重试
|
|
||||||
if retry < s.MaxRetries {
|
|
||||||
time.Sleep(s.RetryDelay)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, fmt.Errorf("请求失败,已达到最大重试次数")
|
|
||||||
}
|
|
||||||
|
|
||||||
// doRequest 执行实际请求
|
|
||||||
func (s *KuaishouAPIService) doRequest(params *entities.RequestParams) (*entities.APIResponse, error) {
|
|
||||||
// 序列化请求参数
|
|
||||||
jsonData, err := json.Marshal(params)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("序列化失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建HTTP请求
|
|
||||||
url := fmt.Sprintf("%s/campaignReport", s.BaseURL)
|
|
||||||
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("创建请求失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置请求头
|
|
||||||
s.setHeaders(req)
|
|
||||||
|
|
||||||
// 发送请求
|
|
||||||
resp, err := s.HTTPClient.Do(req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("请求失败: %v", err)
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
// 检查HTTP状态码
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
|
||||||
body, _ := ioutil.ReadAll(resp.Body)
|
|
||||||
return nil, fmt.Errorf("HTTP状态码错误: %d, 响应: %s", resp.StatusCode, string(body))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 读取响应
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("读取响应失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析响应
|
|
||||||
var apiResponse entities.APIResponse
|
|
||||||
err = json.Unmarshal(body, &apiResponse)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("解析响应失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查API返回码
|
|
||||||
if apiResponse.Code != 0 {
|
|
||||||
return nil, fmt.Errorf("API返回错误: %s (code: %d)", apiResponse.Message, apiResponse.Code)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &apiResponse, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAllCampaignReport 获取所有分页数据
|
|
||||||
func (s *KuaishouAPIService) GetAllCampaignReport(params *entities.RequestParams) (*entities.APIResponse, error) {
|
|
||||||
// 1. 先获取第一页数据,得到总数
|
|
||||||
params.ResetPage()
|
|
||||||
firstPage, err := s.GetCampaignReport(params)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("获取第一页数据失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if firstPage.Data == nil {
|
|
||||||
return firstPage, nil // 没有数据
|
|
||||||
}
|
|
||||||
|
|
||||||
totalCount := firstPage.Data.TotalCount
|
|
||||||
pageSize := params.PageInfo.PageSize
|
|
||||||
|
|
||||||
// 2. 如果只有一页,直接返回
|
|
||||||
if totalCount <= pageSize {
|
|
||||||
return firstPage, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 计算总页数
|
|
||||||
totalPages := int(math.Ceil(float64(totalCount) / float64(pageSize)))
|
|
||||||
|
|
||||||
// 4. 创建结果集
|
|
||||||
allResponses := make([]*entities.APIResponse, 0, totalPages)
|
|
||||||
allResponses = append(allResponses, firstPage)
|
|
||||||
|
|
||||||
// 5. 并发获取剩余页数据
|
|
||||||
pageChan := make(chan *pageResult, totalPages-1)
|
|
||||||
|
|
||||||
// 启动goroutine获取剩余页
|
|
||||||
for page := 2; page <= totalPages; page++ {
|
|
||||||
go func(currentPage int) {
|
|
||||||
// 复制参数并设置页码
|
|
||||||
pageParams := *params
|
|
||||||
pageParams.PageInfo = &entities.PageInfo{
|
|
||||||
CurrentPage: currentPage,
|
|
||||||
PageSize: pageSize,
|
|
||||||
}
|
|
||||||
|
|
||||||
response, err := s.GetCampaignReport(&pageParams)
|
|
||||||
pageChan <- &pageResult{
|
|
||||||
Page: currentPage,
|
|
||||||
Response: response,
|
|
||||||
Error: err,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 控制请求频率
|
|
||||||
time.Sleep(s.RateLimit)
|
|
||||||
}(page)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 6. 收集结果
|
|
||||||
errors := make([]error, 0)
|
|
||||||
for i := 0; i < totalPages-1; i++ {
|
|
||||||
result := <-pageChan
|
|
||||||
if result.Error != nil {
|
|
||||||
errors = append(errors, fmt.Errorf("第%d页获取失败: %v", result.Page, result.Error))
|
|
||||||
} else {
|
|
||||||
allResponses = append(allResponses, result.Response)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 7. 合并数据
|
|
||||||
mergedResponse := entities.MergeData(allResponses)
|
|
||||||
|
|
||||||
// 8. 如果有错误,返回错误信息
|
|
||||||
if len(errors) > 0 {
|
|
||||||
// 可以记录错误日志,但继续返回已获取的数据
|
|
||||||
fmt.Printf("部分页面获取失败: %v\n", errors)
|
|
||||||
}
|
|
||||||
|
|
||||||
return mergedResponse, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAllCampaignReportByTimeRange 根据时间范围获取所有数据
|
|
||||||
func (s *KuaishouAPIService) GetAllCampaignReportByTimeRange(advertiserID int64, startTime, endTime int64) (*entities.APIResponse, error) {
|
|
||||||
params := entities.NewRequestParams()
|
|
||||||
params.AdvertiserID = advertiserID
|
|
||||||
params.StartTime = startTime
|
|
||||||
params.EndTime = endTime
|
|
||||||
|
|
||||||
return s.GetAllCampaignReport(params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCampaignReportWithCallback 使用回调函数获取所有数据(流式处理,避免内存占用过大)
|
|
||||||
func (s *KuaishouAPIService) GetCampaignReportWithCallback(params *entities.RequestParams, callback func(*entities.APIResponse, error) bool) error {
|
|
||||||
// 1. 先获取第一页数据,得到总数
|
|
||||||
params.ResetPage()
|
|
||||||
firstPage, err := s.GetCampaignReport(params)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("获取第一页数据失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 调用回调处理第一页
|
|
||||||
if !callback(firstPage, nil) {
|
|
||||||
return nil // 回调要求停止
|
|
||||||
}
|
|
||||||
|
|
||||||
if firstPage.Data == nil || firstPage.Data.TotalCount <= params.PageInfo.PageSize {
|
|
||||||
return nil // 只有一页
|
|
||||||
}
|
|
||||||
|
|
||||||
totalCount := firstPage.Data.TotalCount
|
|
||||||
pageSize := params.PageInfo.PageSize
|
|
||||||
totalPages := int(math.Ceil(float64(totalCount) / float64(pageSize)))
|
|
||||||
|
|
||||||
// 2. 顺序获取剩余页数据(避免并发导致API限流)
|
|
||||||
for page := 2; page <= totalPages; page++ {
|
|
||||||
// 复制参数并设置页码
|
|
||||||
pageParams := *params
|
|
||||||
pageParams.PageInfo = &entities.PageInfo{
|
|
||||||
CurrentPage: page,
|
|
||||||
PageSize: pageSize,
|
|
||||||
}
|
|
||||||
|
|
||||||
response, err := s.GetCampaignReport(&pageParams)
|
|
||||||
if !callback(response, err) {
|
|
||||||
return nil // 回调要求停止
|
|
||||||
}
|
|
||||||
|
|
||||||
// 控制请求频率
|
|
||||||
time.Sleep(s.RateLimit)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCampaignReportSequential 顺序获取所有数据(简单实现)
|
|
||||||
func (s *KuaishouAPIService) GetCampaignReportSequential(params *entities.RequestParams) (*entities.APIResponse, error) {
|
|
||||||
// 1. 先获取第一页数据,得到总数
|
|
||||||
params.ResetPage()
|
|
||||||
firstPage, err := s.GetCampaignReport(params)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("获取第一页数据失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if firstPage.Data == nil {
|
|
||||||
return firstPage, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
totalCount := firstPage.Data.TotalCount
|
|
||||||
pageSize := params.PageInfo.PageSize
|
|
||||||
|
|
||||||
// 2. 如果只有一页,直接返回
|
|
||||||
if totalCount <= pageSize {
|
|
||||||
return firstPage, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 顺序获取所有数据
|
|
||||||
allDetails := make([]*entities.ReportDetail, 0, totalCount)
|
|
||||||
if firstPage.Data.Detail != nil {
|
|
||||||
allDetails = append(allDetails, firstPage.Data.Detail...)
|
|
||||||
}
|
|
||||||
|
|
||||||
totalPages := int(math.Ceil(float64(totalCount) / float64(pageSize)))
|
|
||||||
|
|
||||||
for page := 2; page <= totalPages; page++ {
|
|
||||||
// 复制参数并设置页码
|
|
||||||
pageParams := *params
|
|
||||||
pageParams.PageInfo = &entities.PageInfo{
|
|
||||||
CurrentPage: page,
|
|
||||||
PageSize: pageSize,
|
|
||||||
}
|
|
||||||
|
|
||||||
response, err := s.GetCampaignReport(&pageParams)
|
|
||||||
if err != nil {
|
|
||||||
// 记录错误但继续获取
|
|
||||||
fmt.Printf("第%d页获取失败: %v\n", page, err)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if response.Data != nil && response.Data.Detail != nil {
|
|
||||||
allDetails = append(allDetails, response.Data.Detail...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 控制请求频率
|
|
||||||
time.Sleep(s.RateLimit)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. 构建完整响应
|
|
||||||
completeResponse := &entities.APIResponse{
|
|
||||||
Code: firstPage.Code,
|
|
||||||
Message: firstPage.Message,
|
|
||||||
Data: &entities.ReportData{
|
|
||||||
Sum: firstPage.Data.Sum,
|
|
||||||
Detail: allDetails,
|
|
||||||
TotalCount: totalCount,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return completeResponse, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// setHeaders 设置请求头
|
|
||||||
func (s *KuaishouAPIService) setHeaders(req *http.Request) {
|
|
||||||
req.Header.Set("Content-Type", "application/json")
|
|
||||||
req.Header.Set("Accept", "application/json")
|
|
||||||
if s.AccessToken != "" {
|
|
||||||
req.Header.Set("Access-Token", s.AccessToken)
|
|
||||||
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", s.AccessToken))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// pageResult 分页结果
|
|
||||||
type pageResult struct {
|
|
||||||
Page int
|
|
||||||
Response *entities.APIResponse
|
|
||||||
Error error
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReportStatistics 报表统计
|
|
||||||
type ReportStatistics struct {
|
|
||||||
TotalImpression int64
|
|
||||||
TotalClick int64
|
|
||||||
TotalCost float64
|
|
||||||
TotalGMV float64
|
|
||||||
TotalT0GMV float64
|
|
||||||
TotalT0OrderCnt int64
|
|
||||||
PageCount int
|
|
||||||
RecordCount int
|
|
||||||
}
|
|
||||||
|
|
||||||
// CalculateStatistics 计算统计信息
|
|
||||||
func CalculateStatistics(response *entities.APIResponse) *ReportStatistics {
|
|
||||||
stats := &ReportStatistics{}
|
|
||||||
|
|
||||||
if response.Data == nil {
|
|
||||||
return stats
|
|
||||||
}
|
|
||||||
|
|
||||||
stats.PageCount = 1 // 默认值
|
|
||||||
stats.RecordCount = response.Data.TotalCount
|
|
||||||
|
|
||||||
if response.Data.Detail != nil {
|
|
||||||
for _, detail := range response.Data.Detail {
|
|
||||||
stats.TotalImpression += detail.Impression
|
|
||||||
stats.TotalClick += detail.Click
|
|
||||||
stats.TotalCost += detail.CostTotal
|
|
||||||
stats.TotalGMV += detail.GMV
|
|
||||||
stats.TotalT0GMV += detail.T0GMV
|
|
||||||
stats.TotalT0OrderCnt += detail.T0OrderCnt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return stats
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAverageMetrics 获取平均指标
|
|
||||||
func (stats *ReportStatistics) GetAverageMetrics() map[string]float64 {
|
|
||||||
metrics := make(map[string]float64)
|
|
||||||
|
|
||||||
if stats.TotalImpression > 0 {
|
|
||||||
metrics["ctr"] = float64(stats.TotalClick) / float64(stats.TotalImpression) * 100
|
|
||||||
}
|
|
||||||
|
|
||||||
if stats.TotalClick > 0 {
|
|
||||||
metrics["cpc"] = stats.TotalCost / float64(stats.TotalClick)
|
|
||||||
}
|
|
||||||
|
|
||||||
if stats.TotalCost > 0 {
|
|
||||||
metrics["roi"] = stats.TotalGMV / stats.TotalCost
|
|
||||||
metrics["t0_roi"] = stats.TotalT0GMV / stats.TotalCost
|
|
||||||
}
|
|
||||||
|
|
||||||
if stats.TotalImpression > 0 {
|
|
||||||
metrics["cpm"] = stats.TotalCost / float64(stats.TotalImpression) * 1000
|
|
||||||
}
|
|
||||||
|
|
||||||
return metrics
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type cidAccountReportDetailService struct{}
|
|
||||||
|
|
||||||
// CidAccountReportDetail 广告数据报表详情服务
|
|
||||||
var CidAccountReportDetail = new(cidAccountReportDetailService)
|
|
||||||
|
|
||||||
// Create 创建广告数据报表详情
|
|
||||||
func (s *cidAccountReportDetailService) Create(ctx context.Context, req *dto.CidAccountReportDetailItem) (res *dto.CreateCidAccountReportDetailRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.DataType == "" {
|
|
||||||
return nil, errors.New("数据类型不能为空")
|
|
||||||
}
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.CidAccountReportDetail.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCidAccountReportDetailRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告数据报表详情
|
|
||||||
func (s *cidAccountReportDetailService) BatchCreate(ctx context.Context, req *dto.BatchCreateCidAccountReportDetailReq) (res *dto.BatchCreateCidAccountReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
//// 验证每条数据
|
|
||||||
//for i, item := range req.Items {
|
|
||||||
// if item.DataType == "" {
|
|
||||||
// return nil, errors.New("第" + string(rune(i+1)) + "条数据的数据类型不能为空")
|
|
||||||
// }
|
|
||||||
// if item.ReportDateStr == "" {
|
|
||||||
// return nil, errors.New("第" + string(rune(i+1)) + "条数据的报告日期不能为空")
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CidAccountReportDetail.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCidAccountReportDetailRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateSum Create 创建广告数据报表汇总
|
|
||||||
func (s *cidAccountReportDetailService) CreateSum(ctx context.Context, req *dto.CidAccountReportSumItem) (res *dto.CreateCidAccountReportSumRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.DataType == "" {
|
|
||||||
return nil, errors.New("数据类型不能为空")
|
|
||||||
}
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.CidAccountReportSum.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCidAccountReportSumRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateSum 批量创建广告数据报表汇总
|
|
||||||
func (s *cidAccountReportDetailService) BatchCreateSum(ctx context.Context, req *dto.BatchCreateCidAccountReportSumReq) (res *dto.BatchCreateCidAccountReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CidAccountReportSum.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCidAccountReportSumRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type campaignReportSumService struct{}
|
|
||||||
|
|
||||||
// CampaignReportSum 广告计划效果指标表服务
|
|
||||||
var CampaignReportSum = new(campaignReportSumService)
|
|
||||||
|
|
||||||
// Create 创建广告计划效果指标表
|
|
||||||
func (s *campaignReportSumService) Create(ctx context.Context, req *dto.CampaignReportSumItem) (res *dto.CreateCampaignReportSumRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.CampaignReportSum.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCampaignReportSumRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告计划效果指标表
|
|
||||||
func (s *campaignReportSumService) BatchCreate(ctx context.Context, req *dto.BatchCreateCampaignReportSumReq) (res *dto.BatchCreateCampaignReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CampaignReportSum.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCampaignReportSumRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateDetail 创建广告效果指标表
|
|
||||||
func (s *campaignReportSumService) CreateDetail(ctx context.Context, req *dto.CampaignReportDetailItem) (res *dto.CreateCampaignReportDetailRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.CampaignReportDetail.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCampaignReportDetailRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreateDetail 批量创建广告效果指标表
|
|
||||||
func (s *campaignReportSumService) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateCampaignReportDetailReq) (res *dto.BatchCreateCampaignReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CampaignReportDetail.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCampaignReportDetailRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type creativeReportSumService struct{}
|
|
||||||
|
|
||||||
// CreativeReportSum 广告效果指标表服务
|
|
||||||
var CreativeReportSum = new(creativeReportSumService)
|
|
||||||
|
|
||||||
// Create 创建广告效果指标表
|
|
||||||
func (s *creativeReportSumService) Create(ctx context.Context, req *dto.CreativeReportSumItem) (res *dto.CreateCreativeReportSumRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.CreativeReportSum.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCreativeReportSumRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标表
|
|
||||||
func (s *creativeReportSumService) BatchCreate(ctx context.Context, req *dto.BatchCreateCreativeReportSumReq) (res *dto.BatchCreateCreativeReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CreativeReportSum.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCreativeReportSumRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *creativeReportSumService) CreateDetail(ctx context.Context, req *dto.CreativeReportDetailItem) (res *dto.CreateCreativeReportDetailRes, err error) {
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := dao.CreativeReportDetail.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateCreativeReportDetailRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *creativeReportSumService) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateCreativeReportDetailReq) (res *dto.BatchCreateCreativeReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount, failCount, failedIndexes, err := dao.CreativeReportDetail.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateCreativeReportDetailRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,261 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type materialReportService struct{}
|
|
||||||
|
|
||||||
// MaterialReport 素材报表数据服务
|
|
||||||
var MaterialReport = new(materialReportService)
|
|
||||||
|
|
||||||
// Create 创建素材报表数据
|
|
||||||
func (s *materialReportService) Create(ctx context.Context, req *dto.MaterialReportItem) (res *dto.CreateMaterialReportRes, err error) {
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := dao.MaterialReport.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateMaterialReportRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建素材报表数据
|
|
||||||
func (s *materialReportService) BatchCreate(ctx context.Context, req *dto.BatchCreateMaterialReportReq) (res *dto.BatchCreateMaterialReportRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount, failCount, failedIndexes, err := dao.MaterialReport.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateMaterialReportRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 获取素材报表数据列表
|
|
||||||
func (s *materialReportService) List(ctx context.Context, req *dto.ListMaterialReportReq) (res *dto.ListMaterialReportRes, err error) {
|
|
||||||
list, total, err := dao.MaterialReport.List(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
items := make([]*dto.MaterialReportItem, len(list))
|
|
||||||
for i, item := range list {
|
|
||||||
items[i] = convertMaterialEntityToDTO(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.ListMaterialReportRes{
|
|
||||||
List: items,
|
|
||||||
Total: total,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// convertEntityToDTO 将实体转换为 DTO
|
|
||||||
func convertMaterialEntityToDTO(entity *entity.MaterialReport) *dto.MaterialReportItem {
|
|
||||||
return &dto.MaterialReportItem{
|
|
||||||
CreatedBy: entity.CreatedBy,
|
|
||||||
UpdatedBy: entity.UpdatedBy,
|
|
||||||
T0OrderPaymentAmt: entity.T0OrderPaymentAmt,
|
|
||||||
CreativeMaterialType: entity.CreativeMaterialType,
|
|
||||||
LiveName: entity.LiveName,
|
|
||||||
AuthorId: entity.AuthorId,
|
|
||||||
PicUrl: entity.PicUrl,
|
|
||||||
PicName: entity.PicName,
|
|
||||||
PicId: entity.PicId,
|
|
||||||
CoverUrl: entity.CoverUrl,
|
|
||||||
CoverId: entity.CoverId,
|
|
||||||
ItemOrderConversionRatio: entity.ItemOrderConversionRatio,
|
|
||||||
ItemCardClickRatio: entity.ItemCardClickRatio,
|
|
||||||
ItemCardClkCnt: entity.ItemCardClkCnt,
|
|
||||||
LivePlayCntCost: entity.LivePlayCntCost,
|
|
||||||
AdMerchantFollowCost: entity.AdMerchantFollowCost,
|
|
||||||
AdMerchantFollow: entity.AdMerchantFollow,
|
|
||||||
NetT0OrderCnt: entity.NetT0OrderCnt,
|
|
||||||
NetT0Roi: entity.NetT0Roi,
|
|
||||||
NetT0Gmv: entity.NetT0Gmv,
|
|
||||||
PhotoName: entity.PhotoName,
|
|
||||||
PhotoIdStr: entity.PhotoIdStr,
|
|
||||||
PhotoId: entity.PhotoId,
|
|
||||||
ModPriceSegment: entity.ModPriceSegment,
|
|
||||||
AgeSegment: entity.AgeSegment,
|
|
||||||
Province: entity.Province,
|
|
||||||
Gender: entity.Gender,
|
|
||||||
AdPhotoPlayedFiveRatio: entity.AdPhotoPlayedFiveRatio,
|
|
||||||
AdPhotoPlayedThreeRatio: entity.AdPhotoPlayedThreeRatio,
|
|
||||||
OrderSubmitRoi: entity.OrderSubmitRoi,
|
|
||||||
OrderSubmitAmt: entity.OrderSubmitAmt,
|
|
||||||
EventOrderSubmitCost: entity.EventOrderSubmitCost,
|
|
||||||
EventOrderSubmit: entity.EventOrderSubmit,
|
|
||||||
EventOrderPaidRoi: entity.EventOrderPaidRoi,
|
|
||||||
EventAppInvoked: entity.EventAppInvoked,
|
|
||||||
EventAddShoppingCart: entity.EventAddShoppingCart,
|
|
||||||
ConversionNumCost: entity.ConversionNumCost,
|
|
||||||
AdEffectivePlayNum: entity.AdEffectivePlayNum,
|
|
||||||
AdItemClick: entity.AdItemClick,
|
|
||||||
MerchantProductId: entity.MerchantProductId,
|
|
||||||
CostTotal: entity.CostTotal,
|
|
||||||
AdShow: entity.AdShow,
|
|
||||||
AdShow1kCost: entity.AdShow1kCost,
|
|
||||||
Impression: entity.Impression,
|
|
||||||
PhotoClick: entity.PhotoClick,
|
|
||||||
PhotoClickRatio: entity.PhotoClickRatio,
|
|
||||||
Click: entity.Click,
|
|
||||||
ActionbarClick: entity.ActionbarClick,
|
|
||||||
ActionbarClickCost: entity.ActionbarClickCost,
|
|
||||||
EspClickRatio: entity.EspClickRatio,
|
|
||||||
ActionRatio: entity.ActionRatio,
|
|
||||||
AdItemCount: entity.AdItemCount,
|
|
||||||
EspLivePlayedSeconds: entity.EspLivePlayedSeconds,
|
|
||||||
PlayedThreeSeconds: entity.PlayedThreeSeconds,
|
|
||||||
Play3sRatio: entity.Play3sRatio,
|
|
||||||
PlayedFiveSeconds: entity.PlayedFiveSeconds,
|
|
||||||
Play5sRatio: entity.Play5sRatio,
|
|
||||||
PlayedEnd: entity.PlayedEnd,
|
|
||||||
PlayEndRatio: entity.PlayEndRatio,
|
|
||||||
Share: entity.Share,
|
|
||||||
Comment: entity.Comment,
|
|
||||||
Likes: entity.Likes,
|
|
||||||
Report: entity.Report,
|
|
||||||
Block: entity.Block,
|
|
||||||
ItemNegative: entity.ItemNegative,
|
|
||||||
LiveShare: entity.LiveShare,
|
|
||||||
LiveComment: entity.LiveComment,
|
|
||||||
LiveReward: entity.LiveReward,
|
|
||||||
EffectivePlayCount: entity.EffectivePlayCount,
|
|
||||||
EffectivePlayRatio: entity.EffectivePlayRatio,
|
|
||||||
ConversionNum: entity.ConversionNum,
|
|
||||||
ConversionCostEsp: entity.ConversionCostEsp,
|
|
||||||
Roi: entity.Roi,
|
|
||||||
Gmv: entity.Gmv,
|
|
||||||
T0Gmv: entity.T0Gmv,
|
|
||||||
T1Gmv: entity.T1Gmv,
|
|
||||||
T7Gmv: entity.T7Gmv,
|
|
||||||
T15Gmv: entity.T15Gmv,
|
|
||||||
T30Gmv: entity.T30Gmv,
|
|
||||||
T0Roi: entity.T0Roi,
|
|
||||||
T1Roi: entity.T1Roi,
|
|
||||||
T7Roi: entity.T7Roi,
|
|
||||||
T15Roi: entity.T15Roi,
|
|
||||||
T30Roi: entity.T30Roi,
|
|
||||||
PaiedOrder: entity.PaiedOrder,
|
|
||||||
OrderRatio: entity.OrderRatio,
|
|
||||||
T0OrderCnt: entity.T0OrderCnt,
|
|
||||||
T0OrderCntCost: entity.T0OrderCntCost,
|
|
||||||
T0OrderCntRatio: entity.T0OrderCntRatio,
|
|
||||||
T1OrderCnt: entity.T1OrderCnt,
|
|
||||||
T7OrderCnt: entity.T7OrderCnt,
|
|
||||||
T15OrderCnt: entity.T15OrderCnt,
|
|
||||||
T30OrderCnt: entity.T30OrderCnt,
|
|
||||||
MerchantRecoFans: entity.MerchantRecoFans,
|
|
||||||
T1Retention: entity.T1Retention,
|
|
||||||
T7Retention: entity.T7Retention,
|
|
||||||
T15Retention: entity.T15Retention,
|
|
||||||
T30Retention: entity.T30Retention,
|
|
||||||
T1RetentionRatio: entity.T1RetentionRatio,
|
|
||||||
T7RetentionRatio: entity.T7RetentionRatio,
|
|
||||||
T15RetentionRatio: entity.T15RetentionRatio,
|
|
||||||
T30RetentionRatio: entity.T30RetentionRatio,
|
|
||||||
ReservationSuccess: entity.ReservationSuccess,
|
|
||||||
ReservationCost: entity.ReservationCost,
|
|
||||||
StandardLivePlayedStarted: entity.StandardLivePlayedStarted,
|
|
||||||
AdLivePlayCnt: entity.AdLivePlayCnt,
|
|
||||||
AdLivePlayCntCost: entity.AdLivePlayCntCost,
|
|
||||||
LiveAudienceCost: entity.LiveAudienceCost,
|
|
||||||
LiveEventGoodsView: entity.LiveEventGoodsView,
|
|
||||||
GoodsClickRatio: entity.GoodsClickRatio,
|
|
||||||
DirectAttrPlatNewBuyerCnt: entity.DirectAttrPlatNewBuyerCnt,
|
|
||||||
T30AttrPlatTotalBuyerCnt: entity.T30AttrPlatTotalBuyerCnt,
|
|
||||||
DirectAttrSellerNewBuyerCnt: entity.DirectAttrSellerNewBuyerCnt,
|
|
||||||
T30AttrSellerTotalBuyerCnt: entity.T30AttrSellerTotalBuyerCnt,
|
|
||||||
T3Gmv: entity.T3Gmv,
|
|
||||||
T3OrderCnt: entity.T3OrderCnt,
|
|
||||||
T3Roi: entity.T3Roi,
|
|
||||||
T7IndirectOrderAmt: entity.T7IndirectOrderAmt,
|
|
||||||
T7IndirectOrderCnt: entity.T7IndirectOrderCnt,
|
|
||||||
FansT0GmvPerFans: entity.FansT0GmvPerFans,
|
|
||||||
FansT3GmvPerFans: entity.FansT3GmvPerFans,
|
|
||||||
FansT7GmvPerFans: entity.FansT7GmvPerFans,
|
|
||||||
FansT15GmvPerFans: entity.FansT15GmvPerFans,
|
|
||||||
FansT30GmvPerFans: entity.FansT30GmvPerFans,
|
|
||||||
RecoFansCost: entity.RecoFansCost,
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: entity.QcpxWhiteboxDirectOrderPaymentAmt,
|
|
||||||
QcpxWhiteboxDirectOrderCnt: entity.QcpxWhiteboxDirectOrderCnt,
|
|
||||||
FansT0Gmv: entity.FansT0Gmv,
|
|
||||||
FansT1Gmv: entity.FansT1Gmv,
|
|
||||||
FansT7Gmv: entity.FansT7Gmv,
|
|
||||||
FansT15Gmv: entity.FansT15Gmv,
|
|
||||||
FansT30Gmv: entity.FansT30Gmv,
|
|
||||||
FansT0Roi: entity.FansT0Roi,
|
|
||||||
FansT1Roi: entity.FansT1Roi,
|
|
||||||
FansT7Roi: entity.FansT7Roi,
|
|
||||||
FansT15Roi: entity.FansT15Roi,
|
|
||||||
FansT30Roi: entity.FansT30Roi,
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: entity.T0ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: entity.T1ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: entity.T3ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: entity.T7ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: entity.T15ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: entity.T30ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T0ShopNewBuyerOrderCnt: entity.T0ShopNewBuyerOrderCnt,
|
|
||||||
T1ShopNewBuyerOrderCnt: entity.T1ShopNewBuyerOrderCnt,
|
|
||||||
T3ShopNewBuyerOrderCnt: entity.T3ShopNewBuyerOrderCnt,
|
|
||||||
T7ShopNewBuyerOrderCnt: entity.T7ShopNewBuyerOrderCnt,
|
|
||||||
T15ShopNewBuyerOrderCnt: entity.T15ShopNewBuyerOrderCnt,
|
|
||||||
T30ShopNewBuyerOrderCnt: entity.T30ShopNewBuyerOrderCnt,
|
|
||||||
T1NewBuyerRepurchaseRatio: entity.T1NewBuyerRepurchaseRatio,
|
|
||||||
T3NewBuyerRepurchaseRatio: entity.T3NewBuyerRepurchaseRatio,
|
|
||||||
T7NewBuyerRepurchaseRatio: entity.T7NewBuyerRepurchaseRatio,
|
|
||||||
T15NewBuyerRepurchaseRatio: entity.T15NewBuyerRepurchaseRatio,
|
|
||||||
T30NewBuyerRepurchaseRatio: entity.T30NewBuyerRepurchaseRatio,
|
|
||||||
T0ShopNewBuyerRoi: entity.T0ShopNewBuyerRoi,
|
|
||||||
T1ShopNewBuyerRoi: entity.T1ShopNewBuyerRoi,
|
|
||||||
T3ShopNewBuyerRoi: entity.T3ShopNewBuyerRoi,
|
|
||||||
T7ShopNewBuyerRoi: entity.T7ShopNewBuyerRoi,
|
|
||||||
T15ShopNewBuyerRoi: entity.T15ShopNewBuyerRoi,
|
|
||||||
T30ShopNewBuyerRoi: entity.T30ShopNewBuyerRoi,
|
|
||||||
CreateCardOrderCnt: entity.CreateCardOrderCnt,
|
|
||||||
ForwardTsCreateCardOrderCnt: entity.ForwardTsCreateCardOrderCnt,
|
|
||||||
CreateCardOrderCost: entity.CreateCardOrderCost,
|
|
||||||
ForwardTsCreateCardOrderCost: entity.ForwardTsCreateCardOrderCost,
|
|
||||||
ActivateCardOrderCnt: entity.ActivateCardOrderCnt,
|
|
||||||
ForwardTsActivateCardOrderCnt: entity.ForwardTsActivateCardOrderCnt,
|
|
||||||
ActivateCardOrderCost: entity.ActivateCardOrderCost,
|
|
||||||
ForwardTsActivateCardOrderCost: entity.ForwardTsActivateCardOrderCost,
|
|
||||||
CreateCardOrderRatio: entity.CreateCardOrderRatio,
|
|
||||||
ForwardTsCreateCardOrderRatio: entity.ForwardTsCreateCardOrderRatio,
|
|
||||||
ActivateCardOrderCntRatio: entity.ActivateCardOrderCntRatio,
|
|
||||||
ForwardTsActivateCardOrderRatio: entity.ForwardTsActivateCardOrderRatio,
|
|
||||||
LivePlayCnt: entity.LivePlayCnt,
|
|
||||||
ItemEntranceClkCnt: entity.ItemEntranceClkCnt,
|
|
||||||
ShowCnt: entity.ShowCnt,
|
|
||||||
ReportDateStr: entity.ReportDateStr,
|
|
||||||
CampaignId: entity.CampaignId,
|
|
||||||
CampaignName: entity.CampaignName,
|
|
||||||
UnitId: entity.UnitId,
|
|
||||||
UnitName: entity.UnitName,
|
|
||||||
CreativeId: entity.CreativeId,
|
|
||||||
CreativeName: entity.CreativeName,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
)
|
|
||||||
|
|
||||||
var PopulationReportService = new(populationReportService)
|
|
||||||
|
|
||||||
type populationReportService struct{}
|
|
||||||
|
|
||||||
// Create 创建人群报表数据
|
|
||||||
func (s *populationReportService) Create(ctx context.Context, req *dto.PopulationReportItem) (*dto.CreatePopulationReportRes, error) {
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := dao.PopulationReport.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return &dto.CreatePopulationReportRes{Id: id}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建人群报表数据
|
|
||||||
func (s *populationReportService) BatchCreate(ctx context.Context, req []*dto.PopulationReportItem) (*dto.BatchCreatePopulationReportRes, error) {
|
|
||||||
if len(req) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount, failCount, failedIndexes, err := dao.PopulationReport.BatchInsert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return &dto.BatchCreatePopulationReportRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 查询人群报表数据列表
|
|
||||||
func (s *populationReportService) List(ctx context.Context, req *dto.ListPopulationReportReq) (*dto.ListPopulationReportRes, error) {
|
|
||||||
list, total, err := dao.PopulationReport.List(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换为 DTO
|
|
||||||
items := s.convertToDTOs(list)
|
|
||||||
|
|
||||||
return &dto.ListPopulationReportRes{
|
|
||||||
List: items,
|
|
||||||
Total: total,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// convertToDTOs 将实体列表转换为 DTO 列表
|
|
||||||
func (s *populationReportService) convertToDTOs(entities []*entity.PopulationReport) []*dto.PopulationReportItem {
|
|
||||||
items := make([]*dto.PopulationReportItem, 0, len(entities))
|
|
||||||
for _, e := range entities {
|
|
||||||
items = append(items, s.convertToDTO(e))
|
|
||||||
}
|
|
||||||
return items
|
|
||||||
}
|
|
||||||
|
|
||||||
// convertToDTO 将实体转换为 DTO
|
|
||||||
func (s *populationReportService) convertToDTO(e *entity.PopulationReport) *dto.PopulationReportItem {
|
|
||||||
return &dto.PopulationReportItem{
|
|
||||||
PhotoName: e.PhotoName,
|
|
||||||
PhotoIdStr: e.PhotoIdStr,
|
|
||||||
PhotoId: e.PhotoId,
|
|
||||||
ModPriceSegment: e.ModPriceSegment,
|
|
||||||
AgeSegment: e.AgeSegment,
|
|
||||||
Province: e.Province,
|
|
||||||
Gender: e.Gender,
|
|
||||||
MerchantProductId: e.MerchantProductId,
|
|
||||||
ReportDateStr: e.ReportDateStr,
|
|
||||||
CampaignId: e.CampaignId,
|
|
||||||
CampaignName: e.CampaignName,
|
|
||||||
UnitId: e.UnitId,
|
|
||||||
UnitName: e.UnitName,
|
|
||||||
CreativeId: e.CreativeId,
|
|
||||||
CreativeName: e.CreativeName,
|
|
||||||
AdPhotoPlayedFiveRatio: e.AdPhotoPlayedFiveRatio,
|
|
||||||
AdPhotoPlayedThreeRatio: e.AdPhotoPlayedThreeRatio,
|
|
||||||
OrderSubmitRoi: e.OrderSubmitRoi,
|
|
||||||
OrderSubmitAmt: e.OrderSubmitAmt,
|
|
||||||
EventOrderSubmitCost: e.EventOrderSubmitCost,
|
|
||||||
EventOrderSubmit: e.EventOrderSubmit,
|
|
||||||
EventOrderPaidRoi: e.EventOrderPaidRoi,
|
|
||||||
EventAppInvoked: e.EventAppInvoked,
|
|
||||||
EventAddShoppingCart: e.EventAddShoppingCart,
|
|
||||||
ConversionNumCost: e.ConversionNumCost,
|
|
||||||
AdEffectivePlayNum: e.AdEffectivePlayNum,
|
|
||||||
AdItemClick: e.AdItemClick,
|
|
||||||
CostTotal: e.CostTotal,
|
|
||||||
AdShow: e.AdShow,
|
|
||||||
AdShow1kCost: e.AdShow1kCost,
|
|
||||||
Impression: e.Impression,
|
|
||||||
PhotoClick: e.PhotoClick,
|
|
||||||
PhotoClickRatio: e.PhotoClickRatio,
|
|
||||||
Click: e.Click,
|
|
||||||
ActionbarClick: e.ActionbarClick,
|
|
||||||
ActionbarClickCost: e.ActionbarClickCost,
|
|
||||||
EspClickRatio: e.EspClickRatio,
|
|
||||||
ActionRatio: e.ActionRatio,
|
|
||||||
AdItemClickCount: e.AdItemClickCount,
|
|
||||||
EspLivePlayedSeconds: e.EspLivePlayedSeconds,
|
|
||||||
PlayedThreeSeconds: e.PlayedThreeSeconds,
|
|
||||||
Play3sRatio: e.Play3sRatio,
|
|
||||||
PlayedFiveSeconds: e.PlayedFiveSeconds,
|
|
||||||
Play5sRatio: e.Play5sRatio,
|
|
||||||
PlayedEnd: e.PlayedEnd,
|
|
||||||
PlayEndRatio: e.PlayEndRatio,
|
|
||||||
Share: e.Share,
|
|
||||||
Comment: e.Comment,
|
|
||||||
Likes: e.Likes,
|
|
||||||
Report: e.Report,
|
|
||||||
Block: e.Block,
|
|
||||||
ItemNegative: e.ItemNegative,
|
|
||||||
LiveShare: e.LiveShare,
|
|
||||||
LiveComment: e.LiveComment,
|
|
||||||
LiveReward: e.LiveReward,
|
|
||||||
EffectivePlayCount: e.EffectivePlayCount,
|
|
||||||
EffectivePlayRatio: e.EffectivePlayRatio,
|
|
||||||
ConversionNum: e.ConversionNum,
|
|
||||||
ConversionCostEsp: e.ConversionCostEsp,
|
|
||||||
Roi: e.Roi,
|
|
||||||
Gmv: e.Gmv,
|
|
||||||
T0Gmv: e.T0Gmv,
|
|
||||||
T1Gmv: e.T1Gmv,
|
|
||||||
T3Gmv: e.T3Gmv,
|
|
||||||
T7Gmv: e.T7Gmv,
|
|
||||||
T15Gmv: e.T15Gmv,
|
|
||||||
T30Gmv: e.T30Gmv,
|
|
||||||
T0Roi: e.T0Roi,
|
|
||||||
T1Roi: e.T1Roi,
|
|
||||||
T3Roi: e.T3Roi,
|
|
||||||
T7Roi: e.T7Roi,
|
|
||||||
T15Roi: e.T15Roi,
|
|
||||||
T30Roi: e.T30Roi,
|
|
||||||
PaiedOrder: e.PaiedOrder,
|
|
||||||
OrderRatio: e.OrderRatio,
|
|
||||||
T0OrderCnt: e.T0OrderCnt,
|
|
||||||
T0OrderCntCost: e.T0OrderCntCost,
|
|
||||||
T0OrderCntRatio: e.T0OrderCntRatio,
|
|
||||||
T1OrderCnt: e.T1OrderCnt,
|
|
||||||
T7OrderCnt: e.T7OrderCnt,
|
|
||||||
T15OrderCnt: e.T15OrderCnt,
|
|
||||||
T30OrderCnt: e.T30OrderCnt,
|
|
||||||
MerchantRecoFans: e.MerchantRecoFans,
|
|
||||||
T1Retention: e.T1Retention,
|
|
||||||
T7Retention: e.T7Retention,
|
|
||||||
T15Retention: e.T15Retention,
|
|
||||||
T30Retention: e.T30Retention,
|
|
||||||
T1RetentionRatio: e.T1RetentionRatio,
|
|
||||||
T7RetentionRatio: e.T7RetentionRatio,
|
|
||||||
T15RetentionRatio: e.T15RetentionRatio,
|
|
||||||
T30RetentionRatio: e.T30RetentionRatio,
|
|
||||||
ReservationSuccess: e.ReservationSuccess,
|
|
||||||
ReservationCost: e.ReservationCost,
|
|
||||||
StandardLivePlayedStarted: e.StandardLivePlayedStarted,
|
|
||||||
AdLivePlayCnt: e.AdLivePlayCnt,
|
|
||||||
AdLivePlayCntCost: e.AdLivePlayCntCost,
|
|
||||||
LiveAudienceCost: e.LiveAudienceCost,
|
|
||||||
LiveEventGoodsView: e.LiveEventGoodsView,
|
|
||||||
GoodsClickRatio: e.GoodsClickRatio,
|
|
||||||
DirectAttrPlatNewBuyerCnt: e.DirectAttrPlatNewBuyerCnt,
|
|
||||||
T30AttrPlatTotalBuyerCnt: e.T30AttrPlatTotalBuyerCnt,
|
|
||||||
DirectAttrSellerNewBuyerCnt: e.DirectAttrSellerNewBuyerCnt,
|
|
||||||
T30AttrSellerTotalBuyerCnt: e.T30AttrSellerTotalBuyerCnt,
|
|
||||||
T7IndirectOrderAmt: e.T7IndirectOrderAmt,
|
|
||||||
T7IndirectOrderCnt: e.T7IndirectOrderCnt,
|
|
||||||
FansT0GmvPerFans: e.FansT0GmvPerFans,
|
|
||||||
FansT3GmvPerFans: e.FansT3GmvPerFans,
|
|
||||||
FansT7GmvPerFans: e.FansT7GmvPerFans,
|
|
||||||
FansT15GmvPerFans: e.FansT15GmvPerFans,
|
|
||||||
FansT30GmvPerFans: e.FansT30GmvPerFans,
|
|
||||||
RecoFansCost: e.RecoFansCost,
|
|
||||||
QcpxWhiteboxDirectOrderPaymentAmt: e.QcpxWhiteboxDirectOrderPaymentAmt,
|
|
||||||
QcpxWhiteboxDirectOrderCnt: e.QcpxWhiteboxDirectOrderCnt,
|
|
||||||
FansT0Gmv: e.FansT0Gmv,
|
|
||||||
FansT1Gmv: e.FansT1Gmv,
|
|
||||||
FansT7Gmv: e.FansT7Gmv,
|
|
||||||
FansT15Gmv: e.FansT15Gmv,
|
|
||||||
FansT30Gmv: e.FansT30Gmv,
|
|
||||||
FansT0Roi: e.FansT0Roi,
|
|
||||||
FansT1Roi: e.FansT1Roi,
|
|
||||||
FansT7Roi: e.FansT7Roi,
|
|
||||||
FansT15Roi: e.FansT15Roi,
|
|
||||||
FansT30Roi: e.FansT30Roi,
|
|
||||||
T0ShopNewBuyerOrderPaymentAmt: e.T0ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T1ShopNewBuyerOrderPaymentAmt: e.T1ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T3ShopNewBuyerOrderPaymentAmt: e.T3ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T7ShopNewBuyerOrderPaymentAmt: e.T7ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T15ShopNewBuyerOrderPaymentAmt: e.T15ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T30ShopNewBuyerOrderPaymentAmt: e.T30ShopNewBuyerOrderPaymentAmt,
|
|
||||||
T0ShopNewBuyerOrderCnt: e.T0ShopNewBuyerOrderCnt,
|
|
||||||
T1ShopNewBuyerOrderCnt: e.T1ShopNewBuyerOrderCnt,
|
|
||||||
T3ShopNewBuyerOrderCnt: e.T3ShopNewBuyerOrderCnt,
|
|
||||||
T7ShopNewBuyerOrderCnt: e.T7ShopNewBuyerOrderCnt,
|
|
||||||
T15ShopNewBuyerOrderCnt: e.T15ShopNewBuyerOrderCnt,
|
|
||||||
T30ShopNewBuyerOrderCnt: e.T30ShopNewBuyerOrderCnt,
|
|
||||||
T1NewBuyerRepurchaseRatio: e.T1NewBuyerRepurchaseRatio,
|
|
||||||
T3NewBuyerRepurchaseRatio: e.T3NewBuyerRepurchaseRatio,
|
|
||||||
T7NewBuyerRepurchaseRatio: e.T7NewBuyerRepurchaseRatio,
|
|
||||||
T15NewBuyerRepurchaseRatio: e.T15NewBuyerRepurchaseRatio,
|
|
||||||
T30NewBuyerRepurchaseRatio: e.T30NewBuyerRepurchaseRatio,
|
|
||||||
T0ShopNewBuyerRoi: e.T0ShopNewBuyerRoi,
|
|
||||||
T1ShopNewBuyerRoi: e.T1ShopNewBuyerRoi,
|
|
||||||
T3ShopNewBuyerRoi: e.T3ShopNewBuyerRoi,
|
|
||||||
T7ShopNewBuyerRoi: e.T7ShopNewBuyerRoi,
|
|
||||||
T15ShopNewBuyerRoi: e.T15ShopNewBuyerRoi,
|
|
||||||
T30ShopNewBuyerRoi: e.T30ShopNewBuyerRoi,
|
|
||||||
CreateCardOrderCnt: e.CreateCardOrderCnt,
|
|
||||||
ForwardTsCreateCardOrderCnt: e.ForwardTsCreateCardOrderCnt,
|
|
||||||
CreateCardOrderCost: e.CreateCardOrderCost,
|
|
||||||
ForwardTsCreateCardOrderCost: e.ForwardTsCreateCardOrderCost,
|
|
||||||
ActivateCardOrderCnt: e.ActivateCardOrderCnt,
|
|
||||||
ForwardTsActivateCardOrderCnt: e.ForwardTsActivateCardOrderCnt,
|
|
||||||
ActivateCardOrderCost: e.ActivateCardOrderCost,
|
|
||||||
ForwardTsActivateCardOrderCost: e.ForwardTsActivateCardOrderCost,
|
|
||||||
CreateCardOrderRatio: e.CreateCardOrderRatio,
|
|
||||||
ForwardTsCreateCardOrderRatio: e.ForwardTsCreateCardOrderRatio,
|
|
||||||
ActivateCardOrderCntRatio: e.ActivateCardOrderCntRatio,
|
|
||||||
ForwardTsActivateCardOrderRatio: e.ForwardTsActivateCardOrderRatio,
|
|
||||||
LivePlayCnt: e.LivePlayCnt,
|
|
||||||
ItemEntranceClkCnt: e.ItemEntranceClkCnt,
|
|
||||||
ShowCnt: e.ShowCnt,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type storewideReportService struct{}
|
|
||||||
|
|
||||||
// StorewideReportSum 广告效果指标表服务
|
|
||||||
var StorewideReportSum = new(storewideReportService)
|
|
||||||
|
|
||||||
// Create 创建广告效果指标表
|
|
||||||
func (s *storewideReportService) Create(ctx context.Context, req *dto.StorewideReportSumItem) (res *dto.CreateStorewideReportSumRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.StorewideReportSum.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateStorewideReportSumRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标表
|
|
||||||
func (s *storewideReportService) BatchCreate(ctx context.Context, req *dto.BatchCreateStorewideReportSumReq) (res *dto.BatchCreateStorewideReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.StorewideReportSum.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateStorewideReportSumRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create 创建广告效果指标表
|
|
||||||
func (s *storewideReportService) CreateDetail(ctx context.Context, req *dto.StorewideReportDetailItem) (res *dto.CreateStorewideReportDetailRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.StorewideReportDetail.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateStorewideReportDetailRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标表
|
|
||||||
func (s *storewideReportService) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateStorewideReportDetailReq) (res *dto.BatchCreateStorewideReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.StorewideReportDetail.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateStorewideReportDetailRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
entity "dataengine/model/entity/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type taskReportService struct{}
|
|
||||||
|
|
||||||
// TaskReport 调控任务数据服务
|
|
||||||
var TaskReport = new(taskReportService)
|
|
||||||
|
|
||||||
// Create 创建调控任务数据
|
|
||||||
func (s *taskReportService) Create(ctx context.Context, req *dto.TaskReportItem) (res *dto.CreateTaskReportRes, err error) {
|
|
||||||
// 验证必要字段
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dao.TaskReport.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateTaskReportRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建调控任务数据
|
|
||||||
func (s *taskReportService) BatchCreate(ctx context.Context, req *dto.BatchCreateTaskReportReq) (res *dto.BatchCreateTaskReportRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
// 验证数据
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量插入数据库
|
|
||||||
successCount, failCount, failedIndexes, err := dao.TaskReport.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateTaskReportRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 获取调控任务数据列表
|
|
||||||
func (s *taskReportService) List(ctx context.Context, req *dto.ListTaskReportReq) (res *dto.ListTaskReportRes, err error) {
|
|
||||||
list, total, err := dao.TaskReport.List(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换为 DTO 格式
|
|
||||||
items := make([]*dto.TaskReportItem, len(list))
|
|
||||||
for i, item := range list {
|
|
||||||
items[i] = convertEntityToDTO(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.ListTaskReportRes{
|
|
||||||
List: items,
|
|
||||||
Total: total,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// convertEntityToDTO 将实体转换为 DTO
|
|
||||||
func convertEntityToDTO(entity *entity.TaskReport) *dto.TaskReportItem {
|
|
||||||
return &dto.TaskReportItem{
|
|
||||||
ItemOrderConversionRatio: entity.ItemOrderConversionRatio,
|
|
||||||
ItemCardClickRatio: entity.ItemCardClickRatio,
|
|
||||||
ItemCardClkCnt: entity.ItemCardClkCnt,
|
|
||||||
LivePlayCntCost: entity.LivePlayCntCost,
|
|
||||||
AdMerchantFollowCost: entity.AdMerchantFollowCost,
|
|
||||||
AdMerchantFollow: entity.AdMerchantFollow,
|
|
||||||
NetT0OrderCnt: entity.NetT0OrderCnt,
|
|
||||||
NetT0Roi: entity.NetT0Roi,
|
|
||||||
NetT0Gmv: entity.NetT0Gmv,
|
|
||||||
PhotoName: entity.PhotoName,
|
|
||||||
PhotoId: entity.PhotoId,
|
|
||||||
CostTotal: entity.CostTotal,
|
|
||||||
T0Gmv: entity.T0Gmv,
|
|
||||||
T0Roi: entity.T0Roi,
|
|
||||||
T0OrderCnt: entity.T0OrderCnt,
|
|
||||||
T0OrderCntCost: entity.T0OrderCntCost,
|
|
||||||
FansT0Gmv: entity.FansT0Gmv,
|
|
||||||
FansT1Gmv: entity.FansT1Gmv,
|
|
||||||
FansT7Gmv: entity.FansT7Gmv,
|
|
||||||
FansT15Gmv: entity.FansT15Gmv,
|
|
||||||
FansT30Gmv: entity.FansT30Gmv,
|
|
||||||
FansT0Roi: entity.FansT0Roi,
|
|
||||||
FansT1Roi: entity.FansT1Roi,
|
|
||||||
FansT7Roi: entity.FansT7Roi,
|
|
||||||
FansT15Roi: entity.FansT15Roi,
|
|
||||||
FansT30Roi: entity.FansT30Roi,
|
|
||||||
LivePlayCnt: entity.LivePlayCnt,
|
|
||||||
ItemEntranceClkCnt: entity.ItemEntranceClkCnt,
|
|
||||||
ShowCnt: entity.ShowCnt,
|
|
||||||
ReportDateStr: entity.ReportDateStr,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
package copydata
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
dao "dataengine/dao/copydata"
|
|
||||||
dto "dataengine/model/dto/copydata"
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type unitReportSumService struct{}
|
|
||||||
|
|
||||||
// UnitReportSumService 广告效果指标服务
|
|
||||||
var UnitReportSumService = new(unitReportSumService)
|
|
||||||
|
|
||||||
// Create 创建广告效果指标
|
|
||||||
func (s *unitReportSumService) Create(ctx context.Context, req *dto.UnitReportSumItem) (res *dto.CreateUnitReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := dao.UnitReportSum.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateUnitReportSumRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标
|
|
||||||
func (s *unitReportSumService) BatchCreate(ctx context.Context, req *dto.BatchCreateUnitReportSumReq) (res *dto.BatchCreateUnitReportSumRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount, failCount, failedIndexes, err := dao.UnitReportSum.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateUnitReportSumRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create 创建广告效果指标详情
|
|
||||||
func (s *unitReportSumService) CreateDetail(ctx context.Context, req *dto.UnitReportDetailItem) (res *dto.CreateUnitReportDetailRes, err error) {
|
|
||||||
if req.ReportDateStr == "" {
|
|
||||||
return nil, errors.New("报告日期不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := dao.UnitReportDetail.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateUnitReportDetailRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchCreate 批量创建广告效果指标详情
|
|
||||||
func (s *unitReportSumService) BatchCreateDetail(ctx context.Context, req *dto.BatchCreateUnitReportDetailReq) (res *dto.BatchCreateUnitReportDetailRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
if len(req.Items) == 0 {
|
|
||||||
return nil, errors.New("批量创建数据不能为空")
|
|
||||||
}
|
|
||||||
|
|
||||||
successCount, failCount, failedIndexes, err := dao.UnitReportDetail.BatchInsert(ctx, req.Items)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.BatchCreateUnitReportDetailRes{
|
|
||||||
SuccessCount: successCount,
|
|
||||||
FailCount: failCount,
|
|
||||||
FailedItems: failedIndexes,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -1,396 +0,0 @@
|
|||||||
package dict
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
consts "dataengine/consts/dict"
|
|
||||||
"dataengine/dao/dict"
|
|
||||||
dto "dataengine/model/dto/dict"
|
|
||||||
entity "dataengine/model/entity/dict"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"gitea.com/red-future/common/beans"
|
|
||||||
)
|
|
||||||
|
|
||||||
type fieldMappingConfigService struct{}
|
|
||||||
|
|
||||||
// FieldMappingConfig 字段映射配置服务
|
|
||||||
var FieldMappingConfig = new(fieldMappingConfigService)
|
|
||||||
|
|
||||||
// Create 创建字段映射配置
|
|
||||||
func (s *fieldMappingConfigService) Create(ctx context.Context, req *dto.CreateFieldMappingConfigReq) (res *dto.CreateFieldMappingConfigRes, err error) {
|
|
||||||
// 验证必填字段
|
|
||||||
if err = s.validateRequiredFields(req); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查重复配置
|
|
||||||
exists, err := dict.FieldMappingConfig.CheckDuplicate(ctx, req.VendorName, req.ApiName, req.SourceField, req.TargetField, 0)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.New("检查配置重复性失败")
|
|
||||||
}
|
|
||||||
if exists {
|
|
||||||
return nil, errors.New("相同厂商、接口、源字段和目标字段的配置已存在")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证转换参数
|
|
||||||
if err = s.validateTransformParams(req.TransformType, req.TransformParams); err != nil {
|
|
||||||
return nil, fmt.Errorf("转换参数验证失败: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证业务域
|
|
||||||
if req.BusinessDomain != "" && !s.isValidBusinessDomain(req.BusinessDomain) {
|
|
||||||
return nil, errors.New("无效的业务域")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证生效时间和失效时间
|
|
||||||
if req.EffectiveDate != nil && req.ExpiryDate != nil && req.EffectiveDate.After(*req.ExpiryDate) {
|
|
||||||
return nil, errors.New("生效时间不能晚于失效时间")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入数据库
|
|
||||||
id, err := dict.FieldMappingConfig.Insert(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.New("创建配置失败")
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.CreateFieldMappingConfigRes{
|
|
||||||
Id: id,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List 获取字段映射配置列表
|
|
||||||
func (s *fieldMappingConfigService) List(ctx context.Context, req *dto.ListFieldMappingConfigReq) (res *dto.ListFieldMappingConfigRes, err error) {
|
|
||||||
configs, total, err := dict.FieldMappingConfig.List(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.New("查询配置列表失败")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 组装响应数据
|
|
||||||
list := make([]dto.FieldMappingConfigItem, 0, len(configs))
|
|
||||||
for _, item := range configs {
|
|
||||||
list = append(list, dto.FieldMappingConfigItem{
|
|
||||||
Id: item.Id,
|
|
||||||
ConfigName: item.ConfigName,
|
|
||||||
VendorName: item.VendorName,
|
|
||||||
ApiName: item.ApiName,
|
|
||||||
ApiVersion: item.ApiVersion,
|
|
||||||
SourceField: item.SourceField,
|
|
||||||
TargetField: item.TargetField,
|
|
||||||
TargetFieldType: item.TargetFieldType,
|
|
||||||
TransformType: item.TransformType,
|
|
||||||
TransformTypeName: s.getTransformTypeName(item.TransformType),
|
|
||||||
IsActive: item.IsActive,
|
|
||||||
Priority: item.Priority,
|
|
||||||
BusinessDomain: item.BusinessDomain,
|
|
||||||
BusinessDomainName: s.getBusinessDomainName(item.BusinessDomain),
|
|
||||||
FieldGroup: item.FieldGroup,
|
|
||||||
ConfigVersion: item.ConfigVersion,
|
|
||||||
CreatedBy: item.CreatedBy,
|
|
||||||
CreatedTime: item.CreatedTime,
|
|
||||||
UpdatedBy: item.UpdatedBy,
|
|
||||||
UpdatedTime: item.UpdatedTime,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.ListFieldMappingConfigRes{
|
|
||||||
List: list,
|
|
||||||
Total: total,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetOne 获取单个字段映射配置
|
|
||||||
func (s *fieldMappingConfigService) GetOne(ctx context.Context, req *dto.GetFieldMappingConfigReq) (res *dto.GetFieldMappingConfigRes, err error) {
|
|
||||||
config, err := dict.FieldMappingConfig.GetOne(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.New("获取配置详情失败")
|
|
||||||
}
|
|
||||||
if config == nil {
|
|
||||||
return nil, errors.New("配置不存在")
|
|
||||||
}
|
|
||||||
|
|
||||||
return &dto.GetFieldMappingConfigRes{
|
|
||||||
FieldMappingConfig: config,
|
|
||||||
TransformTypeName: s.getTransformTypeName(config.TransformType),
|
|
||||||
BusinessDomainName: s.getBusinessDomainName(config.BusinessDomain),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update 更新字段映射配置
|
|
||||||
func (s *fieldMappingConfigService) Update(ctx context.Context, req *dto.UpdateFieldMappingConfigReq) (err error) {
|
|
||||||
// 检查配置是否存在
|
|
||||||
exist, err := dict.FieldMappingConfig.GetOne(ctx, &dto.GetFieldMappingConfigReq{Id: req.Id})
|
|
||||||
if err != nil || exist == nil {
|
|
||||||
return errors.New("配置不存在")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果修改了关键字段,检查重复性
|
|
||||||
if (req.VendorName != "" && req.VendorName != exist.VendorName) ||
|
|
||||||
(req.ApiName != "" && req.ApiName != exist.ApiName) ||
|
|
||||||
(req.SourceField != "" && req.SourceField != exist.SourceField) ||
|
|
||||||
(req.TargetField != "" && req.TargetField != exist.TargetField) {
|
|
||||||
|
|
||||||
vendorName := req.VendorName
|
|
||||||
if vendorName == "" {
|
|
||||||
vendorName = exist.VendorName
|
|
||||||
}
|
|
||||||
apiName := req.ApiName
|
|
||||||
if apiName == "" {
|
|
||||||
apiName = exist.ApiName
|
|
||||||
}
|
|
||||||
sourceField := req.SourceField
|
|
||||||
if sourceField == "" {
|
|
||||||
sourceField = exist.SourceField
|
|
||||||
}
|
|
||||||
targetField := req.TargetField
|
|
||||||
if targetField == "" {
|
|
||||||
targetField = exist.TargetField
|
|
||||||
}
|
|
||||||
|
|
||||||
exists, err := dict.FieldMappingConfig.CheckDuplicate(ctx, vendorName, apiName, sourceField, targetField, req.Id)
|
|
||||||
if err != nil {
|
|
||||||
return errors.New("检查配置重复性失败")
|
|
||||||
}
|
|
||||||
if exists {
|
|
||||||
return errors.New("相同厂商、接口、源字段和目标字段的配置已存在")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证转换参数
|
|
||||||
if req.TransformType != "" && req.TransformParams != nil {
|
|
||||||
if err = s.validateTransformParams(req.TransformType, req.TransformParams); err != nil {
|
|
||||||
return fmt.Errorf("转换参数验证失败: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证生效时间和失效时间
|
|
||||||
if req.EffectiveDate != nil && req.ExpiryDate != nil && req.EffectiveDate.After(*req.ExpiryDate) {
|
|
||||||
return errors.New("生效时间不能晚于失效时间")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新数据库
|
|
||||||
_, err = dict.FieldMappingConfig.Update(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return errors.New("更新配置失败")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus 更新字段映射配置状态
|
|
||||||
func (s *fieldMappingConfigService) UpdateStatus(ctx context.Context, req *dto.UpdateFieldMappingConfigStatusReq) (err error) {
|
|
||||||
_, err = dict.FieldMappingConfig.UpdateStatus(ctx, req.Id, req.IsActive)
|
|
||||||
if err != nil {
|
|
||||||
return errors.New("更新配置状态失败")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete 删除字段映射配置
|
|
||||||
func (s *fieldMappingConfigService) Delete(ctx context.Context, req *dto.DeleteFieldMappingConfigReq) (err error) {
|
|
||||||
_, err = dict.FieldMappingConfig.Delete(ctx, req)
|
|
||||||
if err != nil {
|
|
||||||
return errors.New("删除配置失败")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryByVendorApi 根据厂商和接口查询字段映射
|
|
||||||
func (s *fieldMappingConfigService) QueryByVendorApi(ctx context.Context, req *dto.QueryFieldMappingByVendorApiReq) (res *dto.QueryFieldMappingByVendorApiRes, err error) {
|
|
||||||
configs, err := dict.FieldMappingConfig.GetByVendorAndApi(ctx, req.VendorName, req.ApiName, req.ApiVersion, req.IsActive)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.New("查询字段映射配置失败")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 过滤掉已过期的配置
|
|
||||||
var validConfigs []*entity.FieldMappingConfig
|
|
||||||
now := time.Now()
|
|
||||||
for _, config := range configs {
|
|
||||||
if (config.EffectiveDate == nil || !config.EffectiveDate.After(now)) &&
|
|
||||||
(config.ExpiryDate == nil || config.ExpiryDate.After(now)) {
|
|
||||||
validConfigs = append(validConfigs, config)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
res = &dto.QueryFieldMappingByVendorApiRes{
|
|
||||||
List: validConfigs,
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate 验证字段映射配置
|
|
||||||
func (s *fieldMappingConfigService) Validate(ctx context.Context, req *dto.ValidateFieldMappingReq) (res *dto.ValidateFieldMappingRes, err error) {
|
|
||||||
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
|
|
||||||
res = &dto.ValidateFieldMappingRes{
|
|
||||||
IsValid: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证基本配置
|
|
||||||
if req.ConfigName == "" || req.VendorName == "" || req.ApiName == "" || req.SourceField == "" || req.TargetField == "" {
|
|
||||||
res.Error = "配置名称、厂商名称、接口名称、源字段和目标字段不能为空"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查重复配置
|
|
||||||
exists, err := dict.FieldMappingConfig.CheckDuplicate(ctx, req.VendorName, req.ApiName, req.SourceField, req.TargetField, 0)
|
|
||||||
if err != nil {
|
|
||||||
res.Error = "检查配置重复性失败"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if exists {
|
|
||||||
res.Error = "相同厂商、接口、源字段和目标字段的配置已存在"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果有测试值,尝试转换
|
|
||||||
if req.TestValue != nil {
|
|
||||||
// 这里可以实现具体的转换逻辑
|
|
||||||
// 例如:根据转换类型和参数进行值转换
|
|
||||||
res.TransformedValue = req.TestValue
|
|
||||||
res.Warnings = []string{"转换逻辑需要根据具体业务实现"}
|
|
||||||
}
|
|
||||||
|
|
||||||
res.IsValid = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// validateRequiredFields 验证必填字段
|
|
||||||
func (s *fieldMappingConfigService) validateRequiredFields(req *dto.CreateFieldMappingConfigReq) error {
|
|
||||||
if req.ConfigName == "" {
|
|
||||||
return errors.New("配置名称不能为空")
|
|
||||||
}
|
|
||||||
if req.VendorName == "" {
|
|
||||||
return errors.New("厂商名称不能为空")
|
|
||||||
}
|
|
||||||
if req.ApiName == "" {
|
|
||||||
return errors.New("接口名称不能为空")
|
|
||||||
}
|
|
||||||
if req.SourceField == "" {
|
|
||||||
return errors.New("源字段不能为空")
|
|
||||||
}
|
|
||||||
if req.TargetField == "" {
|
|
||||||
return errors.New("目标字段不能为空")
|
|
||||||
}
|
|
||||||
if req.TargetFieldType == "" {
|
|
||||||
return errors.New("目标字段类型不能为空")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// validateRequiredFieldsForBatch 批量创建的字段验证
|
|
||||||
func (s *fieldMappingConfigService) validateRequiredFieldsForBatch(config *dto.BatchFieldMappingConfigItem) error {
|
|
||||||
if config.ConfigName == "" {
|
|
||||||
return errors.New("配置名称不能为空")
|
|
||||||
}
|
|
||||||
if config.VendorName == "" {
|
|
||||||
return errors.New("厂商名称不能为空")
|
|
||||||
}
|
|
||||||
if config.ApiName == "" {
|
|
||||||
return errors.New("接口名称不能为空")
|
|
||||||
}
|
|
||||||
if config.SourceField == "" {
|
|
||||||
return errors.New("源字段不能为空")
|
|
||||||
}
|
|
||||||
if config.TargetField == "" {
|
|
||||||
return errors.New("目标字段不能为空")
|
|
||||||
}
|
|
||||||
if config.TargetFieldType == "" {
|
|
||||||
return errors.New("目标字段类型不能为空")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// validateTransformParams 验证转换参数
|
|
||||||
func (s *fieldMappingConfigService) validateTransformParams(transformType string, params map[string]interface{}) error {
|
|
||||||
if params == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
switch transformType {
|
|
||||||
case consts.TransformTypeFormatDate:
|
|
||||||
if _, ok := params["source_format"]; !ok {
|
|
||||||
return errors.New("日期格式化转换需要source_format参数")
|
|
||||||
}
|
|
||||||
if _, ok := params["target_format"]; !ok {
|
|
||||||
return errors.New("日期格式化转换需要target_format参数")
|
|
||||||
}
|
|
||||||
case consts.TransformTypeMapValue:
|
|
||||||
if len(params) == 0 {
|
|
||||||
return errors.New("值映射转换需要映射规则参数")
|
|
||||||
}
|
|
||||||
case consts.TransformTypeConcat:
|
|
||||||
if _, ok := params["fields"]; !ok {
|
|
||||||
return errors.New("拼接转换需要fields参数")
|
|
||||||
}
|
|
||||||
case consts.TransformTypeRegex:
|
|
||||||
if _, ok := params["pattern"]; !ok {
|
|
||||||
return errors.New("正则提取转换需要pattern参数")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// isValidBusinessDomain 验证业务域是否有效
|
|
||||||
func (s *fieldMappingConfigService) isValidBusinessDomain(domain string) bool {
|
|
||||||
validDomains := []string{
|
|
||||||
consts.BusinessDomainUser,
|
|
||||||
consts.BusinessDomainOrder,
|
|
||||||
consts.BusinessDomainProduct,
|
|
||||||
consts.BusinessDomainPayment,
|
|
||||||
}
|
|
||||||
for _, valid := range validDomains {
|
|
||||||
if domain == valid {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// getTransformTypeName 获取转换类型名称
|
|
||||||
func (s *fieldMappingConfigService) getTransformTypeName(transformType string) string {
|
|
||||||
typeNames := map[string]string{
|
|
||||||
consts.TransformTypeDirect: "直接映射",
|
|
||||||
consts.TransformTypeFormatDate: "日期格式化",
|
|
||||||
consts.TransformTypeMapValue: "值映射",
|
|
||||||
consts.TransformTypeConcat: "拼接",
|
|
||||||
consts.TransformTypeCalc: "计算",
|
|
||||||
consts.TransformTypeRegex: "正则提取",
|
|
||||||
}
|
|
||||||
if name, ok := typeNames[transformType]; ok {
|
|
||||||
return name
|
|
||||||
}
|
|
||||||
return transformType
|
|
||||||
}
|
|
||||||
|
|
||||||
// getBusinessDomainName 获取业务域名称
|
|
||||||
func (s *fieldMappingConfigService) getBusinessDomainName(domain string) string {
|
|
||||||
domainNames := map[string]string{
|
|
||||||
consts.BusinessDomainUser: "用户",
|
|
||||||
consts.BusinessDomainOrder: "订单",
|
|
||||||
consts.BusinessDomainProduct: "商品",
|
|
||||||
consts.BusinessDomainPayment: "支付",
|
|
||||||
}
|
|
||||||
if name, ok := domainNames[domain]; ok {
|
|
||||||
return name
|
|
||||||
}
|
|
||||||
return domain
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetActiveConfigsByBusinessDomain 根据业务域获取启用的配置
|
|
||||||
func (s *fieldMappingConfigService) GetActiveConfigsByBusinessDomain(ctx context.Context, businessDomain string) ([]entity.FieldMappingConfig, error) {
|
|
||||||
return dict.FieldMappingConfig.GetActiveConfigsByBusinessDomain(ctx, businessDomain)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFieldGroupsByVendorApi 获取指定厂商接口的字段分组
|
|
||||||
func (s *fieldMappingConfigService) GetFieldGroupsByVendorApi(ctx context.Context, vendorName, apiName string) ([]string, error) {
|
|
||||||
return dict.FieldMappingConfig.GetFieldGroupsByVendorApi(ctx, vendorName, apiName)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CleanExpiredConfigs 清理过期配置
|
|
||||||
func (s *fieldMappingConfigService) CleanExpiredConfigs(ctx context.Context) (int64, error) {
|
|
||||||
return dict.FieldMappingConfig.DeleteExpiredConfigs(ctx)
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"crypto/rand"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"math/big"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ApiResult API 调用结果
|
||||||
|
type ApiResult struct {
|
||||||
|
Body []byte
|
||||||
|
DurationMs int64
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApiClient 通用 API 客户端
|
||||||
|
type ApiClient struct {
|
||||||
|
config *PlatformConfig
|
||||||
|
client *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewApiClient 创建客户端
|
||||||
|
func NewApiClient(config *PlatformConfig) *ApiClient {
|
||||||
|
timeout := 30 * time.Second
|
||||||
|
if config.RequestTimeoutMs > 0 {
|
||||||
|
timeout = time.Duration(config.RequestTimeoutMs) * time.Millisecond
|
||||||
|
}
|
||||||
|
return &ApiClient{
|
||||||
|
config: config,
|
||||||
|
client: &http.Client{Timeout: timeout},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get 发送 GET 请求(无参数)
|
||||||
|
func (c *ApiClient) Get(ctx context.Context, path string) (*ApiResult, error) {
|
||||||
|
return c.doRequest(ctx, "GET", path, nil, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// PostJSON 发送 POST JSON 请求
|
||||||
|
func (c *ApiClient) PostJSON(ctx context.Context, path string, body interface{}) (*ApiResult, error) {
|
||||||
|
return c.doRequest(ctx, "POST", path, body, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request 通用请求方法(支持 GET/POST,支持参数在 query 或 body)
|
||||||
|
func (c *ApiClient) Request(ctx context.Context, method, path string, params map[string]interface{}, paramsInQuery bool) (*ApiResult, error) {
|
||||||
|
if paramsInQuery {
|
||||||
|
return c.doRequest(ctx, method, path, params, true)
|
||||||
|
}
|
||||||
|
if method == "GET" {
|
||||||
|
return c.doRequest(ctx, "GET", path, params, true)
|
||||||
|
}
|
||||||
|
return c.doRequest(ctx, method, path, params, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiClient) doRequest(ctx context.Context, method, path string, body interface{}, paramsInQuery bool) (result *ApiResult, err error) {
|
||||||
|
maxRetries := c.config.MaxRetries
|
||||||
|
if maxRetries <= 0 {
|
||||||
|
maxRetries = 3
|
||||||
|
}
|
||||||
|
retryDelay := time.Duration(c.config.RetryDelayMs) * time.Millisecond
|
||||||
|
if retryDelay <= 0 {
|
||||||
|
retryDelay = 1 * time.Second
|
||||||
|
}
|
||||||
|
|
||||||
|
for attempt := 0; attempt <= maxRetries; attempt++ {
|
||||||
|
result, err = c.execute(ctx, method, path, body, paramsInQuery)
|
||||||
|
if err == nil {
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
logrus.Warnf("请求失败 (attempt %d/%d): %v", attempt+1, maxRetries+1, err)
|
||||||
|
if attempt < maxRetries {
|
||||||
|
time.Sleep(retryDelay * time.Duration(attempt+1))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result, fmt.Errorf("请求已重试 %d 次仍失败: %w", maxRetries, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiClient) execute(ctx context.Context, method, path string, body interface{}, paramsInQuery bool) (*ApiResult, error) {
|
||||||
|
start := time.Now()
|
||||||
|
fullURL := c.config.GetApiUrl(path)
|
||||||
|
|
||||||
|
// 先注入认证参数
|
||||||
|
fullURL = c.applyAuthURL(fullURL)
|
||||||
|
|
||||||
|
var reqBody io.Reader
|
||||||
|
if body != nil && !paramsInQuery {
|
||||||
|
b, _ := json.Marshal(body)
|
||||||
|
reqBody = bytes.NewBuffer(b)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果参数在查询字符串中,拼接到 URL
|
||||||
|
if body != nil && paramsInQuery {
|
||||||
|
if paramsMap, ok := body.(map[string]interface{}); ok {
|
||||||
|
fullURL = c.buildQueryURL(fullURL, paramsMap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Infof("请求 URL: %s", fullURL)
|
||||||
|
|
||||||
|
req, err := http.NewRequestWithContext(ctx, method, fullURL, reqBody)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("创建请求失败: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
c.applyAuthHeader(req)
|
||||||
|
req.Header.Set("User-Agent", "data-engine/1.0")
|
||||||
|
if body != nil && !paramsInQuery {
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := c.client.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("请求失败: %w", err)
|
||||||
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
respBody, _ := io.ReadAll(resp.Body)
|
||||||
|
result := &ApiResult{Body: respBody, DurationMs: time.Since(start).Milliseconds()}
|
||||||
|
|
||||||
|
if resp.StatusCode >= 400 {
|
||||||
|
return result, fmt.Errorf("HTTP %d: %s", resp.StatusCode, string(respBody))
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// buildQueryURL 将 params 拼接到 URL 查询参数中
|
||||||
|
// 支持数组/对象类型的值自动 JSON 序列化 + URL 编码
|
||||||
|
func (c *ApiClient) buildQueryURL(rawURL string, params map[string]interface{}) string {
|
||||||
|
parsed, _ := url.Parse(rawURL)
|
||||||
|
q := parsed.Query()
|
||||||
|
|
||||||
|
for k, v := range params {
|
||||||
|
switch val := v.(type) {
|
||||||
|
case string:
|
||||||
|
q.Set(k, val)
|
||||||
|
case bool:
|
||||||
|
if val {
|
||||||
|
q.Set(k, "true")
|
||||||
|
} else {
|
||||||
|
q.Set(k, "false")
|
||||||
|
}
|
||||||
|
case float64:
|
||||||
|
// JSON 数字反序列化默认是 float64,转 int 避免科学计数法
|
||||||
|
if val == float64(int64(val)) {
|
||||||
|
q.Set(k, fmt.Sprintf("%d", int64(val)))
|
||||||
|
} else {
|
||||||
|
q.Set(k, fmt.Sprintf("%v", val))
|
||||||
|
}
|
||||||
|
case float32:
|
||||||
|
q.Set(k, fmt.Sprintf("%v", val))
|
||||||
|
case int, int8, int16, int32, int64:
|
||||||
|
q.Set(k, fmt.Sprintf("%d", val))
|
||||||
|
case uint, uint8, uint16, uint32, uint64:
|
||||||
|
q.Set(k, fmt.Sprintf("%d", val))
|
||||||
|
case []interface{}, map[string]interface{}:
|
||||||
|
// 数组或对象需要 JSON 序列化后 URL 编码
|
||||||
|
b, _ := json.Marshal(v)
|
||||||
|
q.Set(k, string(b))
|
||||||
|
default:
|
||||||
|
q.Set(k, fmt.Sprintf("%v", v))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parsed.RawQuery = q.Encode()
|
||||||
|
return parsed.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiClient) applyAuthURL(rawURL string) string {
|
||||||
|
cfg := c.config.AuthConfig
|
||||||
|
token := c.config.AccessToken
|
||||||
|
if cfg == nil {
|
||||||
|
return rawURL
|
||||||
|
}
|
||||||
|
|
||||||
|
tokenInQuery, _ := cfg["token_in_query"].(bool)
|
||||||
|
queryKey, _ := cfg["query_key"].(string)
|
||||||
|
if queryKey == "" {
|
||||||
|
queryKey = "access_token"
|
||||||
|
}
|
||||||
|
|
||||||
|
extraParams := make(map[string]string)
|
||||||
|
if eq, ok := cfg["extra_query_params"].(map[string]interface{}); ok {
|
||||||
|
for k, v := range eq {
|
||||||
|
val := fmt.Sprintf("%v", v)
|
||||||
|
val = strings.ReplaceAll(val, "{timestamp}", fmt.Sprintf("%d", time.Now().Unix()))
|
||||||
|
val = strings.ReplaceAll(val, "{nonce}", generateNonce())
|
||||||
|
extraParams[k] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !tokenInQuery && len(extraParams) == 0 {
|
||||||
|
return rawURL
|
||||||
|
}
|
||||||
|
|
||||||
|
parsed, _ := url.Parse(rawURL)
|
||||||
|
q := parsed.Query()
|
||||||
|
if tokenInQuery && token != "" {
|
||||||
|
q.Set(queryKey, token)
|
||||||
|
}
|
||||||
|
for k, v := range extraParams {
|
||||||
|
q.Set(k, v)
|
||||||
|
}
|
||||||
|
parsed.RawQuery = q.Encode()
|
||||||
|
return parsed.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ApiClient) applyAuthHeader(req *http.Request) {
|
||||||
|
cfg := c.config.AuthConfig
|
||||||
|
token := c.config.AccessToken
|
||||||
|
|
||||||
|
if cfg != nil {
|
||||||
|
if tiq, _ := cfg["token_in_query"].(bool); tiq {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if token == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg != nil {
|
||||||
|
if h, ok := cfg["header_name"].(string); ok {
|
||||||
|
f := cfg["header_format"].(string)
|
||||||
|
if f == "" {
|
||||||
|
f = "{token}"
|
||||||
|
}
|
||||||
|
req.Header.Set(h, strings.ReplaceAll(f, "{token}", token))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch c.config.AuthType {
|
||||||
|
case "OAUTH2", "TOKEN":
|
||||||
|
req.Header.Set("Authorization", "Bearer "+token)
|
||||||
|
case "API_KEY":
|
||||||
|
req.Header.Set("X-API-Key", token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func generateNonce() string {
|
||||||
|
nanoPart := time.Now().UnixNano() % 1000000000000
|
||||||
|
r, _ := rand.Int(rand.Reader, big.NewInt(10000))
|
||||||
|
return fmt.Sprintf("%012d%04d", nanoPart, r.Int64())
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
dao "dataengine/dao/copydata"
|
||||||
|
taskDto "dataengine/model/dto/copydata"
|
||||||
|
|
||||||
|
"gitea.com/red-future/common/beans"
|
||||||
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StartCompensation 启动补偿调度器(在后台循环执行)
|
||||||
|
func StartCompensation(ctx context.Context) {
|
||||||
|
sec := g.Cfg().MustGet(ctx, "sync.compensation_interval_seconds", 300).Int()
|
||||||
|
if sec < 10 {
|
||||||
|
sec = 300
|
||||||
|
}
|
||||||
|
interval := time.Duration(sec) * time.Second
|
||||||
|
logrus.Infof("补偿调度器启动,间隔: %v", interval)
|
||||||
|
|
||||||
|
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin", TenantId: 1})
|
||||||
|
|
||||||
|
runCompensation(ctx)
|
||||||
|
ticker := time.NewTicker(interval)
|
||||||
|
defer ticker.Stop()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-ticker.C:
|
||||||
|
runCompensation(ctx)
|
||||||
|
case <-ctx.Done():
|
||||||
|
logrus.Info("补偿调度器已停止")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func runCompensation(ctx context.Context) {
|
||||||
|
logrus.Info("=== 开始补偿扫描 ===")
|
||||||
|
|
||||||
|
tasks, err := dao.SyncTaskLog.QueryFailedTasks(ctx, &taskDto.QueryFailedTasksReq{
|
||||||
|
Status: []string{"failed"},
|
||||||
|
Limit: 50,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("查询失败任务异常: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(tasks) == 0 {
|
||||||
|
logrus.Info("当前没有需要补偿的任务")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Infof("发现 %d 个失败任务", len(tasks))
|
||||||
|
|
||||||
|
for _, task := range tasks {
|
||||||
|
if task.RetryCount >= task.MaxRetry {
|
||||||
|
logrus.Warnf("任务 %s 已达最大重试次数 %d", task.TaskID, task.MaxRetry)
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "manual_review",
|
||||||
|
ErrorMessage: fmt.Sprintf("已达最大重试次数 %d", task.MaxRetry),
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
platformCode := task.PlatformCode
|
||||||
|
interfaceCode := task.InterfaceCode
|
||||||
|
if platformCode == "" || interfaceCode == "" {
|
||||||
|
logrus.Warnf("任务 %s 缺少 platform_code 或 interface_code,跳过", task.TaskID)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Infof("补偿: %s/%s (第 %d 次)", platformCode, interfaceCode, task.RetryCount+1)
|
||||||
|
|
||||||
|
retryCount := task.RetryCount + 1
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "retrying",
|
||||||
|
RetryCount: &retryCount,
|
||||||
|
})
|
||||||
|
|
||||||
|
_, err := SyncByConfig(ctx, platformCode, interfaceCode, false)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("补偿失败: %v", err)
|
||||||
|
backoff := []int{5, 15, 30, 60, 120}
|
||||||
|
waitMin := 5
|
||||||
|
if retryCount <= len(backoff) {
|
||||||
|
waitMin = backoff[retryCount-1]
|
||||||
|
} else {
|
||||||
|
waitMin = backoff[len(backoff)-1]
|
||||||
|
}
|
||||||
|
nextRetry := time.Now().Add(time.Duration(waitMin) * time.Minute)
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "failed",
|
||||||
|
ErrorMessage: err.Error(),
|
||||||
|
ErrorCode: "COMPENSATION_FAILED",
|
||||||
|
NextRetryTime: nextRetry,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
logrus.Infof("补偿成功: %s/%s", platformCode, interfaceCode)
|
||||||
|
now := time.Now()
|
||||||
|
dao.SyncTaskLog.Update(ctx, &taskDto.UpdateSyncTaskLogReq{
|
||||||
|
ID: task.Id,
|
||||||
|
Status: "success",
|
||||||
|
CompletedAt: now,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Info("=== 补偿扫描完成 ===")
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"gitea.com/red-future/common/db/gfdb"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// InsertRows 批量写入数据
|
||||||
|
func InsertRows(ctx context.Context, tableName string, conflictKeys []string, rows []map[string]interface{}) (int, error) {
|
||||||
|
if len(rows) == 0 {
|
||||||
|
return 0, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
now := time.Now()
|
||||||
|
for i := range rows {
|
||||||
|
if rows[i] == nil {
|
||||||
|
rows[i] = make(map[string]interface{})
|
||||||
|
}
|
||||||
|
if _, ok := rows[i]["created_at"]; !ok {
|
||||||
|
rows[i]["created_at"] = now
|
||||||
|
}
|
||||||
|
if _, ok := rows[i]["updated_at"]; !ok {
|
||||||
|
rows[i]["updated_at"] = now
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
batchSize := 100
|
||||||
|
total := 0
|
||||||
|
for i := 0; i < len(rows); i += batchSize {
|
||||||
|
end := i + batchSize
|
||||||
|
if end > len(rows) {
|
||||||
|
end = len(rows)
|
||||||
|
}
|
||||||
|
batch := rows[i:end]
|
||||||
|
|
||||||
|
m := gfdb.DB(ctx).Model(ctx, tableName).Data(batch)
|
||||||
|
if len(conflictKeys) > 0 {
|
||||||
|
keys := make([]interface{}, len(conflictKeys))
|
||||||
|
for j, k := range conflictKeys {
|
||||||
|
keys[j] = k
|
||||||
|
}
|
||||||
|
m = m.OnConflict(keys...)
|
||||||
|
}
|
||||||
|
_, err := m.Save()
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("批量写入 %s 失败: %v", tableName, err)
|
||||||
|
for _, row := range batch {
|
||||||
|
mm := gfdb.DB(ctx).Model(ctx, tableName).Data(row)
|
||||||
|
if len(conflictKeys) > 0 {
|
||||||
|
keys := make([]interface{}, len(conflictKeys))
|
||||||
|
for j, k := range conflictKeys {
|
||||||
|
keys[j] = k
|
||||||
|
}
|
||||||
|
mm = mm.OnConflict(keys...)
|
||||||
|
}
|
||||||
|
if _, e := mm.Save(); e != nil {
|
||||||
|
logrus.Errorf("逐条写入失败: %v", e)
|
||||||
|
} else {
|
||||||
|
total++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
total += len(batch)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,658 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
consts "dataengine/consts/public"
|
||||||
|
dao "dataengine/dao/copydata"
|
||||||
|
taskDto "dataengine/model/dto/copydata"
|
||||||
|
entity "dataengine/model/entity/dict"
|
||||||
|
|
||||||
|
"gitea.com/red-future/common/db/gfdb"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SyncResult 同步结果
|
||||||
|
type SyncResult struct {
|
||||||
|
TableName string
|
||||||
|
TotalPages int
|
||||||
|
TotalRows int
|
||||||
|
InsertedRows int
|
||||||
|
Duration string
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrefetchConfig 预取配置
|
||||||
|
type PrefetchConfig struct {
|
||||||
|
URL string `json:"url"`
|
||||||
|
Method string `json:"method"`
|
||||||
|
ResponsePath string `json:"response_path"`
|
||||||
|
TargetParam string `json:"target_param"`
|
||||||
|
ValueField string `json:"value_field"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// SyncByConfig 执行同步
|
||||||
|
func SyncByConfig(ctx context.Context, platformCode, interfaceCode string, isFullSync bool) (*SyncResult, error) {
|
||||||
|
start := time.Now()
|
||||||
|
pm := &PlatformManager{}
|
||||||
|
|
||||||
|
platform, ifaces, err := pm.GetPlatformWithInterfaces(ctx, platformCode)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("读取平台配置失败: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var iface *entity.ApiInterface
|
||||||
|
for i := range ifaces {
|
||||||
|
if ifaces[i].Code == interfaceCode {
|
||||||
|
iface = &ifaces[i]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if iface == nil {
|
||||||
|
return nil, fmt.Errorf("未找到接口 [%s]", interfaceCode)
|
||||||
|
}
|
||||||
|
if iface.TableDefinition == nil || len(iface.TableDefinition) == 0 {
|
||||||
|
return nil, fmt.Errorf("接口 [%s] 未配置 table_definition", interfaceCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
td, err := ParseTableDefinition(iface.TableDefinition)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("解析表结构失败: %w", err)
|
||||||
|
}
|
||||||
|
if err := EnsureTable(ctx, td); err != nil {
|
||||||
|
return nil, fmt.Errorf("建表失败: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查上次同步状态(在标记 running 之前检查)
|
||||||
|
prevStatus := getSyncStatus(ctx, platformCode, interfaceCode)
|
||||||
|
lastSyncTime := int64(0)
|
||||||
|
if !isFullSync {
|
||||||
|
lastSyncTime = getLastSyncTime(ctx, platformCode, interfaceCode)
|
||||||
|
}
|
||||||
|
if prevStatus == "running" {
|
||||||
|
logrus.Warnf("检测到上次同步异常中断 [%s/%s],将重新全量同步", platformCode, interfaceCode)
|
||||||
|
lastSyncTime = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标记同步开始(保留 last_sync_time 不变,状态设为 running)
|
||||||
|
markSyncRunning(ctx, platformCode, interfaceCode, lastSyncTime)
|
||||||
|
|
||||||
|
api := NewApiClient(platform)
|
||||||
|
|
||||||
|
prefetch := parsePrefetchConfig(iface.RequestConfig)
|
||||||
|
if prefetch != nil {
|
||||||
|
return syncWithPrefetch(ctx, api, platform, iface, ifaces, td, prefetch, isFullSync, lastSyncTime, start)
|
||||||
|
}
|
||||||
|
return syncSingleAPI(ctx, api, platform, iface, td, lastSyncTime, start)
|
||||||
|
}
|
||||||
|
|
||||||
|
// paramsInQuery 判断参数是否应放在 URL 查询字符串中
|
||||||
|
func paramsInQuery(iface *entity.ApiInterface) bool {
|
||||||
|
if iface.Method == "GET" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if iface.RequestConfig != nil {
|
||||||
|
if loc, _ := iface.RequestConfig["parameters_location"].(string); loc == "query" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// syncSingleAPI 单接口分页同步
|
||||||
|
func syncSingleAPI(ctx context.Context, api *ApiClient, platform *PlatformConfig, iface *entity.ApiInterface, td *TableDefinition, lastSyncTime int64, start time.Time) (*SyncResult, error) {
|
||||||
|
pageSize := GetSyncPageSize(ctx)
|
||||||
|
if ps, ok := iface.RequestConfig["page_size"].(float64); ok {
|
||||||
|
pageSize = int(ps)
|
||||||
|
}
|
||||||
|
|
||||||
|
inQuery := paramsInQuery(iface)
|
||||||
|
method := string(iface.Method)
|
||||||
|
|
||||||
|
body := buildReqBody(iface, 1, pageSize, lastSyncTime, nil)
|
||||||
|
resp, err := api.Request(ctx, method, iface.Url, body, inQuery)
|
||||||
|
if err != nil {
|
||||||
|
recordFailure(ctx, platform.PlatformCode, iface.Code, err.Error())
|
||||||
|
return nil, fmt.Errorf("获取第一页失败: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
rows, totalPages, maxTime, err := parseResp(resp.Body, iface.ResponseConfig)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
result := &SyncResult{TableName: td.TableName, TotalPages: totalPages}
|
||||||
|
inserted, _ := savePage(ctx, td, rows)
|
||||||
|
result.InsertedRows += inserted
|
||||||
|
result.TotalRows += len(rows)
|
||||||
|
|
||||||
|
for page := 2; page <= totalPages; page++ {
|
||||||
|
body := buildReqBody(iface, page, pageSize, lastSyncTime, nil)
|
||||||
|
resp, err := api.Request(ctx, method, iface.Url, body, inQuery)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("第 %d 页失败: %v", page, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
rows, _, mt, err := parseResp(resp.Body, iface.ResponseConfig)
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
inserted, _ = savePage(ctx, td, rows)
|
||||||
|
result.InsertedRows += inserted
|
||||||
|
result.TotalRows += len(rows)
|
||||||
|
if mt > maxTime {
|
||||||
|
maxTime = mt
|
||||||
|
}
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
}
|
||||||
|
|
||||||
|
if maxTime <= 0 {
|
||||||
|
maxTime = time.Now().Unix()
|
||||||
|
}
|
||||||
|
updateSyncTime(ctx, platform.PlatformCode, iface.Code, maxTime)
|
||||||
|
|
||||||
|
result.Duration = fmt.Sprintf("%.1fs", time.Since(start).Seconds())
|
||||||
|
logrus.Infof("同步完成 - 表:%s, %d条, 写入%d条, 耗时%s", td.TableName, result.TotalRows, result.InsertedRows, result.Duration)
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// syncWithPrefetch 预取模式同步(先分页拉取全部实体列表,再并发处理每个实体)
|
||||||
|
func syncWithPrefetch(ctx context.Context, api *ApiClient, platform *PlatformConfig, iface *entity.ApiInterface, allIfaces []entity.ApiInterface, td *TableDefinition, prefetch *PrefetchConfig, isFullSync bool, lastSyncTime int64, start time.Time) (*SyncResult, error) {
|
||||||
|
logrus.Infof("预取模式: %s -> %s", prefetch.URL, iface.Url)
|
||||||
|
|
||||||
|
// 1. 查找匹配 prefetch URL 的接口配置(用于获取正确的请求参数)
|
||||||
|
prefetchIface := findInterfaceByURL(allIfaces, prefetch.URL)
|
||||||
|
prefetchParams := buildPrefetchParams(iface)
|
||||||
|
if prefetchIface != nil && prefetchIface.RequestConfig != nil {
|
||||||
|
// 使用 prefetch 目标接口的 request_config 重建参数(覆盖默认值)
|
||||||
|
for k, v := range prefetchIface.RequestConfig {
|
||||||
|
if k == "headers" || k == "prefetch" || k == "page_param" ||
|
||||||
|
k == "page_size_param" || k == "time_field" || k == "parameters_location" ||
|
||||||
|
k == "filtering" || k == "group_by" || k == "date_range" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
prefetchParams[k] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
method := strings.ToUpper(prefetch.Method)
|
||||||
|
inQuery := paramsInQuery(iface)
|
||||||
|
|
||||||
|
allEntities := make([]interface{}, 0)
|
||||||
|
allRows := make([]map[string]interface{}, 0)
|
||||||
|
prefetchPage := 1
|
||||||
|
prefetchTotalPages := 1
|
||||||
|
|
||||||
|
for prefetchPage <= prefetchTotalPages {
|
||||||
|
params := make(map[string]interface{})
|
||||||
|
for k, v := range prefetchParams {
|
||||||
|
params[k] = v
|
||||||
|
}
|
||||||
|
pageParam := "page"
|
||||||
|
if p, ok := iface.RequestConfig["page_param"].(string); ok {
|
||||||
|
pageParam = p
|
||||||
|
}
|
||||||
|
params[pageParam] = prefetchPage
|
||||||
|
|
||||||
|
resp, err := api.Request(ctx, method, prefetch.URL, params, true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("预取第 %d 页失败: %w", prefetchPage, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
entities, _, _, err := parseResp(resp.Body, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("解析预取第 %d 页响应失败: %w", prefetchPage, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 收集完整数据行(用于存库)和提取的 ID 值(用于遍历)
|
||||||
|
for _, item := range entities {
|
||||||
|
allRows = append(allRows, item)
|
||||||
|
if prefetch.ValueField == "" {
|
||||||
|
allEntities = append(allEntities, item)
|
||||||
|
} else if v, ok := item[prefetch.ValueField]; ok {
|
||||||
|
// 将 float64 转 int64,避免后续 URL 参数中出现科学计数法
|
||||||
|
if f, ok := v.(float64); ok {
|
||||||
|
allEntities = append(allEntities, int64(f))
|
||||||
|
} else {
|
||||||
|
allEntities = append(allEntities, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if prefetchPage == 1 {
|
||||||
|
if tp := getTotalPages(resp.Body); tp > 0 {
|
||||||
|
prefetchTotalPages = tp
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prefetchPage++
|
||||||
|
time.Sleep(50 * time.Millisecond)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(allEntities) == 0 {
|
||||||
|
logrus.Warn("预取结果为空列表,跳过同步")
|
||||||
|
return &SyncResult{TableName: td.TableName, Duration: fmt.Sprintf("%.1fs", time.Since(start).Seconds())}, nil
|
||||||
|
}
|
||||||
|
logrus.Infof("预取到 %d 个实体(共 %d 页)", len(allEntities), prefetchPage-1)
|
||||||
|
|
||||||
|
// 2. 将预取的数据也存入库(如账户列表存入 tencent_account_relation)
|
||||||
|
if prefetchIface != nil && prefetchIface.TableDefinition != nil {
|
||||||
|
prefetchTd, err := ParseTableDefinition(prefetchIface.TableDefinition)
|
||||||
|
if err == nil {
|
||||||
|
if ensureErr := EnsureTable(ctx, prefetchTd); ensureErr == nil {
|
||||||
|
saved, _ := savePage(ctx, prefetchTd, allRows)
|
||||||
|
logrus.Infof("预取数据已存库: %s, %d 条", prefetchTd.TableName, saved)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 并发处理每个实体的数据
|
||||||
|
result := &SyncResult{TableName: td.TableName}
|
||||||
|
pageSize := GetSyncPageSize(ctx)
|
||||||
|
if ps, ok := iface.RequestConfig["page_size"].(float64); ok {
|
||||||
|
pageSize = int(ps)
|
||||||
|
}
|
||||||
|
|
||||||
|
dataMethod := string(iface.Method)
|
||||||
|
concurrency := GetSyncConcurrency(ctx)
|
||||||
|
|
||||||
|
var mu sync.Mutex
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
sem := make(chan struct{}, concurrency)
|
||||||
|
globalMaxTime := lastSyncTime
|
||||||
|
|
||||||
|
for idx, entityVal := range allEntities {
|
||||||
|
wg.Add(1)
|
||||||
|
sem <- struct{}{}
|
||||||
|
|
||||||
|
go func(idx int, val interface{}) {
|
||||||
|
defer wg.Done()
|
||||||
|
defer func() { <-sem }()
|
||||||
|
|
||||||
|
logrus.Infof(" 处理实体 [%d/%d]: %v", idx+1, len(allEntities), val)
|
||||||
|
|
||||||
|
page := 1
|
||||||
|
totalPages := 1
|
||||||
|
entityMaxTime := int64(0)
|
||||||
|
|
||||||
|
for page <= totalPages {
|
||||||
|
body := buildReqBody(iface, page, pageSize, lastSyncTime, map[string]interface{}{
|
||||||
|
prefetch.TargetParam: val,
|
||||||
|
})
|
||||||
|
|
||||||
|
resp, err := api.Request(ctx, dataMethod, iface.Url, body, inQuery)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf(" 实体 %v 第 %d 页失败: %v", val, page, err)
|
||||||
|
page++
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
rows, tp, mt, parseErr := parseResp(resp.Body, iface.ResponseConfig)
|
||||||
|
if parseErr != nil {
|
||||||
|
logrus.Errorf(" 解析响应失败: %v", parseErr)
|
||||||
|
page++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if page == 1 {
|
||||||
|
totalPages = tp
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := range rows {
|
||||||
|
rows[i][prefetch.TargetParam] = val
|
||||||
|
}
|
||||||
|
|
||||||
|
inserted, _ := savePage(ctx, td, rows)
|
||||||
|
|
||||||
|
mu.Lock()
|
||||||
|
result.InsertedRows += inserted
|
||||||
|
result.TotalRows += len(rows)
|
||||||
|
mu.Unlock()
|
||||||
|
|
||||||
|
if mt > entityMaxTime {
|
||||||
|
entityMaxTime = mt
|
||||||
|
}
|
||||||
|
|
||||||
|
page++
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
}
|
||||||
|
|
||||||
|
if entityMaxTime > 0 {
|
||||||
|
mu.Lock()
|
||||||
|
if entityMaxTime > globalMaxTime {
|
||||||
|
globalMaxTime = entityMaxTime
|
||||||
|
}
|
||||||
|
mu.Unlock()
|
||||||
|
}
|
||||||
|
}(idx, entityVal)
|
||||||
|
}
|
||||||
|
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
if globalMaxTime <= 0 {
|
||||||
|
globalMaxTime = time.Now().Unix()
|
||||||
|
}
|
||||||
|
updateSyncTime(ctx, platform.PlatformCode, iface.Code, globalMaxTime)
|
||||||
|
|
||||||
|
result.Duration = fmt.Sprintf("%.1fs", time.Since(start).Seconds())
|
||||||
|
logrus.Infof("同步完成 - 表:%s, %d条, 写入%d条, 耗时%s", td.TableName, result.TotalRows, result.InsertedRows, result.Duration)
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// getTotalPages 从响应中提取总页数
|
||||||
|
func getTotalPages(raw []byte) int {
|
||||||
|
var r struct {
|
||||||
|
Data map[string]interface{} `json:"data"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal(raw, &r); err != nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
if r.Data == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
if pi, ok := r.Data["page_info"].(map[string]interface{}); ok {
|
||||||
|
if tp, ok := pi["total_page"].(float64); ok {
|
||||||
|
return int(tp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// buildPrefetchParams 构建预取接口的请求参数
|
||||||
|
func buildPrefetchParams(iface *entity.ApiInterface) map[string]interface{} {
|
||||||
|
params := make(map[string]interface{})
|
||||||
|
|
||||||
|
if iface.RequestConfig != nil {
|
||||||
|
pageParam := "page"
|
||||||
|
psParam := "page_size"
|
||||||
|
if p, ok := iface.RequestConfig["page_param"].(string); ok {
|
||||||
|
pageParam = p
|
||||||
|
}
|
||||||
|
if p, ok := iface.RequestConfig["page_size_param"].(string); ok {
|
||||||
|
psParam = p
|
||||||
|
}
|
||||||
|
params[pageParam] = 1
|
||||||
|
params[psParam] = 100
|
||||||
|
|
||||||
|
for k, v := range iface.RequestConfig {
|
||||||
|
if k == "headers" || k == "prefetch" || k == "page_param" ||
|
||||||
|
k == "page_size_param" || k == "time_field" || k == "parameters_location" ||
|
||||||
|
k == "filtering" || k == "group_by" || k == "date_range" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if k == pageParam || k == psParam {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
params[k] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return params
|
||||||
|
}
|
||||||
|
|
||||||
|
// parsePrefetchConfig 解析预取配置
|
||||||
|
func parsePrefetchConfig(requestConfig map[string]interface{}) *PrefetchConfig {
|
||||||
|
if requestConfig == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
raw, ok := requestConfig["prefetch"]
|
||||||
|
if !ok || raw == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
m, ok := raw.(map[string]interface{})
|
||||||
|
if !ok {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
pc := &PrefetchConfig{}
|
||||||
|
if u, _ := m["url"].(string); u != "" {
|
||||||
|
pc.URL = u
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if method, _ := m["method"].(string); method != "" {
|
||||||
|
pc.Method = method
|
||||||
|
} else {
|
||||||
|
pc.Method = "GET"
|
||||||
|
}
|
||||||
|
pc.ResponsePath, _ = m["response_path"].(string)
|
||||||
|
pc.TargetParam, _ = m["target_param"].(string)
|
||||||
|
pc.ValueField, _ = m["value_field"].(string)
|
||||||
|
return pc
|
||||||
|
}
|
||||||
|
|
||||||
|
// extractValues 从 JSON 响应中提取值列表
|
||||||
|
func extractValues(raw []byte, path, valueField string) ([]interface{}, error) {
|
||||||
|
var resp map[string]interface{}
|
||||||
|
if err := json.Unmarshal(raw, &resp); err != nil {
|
||||||
|
return nil, fmt.Errorf("JSON解析失败: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
parts := strings.Split(path, ".")
|
||||||
|
current := resp
|
||||||
|
for i, part := range parts {
|
||||||
|
if i == len(parts)-1 {
|
||||||
|
list, ok := current[part].([]interface{})
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("路径 %s 不是数组", path)
|
||||||
|
}
|
||||||
|
var values []interface{}
|
||||||
|
for _, item := range list {
|
||||||
|
if valueField == "" {
|
||||||
|
values = append(values, item)
|
||||||
|
} else if m, ok := item.(map[string]interface{}); ok {
|
||||||
|
if v, exists := m[valueField]; exists {
|
||||||
|
values = append(values, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return values, nil
|
||||||
|
}
|
||||||
|
next, ok := current[part].(map[string]interface{})
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("路径 %s 在 %s 处中断", path, part)
|
||||||
|
}
|
||||||
|
current = next
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("路径 %s 不完整", path)
|
||||||
|
}
|
||||||
|
|
||||||
|
// buildReqBody 构建请求参数
|
||||||
|
func buildReqBody(iface *entity.ApiInterface, page, pageSize int, lastSyncTime int64, extraParams map[string]interface{}) map[string]interface{} {
|
||||||
|
body := make(map[string]interface{})
|
||||||
|
if iface.RequestConfig != nil {
|
||||||
|
for k, v := range iface.RequestConfig {
|
||||||
|
if k == "time_field" || k == "headers" || k == "prefetch" ||
|
||||||
|
k == "page_param" || k == "page_size_param" || k == "parameters_location" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
body[k] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pageParam := "page"
|
||||||
|
psParam := "page_size"
|
||||||
|
if iface.RequestConfig != nil {
|
||||||
|
if p, ok := iface.RequestConfig["page_param"].(string); ok {
|
||||||
|
pageParam = p
|
||||||
|
}
|
||||||
|
if p, ok := iface.RequestConfig["page_size_param"].(string); ok {
|
||||||
|
psParam = p
|
||||||
|
}
|
||||||
|
}
|
||||||
|
body[pageParam] = page
|
||||||
|
body[psParam] = pageSize
|
||||||
|
// 增量同步:将 time_field 转为 API 期望的 filtering 格式
|
||||||
|
// 如 filtering=[{"field":"last_modified_time","operator":"GREATER_EQUALS","values":["1780037982"]}]
|
||||||
|
if lastSyncTime > 0 {
|
||||||
|
if tf, ok := iface.RequestConfig["time_field"].(string); ok && tf != "" {
|
||||||
|
timeFilter := map[string]interface{}{
|
||||||
|
"field": tf,
|
||||||
|
"operator": "GREATER_EQUALS",
|
||||||
|
"values": []interface{}{fmt.Sprintf("%d", lastSyncTime)},
|
||||||
|
}
|
||||||
|
// 合并已有的 filtering(如果 request_config 中已定义其他过滤条件)
|
||||||
|
if existing, ok := body["filtering"].([]interface{}); ok {
|
||||||
|
body["filtering"] = append(existing, timeFilter)
|
||||||
|
} else {
|
||||||
|
body["filtering"] = []interface{}{timeFilter}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for k, v := range extraParams {
|
||||||
|
body[k] = v
|
||||||
|
}
|
||||||
|
return body
|
||||||
|
}
|
||||||
|
|
||||||
|
// parseResp 解析同步接口返回值
|
||||||
|
func parseResp(raw []byte, responseConfig map[string]interface{}) ([]map[string]interface{}, int, int64, error) {
|
||||||
|
var r struct {
|
||||||
|
Code int `json:"code"`
|
||||||
|
Message string `json:"message"`
|
||||||
|
Data map[string]interface{} `json:"data"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal(raw, &r); err != nil {
|
||||||
|
return nil, 0, 0, fmt.Errorf("解析响应失败: %w", err)
|
||||||
|
}
|
||||||
|
if r.Code != 0 {
|
||||||
|
return nil, 0, 0, fmt.Errorf("API错误: code=%d, message=%s", r.Code, r.Message)
|
||||||
|
}
|
||||||
|
|
||||||
|
var rows []map[string]interface{}
|
||||||
|
totalPages := 1
|
||||||
|
maxTime := int64(0)
|
||||||
|
|
||||||
|
var listData []interface{}
|
||||||
|
if lp, ok := r.Data["list"]; ok {
|
||||||
|
listData, _ = lp.([]interface{})
|
||||||
|
} else if lp, ok := r.Data["data"]; ok {
|
||||||
|
if m, ok := lp.(map[string]interface{}); ok {
|
||||||
|
if l, ok := m["list"].([]interface{}); ok {
|
||||||
|
listData = l
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, item := range listData {
|
||||||
|
if m, ok := item.(map[string]interface{}); ok {
|
||||||
|
j, _ := json.Marshal(m)
|
||||||
|
m["raw_data"] = string(j)
|
||||||
|
if t, ok := m["last_modified_time"].(float64); ok && int64(t) > maxTime {
|
||||||
|
maxTime = int64(t)
|
||||||
|
}
|
||||||
|
if t, ok := m["created_time"].(float64); ok && int64(t) > maxTime {
|
||||||
|
maxTime = int64(t)
|
||||||
|
}
|
||||||
|
rows = append(rows, m)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if pi, ok := r.Data["page_info"].(map[string]interface{}); ok {
|
||||||
|
if tp, ok := pi["total_page"].(float64); ok {
|
||||||
|
totalPages = int(tp)
|
||||||
|
} else if tp, ok := pi["total_page"].(int); ok {
|
||||||
|
totalPages = tp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rows, totalPages, maxTime, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func savePage(ctx context.Context, td *TableDefinition, rows []map[string]interface{}) (int, error) {
|
||||||
|
if len(rows) == 0 {
|
||||||
|
return 0, nil
|
||||||
|
}
|
||||||
|
colSet := make(map[string]bool)
|
||||||
|
for _, c := range td.Columns {
|
||||||
|
colSet[c.Name] = true
|
||||||
|
}
|
||||||
|
var clean []map[string]interface{}
|
||||||
|
for _, row := range rows {
|
||||||
|
c := make(map[string]interface{})
|
||||||
|
for k, v := range row {
|
||||||
|
if colSet[k] {
|
||||||
|
c[k] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if r, ok := row["raw_data"]; ok {
|
||||||
|
c["raw_data"] = r
|
||||||
|
}
|
||||||
|
clean = append(clean, c)
|
||||||
|
}
|
||||||
|
return InsertRows(ctx, td.TableName, td.ConflictKeys, clean)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getLastSyncTime(ctx context.Context, platformCode, interfaceCode string) int64 {
|
||||||
|
var t int64
|
||||||
|
gfdb.DB(ctx).Model(ctx, consts.SyncTrackerTable).
|
||||||
|
Fields("last_sync_time").
|
||||||
|
Where("platform_code", platformCode).
|
||||||
|
Where("interface_code", interfaceCode).
|
||||||
|
Scan(&t)
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSyncStatus(ctx context.Context, platformCode, interfaceCode string) string {
|
||||||
|
var s string
|
||||||
|
gfdb.DB(ctx).Model(ctx, consts.SyncTrackerTable).
|
||||||
|
Fields("sync_status").
|
||||||
|
Where("platform_code", platformCode).
|
||||||
|
Where("interface_code", interfaceCode).
|
||||||
|
Scan(&s)
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func markSyncRunning(ctx context.Context, platformCode, interfaceCode string, lastSyncTime int64) {
|
||||||
|
gfdb.DB(ctx).Model(ctx, consts.SyncTrackerTable).
|
||||||
|
Data(map[string]interface{}{
|
||||||
|
"platform_code": platformCode,
|
||||||
|
"interface_code": interfaceCode,
|
||||||
|
"last_sync_time": lastSyncTime,
|
||||||
|
"sync_status": "running",
|
||||||
|
}).
|
||||||
|
OnConflict("platform_code", "interface_code").
|
||||||
|
Save()
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateSyncTime(ctx context.Context, platformCode, interfaceCode string, t int64) {
|
||||||
|
gfdb.DB(ctx).Model(ctx, consts.SyncTrackerTable).
|
||||||
|
Data(map[string]interface{}{
|
||||||
|
"platform_code": platformCode,
|
||||||
|
"interface_code": interfaceCode,
|
||||||
|
"last_sync_time": t,
|
||||||
|
"last_sync_at": time.Now(),
|
||||||
|
"sync_status": "success",
|
||||||
|
}).
|
||||||
|
OnConflict("platform_code", "interface_code").
|
||||||
|
Save()
|
||||||
|
}
|
||||||
|
|
||||||
|
func recordFailure(ctx context.Context, platformCode, interfaceCode, errMsg string) {
|
||||||
|
dao.SyncTaskLog.Create(ctx, &taskDto.CreateSyncTaskLogReq{
|
||||||
|
TaskID: fmt.Sprintf("%s_%s_%d", platformCode, interfaceCode, time.Now().UnixNano()),
|
||||||
|
TaskType: fmt.Sprintf("%s_%s", platformCode, interfaceCode),
|
||||||
|
PlatformCode: platformCode,
|
||||||
|
InterfaceCode: interfaceCode,
|
||||||
|
Status: "failed",
|
||||||
|
MaxRetry: 3,
|
||||||
|
RequestParams: map[string]interface{}{
|
||||||
|
"platform_code": platformCode,
|
||||||
|
"interface_code": interfaceCode,
|
||||||
|
"error": errMsg,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// findInterfaceByURL 在所有接口中查找匹配 URL 的接口
|
||||||
|
func findInterfaceByURL(ifaces []entity.ApiInterface, url string) *entity.ApiInterface {
|
||||||
|
for i := range ifaces {
|
||||||
|
if ifaces[i].Url == url {
|
||||||
|
return &ifaces[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetSyncPageSize 获取分页大小(默认100)
|
||||||
|
func GetSyncPageSize(ctx context.Context) int {
|
||||||
|
ps := g.Cfg().MustGet(ctx, "sync.page_size", 100).Int()
|
||||||
|
if ps < 1 || ps > 100 {
|
||||||
|
return 100
|
||||||
|
}
|
||||||
|
return ps
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSyncConcurrency 获取并发数(默认5)
|
||||||
|
func GetSyncConcurrency(ctx context.Context) int {
|
||||||
|
c := g.Cfg().MustGet(ctx, "sync.concurrency", 5).Int()
|
||||||
|
if c < 1 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSyncInterval 获取同步间隔(分钟,默认60)
|
||||||
|
func GetSyncInterval(ctx context.Context) int {
|
||||||
|
m := g.Cfg().MustGet(ctx, "sync.sync_interval_minutes", 60).Int()
|
||||||
|
if m < 5 {
|
||||||
|
return 60
|
||||||
|
}
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRetryCount 获取重试次数(默认3)
|
||||||
|
func GetRetryCount(ctx context.Context) int {
|
||||||
|
r := g.Cfg().MustGet(ctx, "sync.retry_count", 3).Int()
|
||||||
|
if r < 0 {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
dao "dataengine/dao/dict"
|
||||||
|
dto "dataengine/model/dto/dict"
|
||||||
|
entity "dataengine/model/entity/dict"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PlatformConfig 运行时平台配置
|
||||||
|
type PlatformConfig struct {
|
||||||
|
*entity.DatasourcePlatform
|
||||||
|
AccessToken string
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetApiUrl 拼接完整 API URL
|
||||||
|
func (c *PlatformConfig) GetApiUrl(apiPath string) string {
|
||||||
|
if c.ApiBaseUrl == "" {
|
||||||
|
return apiPath
|
||||||
|
}
|
||||||
|
return c.ApiBaseUrl + apiPath
|
||||||
|
}
|
||||||
|
|
||||||
|
// PlatformManager 平台配置管理器
|
||||||
|
type PlatformManager struct{}
|
||||||
|
|
||||||
|
// GetPlatform 根据平台编码获取配置
|
||||||
|
func (m *PlatformManager) GetPlatform(ctx context.Context, platformCode string) (*PlatformConfig, error) {
|
||||||
|
platform, err := dao.DatasourcePlatform.GetByPlatformCode(ctx, platformCode)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("查询平台配置失败 [%s]: %w", platformCode, err)
|
||||||
|
}
|
||||||
|
if platform == nil {
|
||||||
|
return nil, fmt.Errorf("平台不存在 [%s]", platformCode)
|
||||||
|
}
|
||||||
|
if platform.Status != "ACTIVE" {
|
||||||
|
return nil, fmt.Errorf("平台 [%s] 未启用", platformCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg := &PlatformConfig{DatasourcePlatform: platform}
|
||||||
|
|
||||||
|
switch platform.AuthType {
|
||||||
|
case "TOKEN":
|
||||||
|
cfg.AccessToken = platform.Token
|
||||||
|
case "OAUTH2":
|
||||||
|
if platform.Token != "" {
|
||||||
|
cfg.AccessToken = platform.Token
|
||||||
|
}
|
||||||
|
case "API_KEY":
|
||||||
|
cfg.AccessToken = platform.ApiKey
|
||||||
|
default:
|
||||||
|
logrus.Warnf("平台 %s 认证类型 %s 未处理", platformCode, platform.AuthType)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cfg, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetInterfaces 获取平台下的活跃接口列表
|
||||||
|
func (m *PlatformManager) GetInterfaces(ctx context.Context, platformId int64) ([]entity.ApiInterface, error) {
|
||||||
|
interfaces, _, err := dao.ApiInterface.List(ctx, &dto.ListApiInterfaceReq{
|
||||||
|
PlatformId: platformId,
|
||||||
|
Status: "active",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return interfaces, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetInterfaceByCode 根据编码获取接口定义
|
||||||
|
func (m *PlatformManager) GetInterfaceByCode(ctx context.Context, platformId int64, code string) (*entity.ApiInterface, error) {
|
||||||
|
all, _, err := dao.ApiInterface.List(ctx, &dto.ListApiInterfaceReq{
|
||||||
|
PlatformId: platformId,
|
||||||
|
Code: code,
|
||||||
|
Status: "active",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if len(all) == 0 {
|
||||||
|
return nil, fmt.Errorf("未找到接口 [code=%s]", code)
|
||||||
|
}
|
||||||
|
return &all[0], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPlatformWithInterfaces 获取平台及所有接口
|
||||||
|
func (m *PlatformManager) GetPlatformWithInterfaces(ctx context.Context, platformCode string) (*PlatformConfig, []entity.ApiInterface, error) {
|
||||||
|
cfg, err := m.GetPlatform(ctx, platformCode)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
interfaces, err := m.GetInterfaces(ctx, cfg.ID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
return cfg, interfaces, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// FindInterfaceUrl 在接口列表中查找指定编码的 URL
|
||||||
|
func FindInterfaceUrl(ifaces []entity.ApiInterface, code string) string {
|
||||||
|
for _, iface := range ifaces {
|
||||||
|
if iface.Code == code {
|
||||||
|
return iface.Url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
dao "dataengine/dao/dict"
|
||||||
|
dto "dataengine/model/dto/dict"
|
||||||
|
|
||||||
|
"gitea.com/red-future/common/beans"
|
||||||
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StartAutoSync 启动自动同步(独立 goroutine,启动后自动循环执行)
|
||||||
|
func StartAutoSync(ctx context.Context) {
|
||||||
|
interval := GetSyncInterval(ctx)
|
||||||
|
logrus.Infof("自动同步调度器启动,间隔: %d 分钟", interval)
|
||||||
|
|
||||||
|
// 首次执行:根据 sync_tracker 是否有记录自动判断全量/增量
|
||||||
|
// 无记录 → 全量,有记录 → 增量
|
||||||
|
runAutoSync(ctx)
|
||||||
|
|
||||||
|
ticker := time.NewTicker(time.Duration(interval) * time.Minute)
|
||||||
|
defer ticker.Stop()
|
||||||
|
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-ticker.C:
|
||||||
|
runAutoSync(ctx)
|
||||||
|
case <-ctx.Done():
|
||||||
|
logrus.Info("自动同步调度器已停止")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func runAutoSync(ctx context.Context) {
|
||||||
|
logrus.Info("=== 开始自动同步 ===")
|
||||||
|
|
||||||
|
// 注入用户上下文(ORM 框架需要用于租户隔离)
|
||||||
|
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin", TenantId: 1})
|
||||||
|
|
||||||
|
// 查询所有 ACTIVE 平台
|
||||||
|
platforms, _, err := dao.DatasourcePlatform.List(ctx, &dto.ListDatasourcePlatformReq{
|
||||||
|
Status: "ACTIVE",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("查询平台列表失败: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, p := range platforms {
|
||||||
|
// 查询该平台下有 table_definition 的接口
|
||||||
|
interfaces, _, err := dao.ApiInterface.List(ctx, &dto.ListApiInterfaceReq{
|
||||||
|
PlatformId: p.ID,
|
||||||
|
Status: "active",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("查询接口列表失败 [platform=%s]: %v", p.PlatformCode, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, iface := range interfaces {
|
||||||
|
if iface.TableDefinition == nil || len(iface.TableDefinition) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Infof("自动同步: %s / %s", p.PlatformCode, iface.Code)
|
||||||
|
// isFullSync=false 表示去查 sync_tracker:
|
||||||
|
// 有记录 → 增量,无记录 → lastSyncTime=0 → 全量
|
||||||
|
_, err := SyncByConfig(ctx, p.PlatformCode, iface.Code, false)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("自动同步失败 [%s/%s]: %v", p.PlatformCode, iface.Code, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.Info("=== 自动同步完成 ===")
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitAndStartAutoSync 在 main 中调用:初始化配置后启动自动同步和补偿
|
||||||
|
func InitAndStartAutoSync(ctx context.Context) {
|
||||||
|
// 读取配置中的同步开关
|
||||||
|
enabled := g.Cfg().MustGet(ctx, "sync.auto_sync_enabled", true).Bool()
|
||||||
|
if enabled {
|
||||||
|
go StartAutoSync(ctx)
|
||||||
|
} else {
|
||||||
|
logrus.Info("自动同步已关闭")
|
||||||
|
}
|
||||||
|
// 补偿调度器独立启动,不受 auto_sync_enabled 控制
|
||||||
|
go StartCompensation(ctx)
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user