获取区服统计数据优化
This commit is contained in:
parent
dc2b1e92d3
commit
a63ab8a8dc
@ -123,10 +123,12 @@ func TestGetGameServerCountData(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
req := CreateGetGameServerCountData(
|
req := CreateGetGameServerCountData(GetGameServerCountDataParam{
|
||||||
"2024-07-30,2024-07-23",
|
GameSign: "cs140",
|
||||||
"1111,1234",
|
ServerSign: "8678",
|
||||||
)
|
ServerId: "1944",
|
||||||
|
RoleDates: "2025-10-15,2025-10-16",
|
||||||
|
})
|
||||||
resp, err := client.GetGameServerCountData(req)
|
resp, err := client.GetGameServerCountData(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -36,6 +36,13 @@ type GetGameServerCountData struct {
|
|||||||
TotalPayRoleNum int64 `json:"total_pay_role_num"`
|
TotalPayRoleNum int64 `json:"total_pay_role_num"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetGameServerCountDataParam struct {
|
||||||
|
GameSign string `json:"game_sign"`
|
||||||
|
ServerSign string `json:"server_sign"`
|
||||||
|
ServerId string `json:"server_id"`
|
||||||
|
RoleDates string `json:"role_dates"`
|
||||||
|
}
|
||||||
|
|
||||||
// CreateSyncGameServerListReq 创建同步开服数据请求
|
// CreateSyncGameServerListReq 创建同步开服数据请求
|
||||||
// opt: 更新 insertOrUpdate, 删除 del
|
// opt: 更新 insertOrUpdate, 删除 del
|
||||||
//
|
//
|
||||||
@ -80,7 +87,7 @@ func CreateSyncGameServerListResp() *SyncGameServerListResp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateGetGameServerCountData(roleDates string, serverIds string) *GetGameServerCountDataReq {
|
func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameServerCountDataReq {
|
||||||
req := &GetGameServerCountDataReq{
|
req := &GetGameServerCountDataReq{
|
||||||
&requests.RpcRequest{},
|
&requests.RpcRequest{},
|
||||||
}
|
}
|
||||||
@ -88,8 +95,10 @@ func CreateGetGameServerCountData(roleDates string, serverIds string) *GetGameSe
|
|||||||
req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData")
|
req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData")
|
||||||
req.Method = requests.POST
|
req.Method = requests.POST
|
||||||
req.FormParams = make(map[string]string)
|
req.FormParams = make(map[string]string)
|
||||||
req.FormParams["role_dates"] = roleDates
|
req.FormParams["role_dates"] = param.RoleDates
|
||||||
req.FormParams["server_ids"] = serverIds
|
req.FormParams["server_id"] = param.ServerId
|
||||||
|
req.FormParams["server_sign"] = param.ServerSign
|
||||||
|
req.FormParams["game_sign"] = param.GameSign
|
||||||
|
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user