Skip to content

Commit

Permalink
Merge pull request #1 from yoki123/main
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa authored Jul 15, 2021
2 parents 5472238 + 2c673ba commit 8ffe0b8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions model/advertiser/fund_daily_flows_request.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package advertiser

import (
"fmt"
"net/url"
"strconv"
)
Expand All @@ -19,18 +20,18 @@ func (r FundDailyFlowsRequest) Url() string {

func (r FundDailyFlowsRequest) Encode() string {
values := url.Values{}
values.Set("advertiser_id", strconv.FormatInt(r.AdvertiserId, 10))
values.Set("advertiser_id", strconv.FormatInt(r.AdvertiserID, 10))
if r.StartDate != "" {
values.Set("start_date", r.StartDate)
}
if r.EndDate != "" {
values.Set("end_date", r.EndDate)
}
if r.Page > 0 {
values.Set("page", r.Page)
values.Set("page", fmt.Sprint(r.Page))
}
if r.PageSize > 0 {
values.Set("page_size", r.PageSize)
values.Set("page_size", fmt.Sprint(r.PageSize))
}
return values.Encode()
}
7 changes: 5 additions & 2 deletions model/advertiser/fund_get_request.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package advertiser

import "net/url"
import (
"fmt"
"net/url"
)

type FundGetRequest struct {
AdvertiserID int64 `json:"advertiser_id,omitempty"` // 广告主ID
Expand All @@ -12,6 +15,6 @@ func (r FundGetRequest) Url() string {

func (r FundGetRequest) Encode() string {
values := url.Values{}
values.Set("advertiser_id", r.AdvertiserID)
values.Set("advertiser_id", fmt.Sprint(r.AdvertiserID))
return values.Encode()
}
2 changes: 1 addition & 1 deletion model/oauth/refresh_token_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type RefreshTokenRequest struct {
RefreshToken string `json:"refresh_token,omitempty"` // 最近一次快手返回的refresh_token
}

func (r RefreshTokenRequest) Url() {
func (r RefreshTokenRequest) Url() string {
return "oauth2/authorize/refresh_token"
}

Expand Down
4 changes: 2 additions & 2 deletions model/report/merchant_detail_report_response.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package report

type MerchantDetailReportResponse struct {
TotalCount int `json:"total_count,omitempty"` // 数据的总行数
Details []MerchatStat `json:"details,omitempty"` // 数据明细信息
TotalCount int `json:"total_count,omitempty"` // 数据的总行数
Details []MerchantStat `json:"details,omitempty"` // 数据明细信息
}

0 comments on commit 8ffe0b8

Please sign in to comment.