优化proto字段名称

This commit is contained in:
2025-10-16 12:44:37 +08:00
parent df62e4fae6
commit 0230085a70
6 changed files with 48 additions and 161 deletions

View File

@@ -2100,11 +2100,11 @@ type ExpGet struct {
ExtFields []string `protobuf:"bytes,1,rep,name=ext_fields,json=extFields,proto3" json:"ext_fields,omitempty"` // 扩展字段(除基础字段必然输出外,其余字段需在这里填写,也可以使用*输出全部扩展字段) ExtFields []string `protobuf:"bytes,1,rep,name=ext_fields,json=extFields,proto3" json:"ext_fields,omitempty"` // 扩展字段(除基础字段必然输出外,其余字段需在这里填写,也可以使用*输出全部扩展字段)
WhereBeginDay uint64 `protobuf:"varint,10,opt,name=where_begin_day,json=whereBeginDay,proto3" json:"where_begin_day,omitempty"` // 起始日期 WhereBeginDay uint64 `protobuf:"varint,10,opt,name=where_begin_day,json=whereBeginDay,proto3" json:"where_begin_day,omitempty"` // 起始日期
WhereEndDay uint64 `protobuf:"varint,11,opt,name=where_end_day,json=whereEndDay,proto3" json:"where_end_day,omitempty"` // 结束日期 WhereEndDay uint64 `protobuf:"varint,11,opt,name=where_end_day,json=whereEndDay,proto3" json:"where_end_day,omitempty"` // 结束日期
WhereExpId []uint32 `protobuf:"varint,12,rep,packed,name=where_exp_id,json=whereExpId,proto3" json:"where_exp_id,omitempty"` // 实验ID(1-10) WhereBucketId []uint32 `protobuf:"varint,12,rep,packed,name=where_bucket_id,json=whereBucketId,proto3" json:"where_bucket_id,omitempty"` // 实验ID(1-10)
WhereTarget string `protobuf:"bytes,13,opt,name=where_target,json=whereTarget,proto3" json:"where_target,omitempty"` // 策略ID WhereTarget string `protobuf:"bytes,13,opt,name=where_target,json=whereTarget,proto3" json:"where_target,omitempty"` // 策略ID
WhereAdvertiserId []uint64 `protobuf:"varint,14,rep,packed,name=where_advertiser_id,json=whereAdvertiserId,proto3" json:"where_advertiser_id,omitempty"` // 广告主ID WhereAdvertiserId []uint64 `protobuf:"varint,14,rep,packed,name=where_advertiser_id,json=whereAdvertiserId,proto3" json:"where_advertiser_id,omitempty"` // 广告主ID
GroupBy []string `protobuf:"bytes,20,rep,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"` // 当前支持广告主ID(advertiser_id) GroupBy []string `protobuf:"bytes,20,rep,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"` // 当前支持广告主ID(advertiser_id)
TotalFlag uint32 `protobuf:"varint,30,opt,name=TotalFlag,proto3" json:"TotalFlag,omitempty"` // 是否汇总 TotalFlag uint32 `protobuf:"varint,30,opt,name=total_flag,json=totalFlag,proto3" json:"total_flag,omitempty"` // 是否汇总0=不汇总1=汇总
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -2160,9 +2160,9 @@ func (x *ExpGet) GetWhereEndDay() uint64 {
return 0 return 0
} }
func (x *ExpGet) GetWhereExpId() []uint32 { func (x *ExpGet) GetWhereBucketId() []uint32 {
if x != nil { if x != nil {
return x.WhereExpId return x.WhereBucketId
} }
return nil return nil
} }
@@ -3416,7 +3416,7 @@ func (x *ExpBucket) GetPercent() uint32 {
// ExpGetRes 实验报表返回 // ExpGetRes 实验报表返回
type ExpGetRes struct { type ExpGetRes struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Expdata []*ExpData `protobuf:"bytes,1,rep,name=expdata,proto3" json:"expdata,omitempty"` // 实验数据 ExpData []*ExpData `protobuf:"bytes,1,rep,name=exp_data,json=expData,proto3" json:"exp_data,omitempty"` // 实验数据
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -3451,9 +3451,9 @@ func (*ExpGetRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{42} return file_cmd_proto_rawDescGZIP(), []int{42}
} }
func (x *ExpGetRes) GetExpdata() []*ExpData { func (x *ExpGetRes) GetExpData() []*ExpData {
if x != nil { if x != nil {
return x.Expdata return x.ExpData
} }
return nil return nil
} }
@@ -3461,7 +3461,7 @@ func (x *ExpGetRes) GetExpdata() []*ExpData {
type ExpData struct { type ExpData struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Time uint64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` // 日期 Time uint64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` // 日期
ExpId uint32 `protobuf:"varint,2,opt,name=ExpId,proto3" json:"ExpId,omitempty"` // 实验ID BucketId uint32 `protobuf:"varint,2,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` // 分桶ID
BaseFields *ExpBaseFields `protobuf:"bytes,3,opt,name=base_fields,json=baseFields,proto3" json:"base_fields,omitempty"` // 基础字段 BaseFields *ExpBaseFields `protobuf:"bytes,3,opt,name=base_fields,json=baseFields,proto3" json:"base_fields,omitempty"` // 基础字段
ExtFields map[string]float64 `protobuf:"bytes,4,rep,name=ext_fields,json=extFields,proto3" json:"ext_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` // 扩展字段 ExtFields map[string]float64 `protobuf:"bytes,4,rep,name=ext_fields,json=extFields,proto3" json:"ext_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` // 扩展字段
Group map[string]uint64 `protobuf:"bytes,5,rep,name=group,proto3" json:"group,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // 分组 Group map[string]uint64 `protobuf:"bytes,5,rep,name=group,proto3" json:"group,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // 分组
@@ -3506,9 +3506,9 @@ func (x *ExpData) GetTime() uint64 {
return 0 return 0
} }
func (x *ExpData) GetExpId() uint32 { func (x *ExpData) GetBucketId() uint32 {
if x != nil { if x != nil {
return x.ExpId return x.BucketId
} }
return 0 return 0
} }
@@ -3539,8 +3539,8 @@ type ExpBaseFields struct {
Cost float64 `protobuf:"fixed64,1,opt,name=cost,proto3" json:"cost,omitempty"` // 花费 Cost float64 `protobuf:"fixed64,1,opt,name=cost,proto3" json:"cost,omitempty"` // 花费
Exposure int64 `protobuf:"varint,2,opt,name=exposure,proto3" json:"exposure,omitempty"` // 曝光量 Exposure int64 `protobuf:"varint,2,opt,name=exposure,proto3" json:"exposure,omitempty"` // 曝光量
Click int64 `protobuf:"varint,3,opt,name=click,proto3" json:"click,omitempty"` // 点击量 Click int64 `protobuf:"varint,3,opt,name=click,proto3" json:"click,omitempty"` // 点击量
Cpm float64 `protobuf:"fixed64,4,opt,name=cpm,proto3" json:"cpm,omitempty"` // 次曝光成本 Cpm float64 `protobuf:"fixed64,4,opt,name=cpm,proto3" json:"cpm,omitempty"` // 次曝光价格
Cpc float64 `protobuf:"fixed64,5,opt,name=cpc,proto3" json:"cpc,omitempty"` // 单次点击成本 Cpc float64 `protobuf:"fixed64,5,opt,name=cpc,proto3" json:"cpc,omitempty"` // 单次点击价格
Cpa float64 `protobuf:"fixed64,6,opt,name=cpa,proto3" json:"cpa,omitempty"` // 单次转化成本 Cpa float64 `protobuf:"fixed64,6,opt,name=cpa,proto3" json:"cpa,omitempty"` // 单次转化成本
Ctr float64 `protobuf:"fixed64,7,opt,name=ctr,proto3" json:"ctr,omitempty"` // 点击率 Ctr float64 `protobuf:"fixed64,7,opt,name=ctr,proto3" json:"ctr,omitempty"` // 点击率
Cvr float64 `protobuf:"fixed64,8,opt,name=cvr,proto3" json:"cvr,omitempty"` // 浅层转化率 Cvr float64 `protobuf:"fixed64,8,opt,name=cvr,proto3" json:"cvr,omitempty"` // 浅层转化率
@@ -3787,19 +3787,19 @@ const file_cmd_proto_rawDesc = "" +
"\rserver_openid\x18\x04 \x01(\tR\fserverOpenid\x12\x1b\n" + "\rserver_openid\x18\x04 \x01(\tR\fserverOpenid\x12\x1b\n" +
"\x02os\x18\x05 \x01(\x0e2\v.saasapi.OSR\x02os\"\x0e\n" + "\x02os\x18\x05 \x01(\x0e2\v.saasapi.OSR\x02os\"\x0e\n" +
"\fScriptUpdate\"\t\n" + "\fScriptUpdate\"\t\n" +
"\aExpList\"\xa1\x02\n" + "\aExpList\"\xa8\x02\n" +
"\x06ExpGet\x12\x1d\n" + "\x06ExpGet\x12\x1d\n" +
"\n" + "\n" +
"ext_fields\x18\x01 \x03(\tR\textFields\x12&\n" + "ext_fields\x18\x01 \x03(\tR\textFields\x12&\n" +
"\x0fwhere_begin_day\x18\n" + "\x0fwhere_begin_day\x18\n" +
" \x01(\x04R\rwhereBeginDay\x12\"\n" + " \x01(\x04R\rwhereBeginDay\x12\"\n" +
"\rwhere_end_day\x18\v \x01(\x04R\vwhereEndDay\x12 \n" + "\rwhere_end_day\x18\v \x01(\x04R\vwhereEndDay\x12&\n" +
"\fwhere_exp_id\x18\f \x03(\rR\n" + "\x0fwhere_bucket_id\x18\f \x03(\rR\rwhereBucketId\x12!\n" +
"whereExpId\x12!\n" +
"\fwhere_target\x18\r \x01(\tR\vwhereTarget\x12.\n" + "\fwhere_target\x18\r \x01(\tR\vwhereTarget\x12.\n" +
"\x13where_advertiser_id\x18\x0e \x03(\x04R\x11whereAdvertiserId\x12\x19\n" + "\x13where_advertiser_id\x18\x0e \x03(\x04R\x11whereAdvertiserId\x12\x19\n" +
"\bgroup_by\x18\x14 \x03(\tR\agroupBy\x12\x1c\n" + "\bgroup_by\x18\x14 \x03(\tR\agroupBy\x12\x1d\n" +
"\tTotalFlag\x18\x1e \x01(\rR\tTotalFlag\"\xa9\a\n" + "\n" +
"total_flag\x18\x1e \x01(\rR\ttotalFlag\"\xa9\a\n" +
"\aSaasRes\x12&\n" + "\aSaasRes\x12&\n" +
"\x04code\x18\x01 \x01(\x0e2\x12.saasapi.ErrorCodeR\x04code\x12\x16\n" + "\x04code\x18\x01 \x01(\x0e2\x12.saasapi.ErrorCodeR\x04code\x12\x16\n" +
"\x06status\x18\x02 \x01(\tR\x06status\x12-\n" + "\x06status\x18\x02 \x01(\tR\x06status\x12-\n" +
@@ -3888,12 +3888,12 @@ const file_cmd_proto_rawDesc = "" +
"\tExpBucket\x12\x1b\n" + "\tExpBucket\x12\x1b\n" +
"\tbucket_id\x18\x01 \x01(\rR\bbucketId\x12\x1a\n" + "\tbucket_id\x18\x01 \x01(\rR\bbucketId\x12\x1a\n" +
"\tpt_exp_id\x18\x02 \x01(\rR\aptExpId\x12\x18\n" + "\tpt_exp_id\x18\x02 \x01(\rR\aptExpId\x12\x18\n" +
"\apercent\x18\x03 \x01(\rR\apercent\"7\n" + "\apercent\x18\x03 \x01(\rR\apercent\"8\n" +
"\tExpGetRes\x12*\n" + "\tExpGetRes\x12+\n" +
"\aexpdata\x18\x01 \x03(\v2\x10.saasapi.ExpDataR\aexpdata\"\xd7\x02\n" + "\bexp_data\x18\x01 \x03(\v2\x10.saasapi.ExpDataR\aexpData\"\xde\x02\n" +
"\aExpData\x12\x12\n" + "\aExpData\x12\x12\n" +
"\x04time\x18\x01 \x01(\x04R\x04time\x12\x14\n" + "\x04time\x18\x01 \x01(\x04R\x04time\x12\x1b\n" +
"\x05ExpId\x18\x02 \x01(\rR\x05ExpId\x127\n" + "\tbucket_id\x18\x02 \x01(\rR\bbucketId\x127\n" +
"\vbase_fields\x18\x03 \x01(\v2\x16.saasapi.ExpBaseFieldsR\n" + "\vbase_fields\x18\x03 \x01(\v2\x16.saasapi.ExpBaseFieldsR\n" +
"baseFields\x12>\n" + "baseFields\x12>\n" +
"\n" + "\n" +
@@ -4118,7 +4118,7 @@ var file_cmd_proto_depIdxs = []int32{
44, // 57: saasapi.BindSetRes.errors:type_name -> saasapi.BindError 44, // 57: saasapi.BindSetRes.errors:type_name -> saasapi.BindError
44, // 58: saasapi.BindDeleteRes.errors:type_name -> saasapi.BindError 44, // 58: saasapi.BindDeleteRes.errors:type_name -> saasapi.BindError
48, // 59: saasapi.ExpListRes.buckets:type_name -> saasapi.ExpBucket 48, // 59: saasapi.ExpListRes.buckets:type_name -> saasapi.ExpBucket
50, // 60: saasapi.ExpGetRes.expdata:type_name -> saasapi.ExpData 50, // 60: saasapi.ExpGetRes.exp_data:type_name -> saasapi.ExpData
51, // 61: saasapi.ExpData.base_fields:type_name -> saasapi.ExpBaseFields 51, // 61: saasapi.ExpData.base_fields:type_name -> saasapi.ExpBaseFields
53, // 62: saasapi.ExpData.ext_fields:type_name -> saasapi.ExpData.ExtFieldsEntry 53, // 62: saasapi.ExpData.ext_fields:type_name -> saasapi.ExpData.ExtFieldsEntry
54, // 63: saasapi.ExpData.group:type_name -> saasapi.ExpData.GroupEntry 54, // 63: saasapi.ExpData.group:type_name -> saasapi.ExpData.GroupEntry

136
cmd.proto
View File

@@ -75,7 +75,6 @@ message Bytes {
message Uint32s { message Uint32s {
repeated uint32 uint32s = 1; // 写入的uint32 repeated uint32 uint32s = 1; // 写入的uint32
uint64 index_1 = 2; // 写入uint32的索引值(0..7) 最多 8 个 uint64 index_1 = 2; // 写入uint32的索引值(0..7) 最多 8 个
//uint64 index_2 = 3; // 写入uint32的索引值(当前不支持)
} }
// FlagsWithExpire 写入标志位区域 // FlagsWithExpire 写入标志位区域
@@ -199,11 +198,11 @@ message ExpGet {
repeated string ext_fields = 1; // 扩展字段(除基础字段必然输出外,其余字段需在这里填写,也可以使用*输出全部扩展字段) repeated string ext_fields = 1; // 扩展字段(除基础字段必然输出外,其余字段需在这里填写,也可以使用*输出全部扩展字段)
uint64 where_begin_day = 10; // 起始日期 uint64 where_begin_day = 10; // 起始日期
uint64 where_end_day = 11; // 结束日期 uint64 where_end_day = 11; // 结束日期
repeated uint32 where_exp_id = 12; // 实验ID(1-10) repeated uint32 where_bucket_id = 12; // 实验ID(1-10)
string where_target = 13; // 策略ID string where_target = 13; // 策略ID
repeated uint64 where_advertiser_id = 14; // 广告主ID repeated uint64 where_advertiser_id = 14; // 广告主ID
repeated string group_by = 20; // 当前支持广告主ID(advertiser_id) repeated string group_by = 20; // 当前支持广告主ID(advertiser_id)
uint32 TotalFlag = 30; // 是否汇总 uint32 total_flag = 30; // 是否汇总0=不汇总1=汇总
} }
// SaasRes 命令返回 // SaasRes 命令返回
@@ -359,23 +358,23 @@ message ExpBucket {
// ExpGetRes 实验报表返回 // ExpGetRes 实验报表返回
message ExpGetRes { message ExpGetRes {
repeated ExpData expdata = 1; // 实验数据 repeated ExpData exp_data = 1; // 实验数据
} }
message ExpData { message ExpData {
uint64 time = 1; // 日期 uint64 time = 1; // 日期
uint32 ExpId = 2; // 实验ID uint32 bucket_id = 2; // 分桶ID
ExpBaseFields base_fields = 3; // 基础字段 ExpBaseFields base_fields = 3; // 基础字段
map <string, double> ext_fields = 4; // 扩展字段 map <string, double> ext_fields = 4; // 扩展字段
map<string, uint64> group = 5; // 分组 map<string, uint64> group = 5; // 分组
} }
message ExpBaseFields { message ExpBaseFields {
double cost = 1; // 花费 double cost = 1; // 花费
int64 exposure = 2; // 曝光量 int64 exposure = 2; // 曝光量
int64 click = 3; // 点击量 int64 click = 3; // 点击量
double cpm = 4; // 次曝光成本 double cpm = 4; // 次曝光价格
double cpc = 5; // 单次点击成本 double cpc = 5; // 单次点击价格
double cpa = 6; // 单次转化成本 double cpa = 6; // 单次转化成本
double ctr = 7; // 点击率 double ctr = 7; // 点击率
double cvr = 8; // 浅层转化率 double cvr = 8; // 浅层转化率
@@ -384,120 +383,6 @@ message ExpBaseFields {
int64 conversion_second = 11; // 深层转化量 int64 conversion_second = 11; // 深层转化量
} }
/*
type RtaResExpGetRecord struct {
Time int32 `json:"time"` // 时间
ExpId int64 `json:"exp_id"` // 实验ID
GroupInfo map[string]uint64 `json:"group_info"` // GroupBy信息
Cost float64 `json:"cost"` // 消耗(元)
Exposure int64 `json:"exposure"` // 曝光量(次)
Click int64 `json:"click"` // 点击量(次)
Cpm float64 `json:"cpm"` // 单次曝光成本处理时要转换成CPM方便理解这字段定义真的一言难尽
Cpc float64 `json:"cpc"` // 单次点击成本
Ctr float64 `json:"ctr"` // 点击率
Conversion int64 `json:"conversion"` // 浅层转化数
ConversionSecond int64 `json:"conversion_second"` // 深层转化数
Cvr float64 `json:"cvr"` // 浅层转化率
CvrSecond float64 `json:"cvr_second"` // 深层转化率
Og6 float64 `json:"og_6"` // 优化目标-关注
Og7 float64 `json:"og_7"` // 优化目标-点击
Og10 float64 `json:"og_10"` // 优化目标-跳转按钮点击
Og105 float64 `json:"og_105"` // 优化目标- 注册(App)
Og106 int64 `json:"og_106"` // 优化目标-次日留存
Og108 int64 `json:"og_108"` // 优化目标-完成购买数量
Og112 int64 `json:"og_112"` // 优化目标-快应用加桌面
Og114 int64 `json:"og_114"` // 优化目标-小游戏创角
Og115 int64 `json:"og_115"` // 优化目标-游戏授权
Og119 float64 `json:"og_119"` // 优化目标-授信
Og120 int64 `json:"og_120"` // 优化目标-提现
Og121 float64 `json:"og_121"` // 优化目标-广告变现
Og202 int64 `json:"og_202"` // 优化目标-商品收藏
Og204 float64 `json:"og_204"` // 优化目标-下单
Og205 float64 `json:"og_205"` // 优化目标-付费
Og301 float64 `json:"og_301"` // 优化目标-关键页面访问
Og302 int64 `json:"og_302"` // 优化目标-H5注册
Og307 int64 `json:"og_307"` // 优化目标-领券
Og315 int64 `json:"og_315"` // 优化目标-浏览量
Og316 int64 `json:"og_316"` // 优化目标-阅读文章
Og318 int64 `json:"og_318"` // 优化目标-预授信
Og403 int64 `json:"og_403"` // 优化目标-电话拨打
Og405 float64 `json:"og_405"` // 优化目标-表单预约
Og406 int64 `json:"og_406"` // 优化目标-完件
Og409 float64 `json:"og_409"` // 优化目标-有效线索
Og412 int64 `json:"og_412"` // 优化目标-加企微客户
Og413 int64 `json:"og_413"` // 优化目标-选课
Og418 int64 `json:"og_418"` // 优化目标-外链点击
Og419 int64 `json:"og_419"` // 优化目标-购券
Og421 int64 `json:"og_421"` // 优化目标-加群
Og501 int64 `json:"og_501"` // 优化目标-打开公众号
Og503 int64 `json:"og_503"` // 优化目标-关注后点击菜单栏
Og10000 int64 `json:"og_10000"` // 优化目标-综合线索收集
Og10004 int64 `json:"og_10004"` // 优化目标-首次购买会员
Og10006 int64 `json:"og_10006"` // 优化目标-微信流量预约
Og10007 int64 `json:"og_10007"` // 优化目标-首次下单
Og10008 int64 `json:"og_10008"` // 优化目标-点赞
Og10009 int64 `json:"og_10009"` // 优化目标-咨询留资
Og10601 int64 `json:"og_10601"` // 优化目标-次留
Og10801 float64 `json:"og_10801"` // 优化目标-首次付费
Bo6 int64 `json:"bo_6"` // 推广目标-公众号关注数
Bo7 int64 `json:"bo_7"` // 推广目标-公众号内下单人数
Bo23 int64 `json:"bo_23"` // 推广目标-关键页面访问数
Bo25 int64 `json:"bo_25"` // 推广目标-公众号注册数
Bo26 int64 `json:"bo_26"` // 推广目标-公众号发消息数
Bo41 int64 `json:"bo_41"` // 推广目标-公众号付费人数
ConversionCost101 float64 `json:"101_conversion_cost"` // 下单单价
Amount204 float64 `json:"204_amount"` // 下单金额
Roi204 float64 `json:"204_roi"` // 下单ROI
Roi204fd float64 `json:"204_roi_fd"` // 首日下单ROI(T+1更新)
Roi204tw float64 `json:"204_roi_tw"` // 3日下单ROI
Roi204ow float64 `json:"204_roi_ow"` // 7日下单ROI
Roi204td float64 `json:"204_roi_td"` // 15日下单ROI
Roi204om float64 `json:"204_roi_om"` // 30日下单ROI
OrderCost float64 `json:"order_cost"` // 下单成本
OrderCount int64 `json:"order_count"` // 下单数
Roi float64 `json:"roi"` // ROI
MdMgPurchaseUv int64 `json:"md_mg_purchase_uv"` // 小游戏首次付费人数
MdMgPurchaseVal1 int64 `json:"md_mg_purchase_val1"` // 小游戏首日付费金额(广告主回传)(分)
MdMgPurchaseVal int64 `json:"md_mg_purchase_val"` // 小游戏付费金额(分)
WeAppRegUv int64 `json:"weapp_reg_uv"` // 小游戏注册人数
ActiveCount int64 `json:"active_count"` // 激活数
InstallCount int64 `json:"install_count"` // 安装数
Count107 int64 `json:"107_count"` // 加入购物车数
AtCount402 int64 `json:"402_at_count"` // 开口数
SendGoodsCount int64 `json:"send_goods_count"` // 发货数(次)
Sign int64 `json:"sign"` // 签收数(次)
AtRate409405 float64 `json:"409_405_at_rate"` // 表单有效率
AtCost409 float64 `json:"409_at_cost"` // 有效销售线索成本
AtCount409 int64 `json:"409_at_count"` // 有效销售线索数
AtCost415 float64 `json:"415_at_cost"` // 试驾成本
AtCount415 int64 `json:"415_at_count"` // 试驾数
AtCost405 float64 `json:"405_at_cost"` // 表单预约成本(元)
AtCount405 int64 `json:"405_at_count"` // 表单预约数
AtCost108 float64 `json:"108_at_cost"` // 完成购买成本(元)
AtCount108 int64 `json:"108_at_count"` // 完成购买数
AogAction119 int64 `json:"119_aog_action"` // 授信数
AogAction406 int64 `json:"406_aog_action"` // 完件数
CvrClick119 float64 `json:"119_cvr_click"` // 点击授信率
CvrClick406 float64 `json:"406_cvr_click"` // 点击完件率
FinanceCreditPcvrAfterCaliBias float64 `json:"finance_credit_pcvr_after_cali_bias"` // pcvrbias金融pdcvr修正后授信(校正后)
FinanceCreditPcvrBeforeCaliBias float64 `json:"finance_credit_pcvr_before_cali_bias"` // pcvrbias金融pdcvr修正后授信(校正前)
FinanceApplyOrginalPcvrBias float64 `json:"finance_apply_original_pcvr_bias"` // 原始pcvrbias金融pdcvr完件)
IndustryFinanceApplyPcvrBias float64 `json:"industry_finance_apply_pcvr_bias"` // pcvrbias(金融pdcvr完件)
ActiveCost float64 `json:"active_cost"` // 激活成本
ActiveRegisterRate float64 `json:"active_register_rate"` // 激活注册率
MdActiPurVal float64 `json:"md_acti_pur_val"` // 付费金额(激活口径)
MdActiPurValFdRoi float64 `json:"md_acti_pur_val_fd_roi"` // 首日付费金额(激活口径)
MdPurVal3 float64 `json:"md_pur_val_3"` // 3日付费金额(激活口径)
MdPurVal3Roi float64 `json:"md_pur_val_3_roi"` // 3日ROI(激活口径)
MdPurVal7 float64 `json:"md_pur_val_7"` // 7日付费金额(激活口径)
MdPurVal7Roi float64 `json:"md_pur_val_7_roi"` // 7日ROI(激活口径)
MdPurVal14 float64 `json:"md_pur_val_14"` // 14日付费金额(激活口径)
MdPurVal14Roi float64 `json:"md_pur_val_14_roi"` // 14日ROI(激活口径)
MdPurVal30 float64 `json:"md_pur_val_30"` // 30日付费金额(激活口径)
MdPurVal30Roi float64 `json:"md_pur_val_30_roi"` // 30日ROI(激活口径)
}
*/
// ErrorCode 返回码 // ErrorCode 返回码
enum ErrorCode { enum ErrorCode {
SUCC = 0; // 成功 SUCC = 0; // 成功
@@ -563,5 +448,4 @@ enum MAX {
U8 = 64; U8 = 64;
U32 = 8; U32 = 8;
FLAG = 4; FLAG = 4;
} }

View File

@@ -16,7 +16,7 @@ import (
type getExpParams struct { type getExpParams struct {
saasHttp *saashttp.SaasClient saasHttp *saashttp.SaasClient
expIDs []uint32 bucketIDs []uint32
beginDay uint64 beginDay uint64
endDay uint64 endDay uint64
target string target string
@@ -31,7 +31,7 @@ func RunExpGet(args ...string) error {
cfgFile := paramConfig(fs) cfgFile := paramConfig(fs)
beginDay := paramWhereBeginDay(fs) beginDay := paramWhereBeginDay(fs)
endDay := paramWhereEndDay(fs) endDay := paramWhereEndDay(fs)
expIDs := paramWhereExpIds(fs) bucketIDs := paramWhereBucketIds(fs)
target := paramWhereTarget(fs) target := paramWhereTarget(fs)
advertiserIDs := paramWhereAdvertiserId(fs) advertiserIDs := paramWhereAdvertiserId(fs)
groupBy := paramGroupBy(fs) groupBy := paramGroupBy(fs)
@@ -48,9 +48,9 @@ func RunExpGet(args ...string) error {
return nil return nil
} }
expIDsNumSlice := []uint32{} bucketIDsNumSlice := []uint32{}
if *expIDs != "" { if *bucketIDs != "" {
expIDsSlice := strings.Split(*expIDs, ",") expIDsSlice := strings.Split(*bucketIDs, ",")
for _, id := range expIDsSlice { for _, id := range expIDsSlice {
idNum, err := strconv.ParseUint(id, 10, 32) idNum, err := strconv.ParseUint(id, 10, 32)
if err != nil { if err != nil {
@@ -62,7 +62,7 @@ func RunExpGet(args ...string) error {
fmt.Fprintln(os.Stderr, "expid range error") fmt.Fprintln(os.Stderr, "expid range error")
return nil return nil
} }
expIDsNumSlice = append(expIDsNumSlice, uint32(idNum)) bucketIDsNumSlice = append(bucketIDsNumSlice, uint32(idNum))
} }
} }
@@ -127,7 +127,7 @@ func RunExpGet(args ...string) error {
ApiUrls: saashttp.InitAPIUrl(&cfg.ApiUrls), ApiUrls: saashttp.InitAPIUrl(&cfg.ApiUrls),
Auth: &cfg.Auth, Auth: &cfg.Auth,
}, },
expIDs: expIDsNumSlice, bucketIDs: bucketIDsNumSlice,
beginDay: *beginDay, beginDay: *beginDay,
endDay: *endDay, endDay: *endDay,
target: *target, target: *target,
@@ -149,7 +149,7 @@ func doExpGet(getExpParams getExpParams) error {
saasReq := &saasapi.SaasReq{ saasReq := &saasapi.SaasReq{
Cmd: &saasapi.SaasReq_ExpGet{ Cmd: &saasapi.SaasReq_ExpGet{
ExpGet: &saasapi.ExpGet{ ExpGet: &saasapi.ExpGet{
WhereExpId: getExpParams.expIDs, WhereBucketId: getExpParams.bucketIDs,
WhereBeginDay: getExpParams.beginDay, WhereBeginDay: getExpParams.beginDay,
WhereEndDay: getExpParams.endDay, WhereEndDay: getExpParams.endDay,
WhereTarget: getExpParams.target, WhereTarget: getExpParams.target,

View File

@@ -26,6 +26,7 @@ Commands:
target Target commands target Target commands
bind Bind commands bind Bind commands
script Script commands script Script commands
exp Exp commands
daemon Run in daemon mode daemon Run in daemon mode

View File

@@ -125,8 +125,8 @@ func paramWhereEndDay(fs *flag.FlagSet) *uint64 {
return fs.Uint64("endday", 0, "End day") return fs.Uint64("endday", 0, "End day")
} }
func paramWhereExpIds(fs *flag.FlagSet) *string { func paramWhereBucketIds(fs *flag.FlagSet) *string {
return fs.String("expids", "", "Exp IDs. Use commas to separate multiple IDs. empty is all") return fs.String("bucketids", "", "Bucket IDs. Use commas to separate multiple IDs. empty is all")
} }
func paramWhereTarget(fs *flag.FlagSet) *string { func paramWhereTarget(fs *flag.FlagSet) *string {

View File

@@ -4,7 +4,9 @@ set -e
docker buildx build --platform linux/amd64 \ docker buildx build --platform linux/amd64 \
-t registry.algo.com.cn/public/saastool:latest \ -t registry.algo.com.cn/public/saastool:latest \
-t registry.algo.com.cn/public/saastool:20250924 \ -t registry.algo.com.cn/public/saastool:2025091016 \
-t rta-docker.pkg.coding.net/public/docker/rtacaller:latest \
-t rta-docker.pkg.coding.net/public/docker/rtacaller:20251016 \
-o type=registry \ -o type=registry \
-f saastool.Dockerfile \ -f saastool.Dockerfile \
../ ; ../ ;