Compare commits
No commits in common. "c53870b08a26967f2e85a8f37f19e1443b20711f" and "0fbd6d25b9eee647cd904ceee700627389be7ad7" have entirely different histories.
c53870b08a
...
0fbd6d25b9
@ -123,16 +123,14 @@ func TestGetGameServerCountData(t *testing.T) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
req := CreateGetGameServerCountData(GetGameServerCountDataParam{
|
||||
GameSign: "cs140",
|
||||
ServerSign: 8678,
|
||||
ServerId: 1944,
|
||||
RoleDates: "2025-10-15",
|
||||
})
|
||||
req := CreateGetGameServerCountData(
|
||||
"2024-07-30,2024-07-23",
|
||||
"1111,1234",
|
||||
)
|
||||
resp, err := client.GetGameServerCountData(req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Printf("%+v", resp.Data)
|
||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ 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"
|
||||
)
|
||||
@ -26,7 +25,7 @@ type GetGameServerCountDataResp struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data GetGameServerCountData `json:"data"`
|
||||
Data []GetGameServerCountData `json:"data"`
|
||||
}
|
||||
|
||||
type GetGameServerCountData struct {
|
||||
@ -37,13 +36,6 @@ type GetGameServerCountData struct {
|
||||
TotalPayRoleNum int64 `json:"total_pay_role_num"`
|
||||
}
|
||||
|
||||
type GetGameServerCountDataParam struct {
|
||||
GameSign string `json:"game_sign"`
|
||||
ServerSign int64 `json:"server_sign"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
RoleDates string `json:"role_dates"`
|
||||
}
|
||||
|
||||
// CreateSyncGameServerListReq 创建同步开服数据请求
|
||||
// opt: 更新 insertOrUpdate, 删除 del
|
||||
//
|
||||
@ -88,7 +80,7 @@ func CreateSyncGameServerListResp() *SyncGameServerListResp {
|
||||
}
|
||||
}
|
||||
|
||||
func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameServerCountDataReq {
|
||||
func CreateGetGameServerCountData(roleDates string, serverIds string) *GetGameServerCountDataReq {
|
||||
req := &GetGameServerCountDataReq{
|
||||
&requests.RpcRequest{},
|
||||
}
|
||||
@ -96,10 +88,8 @@ func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameSer
|
||||
req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData")
|
||||
req.Method = requests.POST
|
||||
req.FormParams = make(map[string]string)
|
||||
req.FormParams["role_dates"] = param.RoleDates
|
||||
req.FormParams["server_id"] = fmt.Sprintf("%v", param.ServerId)
|
||||
req.FormParams["server_sign"] = fmt.Sprintf("%v", param.ServerSign)
|
||||
req.FormParams["game_sign"] = param.GameSign
|
||||
req.FormParams["role_dates"] = roleDates
|
||||
req.FormParams["server_ids"] = serverIds
|
||||
|
||||
return req
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user