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