package stat import ( "encoding/json" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" ) type SyncGameServerListReq struct { *requests.RpcRequest } type SyncGameServerListResp struct { *responses.BaseResponse Code int `json:"code"` Msg string `json:"msg"` Count int `json:"count"` } // CreateSyncGameServerListReq 创建同步开服数据请求 // opt: 更新 insertOrUpdate, 删除 del // // data: []map[string]interface{}{ // { // "id": data.ID, // "channel_id": data.ChannelID, // "version_id": data.VersionID, // "game_id": data.GameID, // "server_id": data.ServerID, // "game_sign": data.GameSign, // "name": data.Name, // "open_date": data.OpenDate.Format(constants.DateFormat), // "open_time": data.OpenTime, // "remark": data.Remark, // "status": data.Status, // "if_tj": data.IfTj, // }, // } func CreateSyncGameServerListReq(opt string, data []map[string]interface{}) *SyncGameServerListReq { req := &SyncGameServerListReq{ &requests.RpcRequest{}, } req.InitWithApiInfo(HOST, VERSION, "/game/syncGameServerList") req.Method = requests.POST marshal, _ := json.Marshal(data) req.FormParams = map[string]string{ "opt": opt, "data": string(marshal), } return req } // CreateSyncGameServerListResp 创建同步开服数据响应 func CreateSyncGameServerListResp() *SyncGameServerListResp { return &SyncGameServerListResp{ BaseResponse: &responses.BaseResponse{}, } }