优化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,
|
||||
|
||||
@@ -26,6 +26,7 @@ Commands:
|
||||
target Target commands
|
||||
bind Bind commands
|
||||
script Script commands
|
||||
exp Exp commands
|
||||
|
||||
daemon Run in daemon mode
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ func paramWhereEndDay(fs *flag.FlagSet) *uint64 {
|
||||
return fs.Uint64("endday", 0, "End day")
|
||||
}
|
||||
|
||||
func paramWhereExpIds(fs *flag.FlagSet) *string {
|
||||
return fs.String("expids", "", "Exp IDs. Use commas to separate multiple IDs. empty is all")
|
||||
func paramWhereBucketIds(fs *flag.FlagSet) *string {
|
||||
return fs.String("bucketids", "", "Bucket IDs. Use commas to separate multiple IDs. empty is all")
|
||||
}
|
||||
|
||||
func paramWhereTarget(fs *flag.FlagSet) *string {
|
||||
|
||||
Reference in New Issue
Block a user