获取区服统计数据优化
This commit is contained in:
parent
d06b43fea8
commit
56ab109c90
@ -125,14 +125,14 @@ func TestGetGameServerCountData(t *testing.T) {
|
||||
}
|
||||
req := CreateGetGameServerCountData(GetGameServerCountDataParam{
|
||||
GameSign: "cs140",
|
||||
ServerSign: "8678",
|
||||
ServerId: "1944",
|
||||
RoleDates: "2025-10-15,2025-10-16",
|
||||
ServerSign: 8678,
|
||||
ServerId: 1944,
|
||||
RoleDates: "2025-10-15",
|
||||
})
|
||||
resp, err := client.GetGameServerCountData(req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
||||
fmt.Printf("%+v", resp.Data)
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package stat
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||
)
|
||||
@ -23,9 +24,9 @@ type GetGameServerCountDataReq struct {
|
||||
|
||||
type GetGameServerCountDataResp struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data []GetGameServerCountData `json:"data"`
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data GetGameServerCountData `json:"data"`
|
||||
}
|
||||
|
||||
type GetGameServerCountData struct {
|
||||
@ -96,8 +97,8 @@ func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameSer
|
||||
req.Method = requests.POST
|
||||
req.FormParams = make(map[string]string)
|
||||
req.FormParams["role_dates"] = param.RoleDates
|
||||
req.FormParams["server_id"] = param.ServerId
|
||||
req.FormParams["server_sign"] = param.ServerSign
|
||||
req.FormParams["server_id"] = fmt.Sprintf("%v", param.ServerId)
|
||||
req.FormParams["server_sign"] = fmt.Sprintf("%v", param.ServerSign)
|
||||
req.FormParams["game_sign"] = param.GameSign
|
||||
|
||||
return req
|
||||
|
Loading…
Reference in New Issue
Block a user