优化proto字段名称
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
type getExpParams struct {
|
||||
saasHttp *saashttp.SaasClient
|
||||
expIDs []uint32
|
||||
bucketIDs []uint32
|
||||
beginDay uint64
|
||||
endDay uint64
|
||||
target string
|
||||
@@ -31,7 +31,7 @@ func RunExpGet(args ...string) error {
|
||||
cfgFile := paramConfig(fs)
|
||||
beginDay := paramWhereBeginDay(fs)
|
||||
endDay := paramWhereEndDay(fs)
|
||||
expIDs := paramWhereExpIds(fs)
|
||||
bucketIDs := paramWhereBucketIds(fs)
|
||||
target := paramWhereTarget(fs)
|
||||
advertiserIDs := paramWhereAdvertiserId(fs)
|
||||
groupBy := paramGroupBy(fs)
|
||||
@@ -48,9 +48,9 @@ func RunExpGet(args ...string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
expIDsNumSlice := []uint32{}
|
||||
if *expIDs != "" {
|
||||
expIDsSlice := strings.Split(*expIDs, ",")
|
||||
bucketIDsNumSlice := []uint32{}
|
||||
if *bucketIDs != "" {
|
||||
expIDsSlice := strings.Split(*bucketIDs, ",")
|
||||
for _, id := range expIDsSlice {
|
||||
idNum, err := strconv.ParseUint(id, 10, 32)
|
||||
if err != nil {
|
||||
@@ -62,7 +62,7 @@ func RunExpGet(args ...string) error {
|
||||
fmt.Fprintln(os.Stderr, "expid range error")
|
||||
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),
|
||||
Auth: &cfg.Auth,
|
||||
},
|
||||
expIDs: expIDsNumSlice,
|
||||
bucketIDs: bucketIDsNumSlice,
|
||||
beginDay: *beginDay,
|
||||
endDay: *endDay,
|
||||
target: *target,
|
||||
@@ -149,7 +149,7 @@ func doExpGet(getExpParams getExpParams) error {
|
||||
saasReq := &saasapi.SaasReq{
|
||||
Cmd: &saasapi.SaasReq_ExpGet{
|
||||
ExpGet: &saasapi.ExpGet{
|
||||
WhereExpId: getExpParams.expIDs,
|
||||
WhereBucketId: getExpParams.bucketIDs,
|
||||
WhereBeginDay: getExpParams.beginDay,
|
||||
WhereEndDay: getExpParams.endDay,
|
||||
WhereTarget: getExpParams.target,
|
||||
|
||||
Reference in New Issue
Block a user