diff --git a/services/game/client.go b/services/game/client.go index 943f259..a8cab2a 100644 --- a/services/game/client.go +++ b/services/game/client.go @@ -68,3 +68,10 @@ func (c *Client) GetGameServerV2(req *GetServerV2Request) (resp *GetServerV2Resp err = c.DoAction(req, resp) return } + +// GetGameCompany 获取单个根游戏信息 +func (c *Client) GetGameCompany(req *GetGameCompanyReq) (resp *GetGameCompanyResp, err error) { + resp = CreateGetGameCompanyResp() + err = c.DoAction(req, resp) + return +} diff --git a/services/game/client_test.go b/services/game/client_test.go index 130a3df..912d504 100644 --- a/services/game/client_test.go +++ b/services/game/client_test.go @@ -105,3 +105,18 @@ func TestGetGameServerV2(t *testing.T) { } fmt.Println(info) } + +func TestGetGameCompany(t *testing.T) { + client, err := NewClient() + if err != nil { + t.Error(err) + } + req := CreateGetGameCompanyReq("ascq") + gameCompany, err := client.GetGameCompany(req) + if err != nil { + t.Error(err) + return + } + fmt.Println(gameCompany) + fmt.Println(gameCompany.Data.System) +} diff --git a/services/game/game.go b/services/game/game.go index 99683fe..49c9011 100644 --- a/services/game/game.go +++ b/services/game/game.go @@ -206,3 +206,52 @@ func CreateGetGameSimpleListResp() *GetGameSimpleListResp { BaseResponse: &responses.BaseResponse{}, } } + +// GameCompany +// 获取根游戏记录 +type GameCompany struct { + Id int `json:"id"` + GameSign string `json:"game_sign"` + Name string `json:"name"` + GameName string `json:"game_name"` + ContractName string `json:"contract_name"` + PayKey string `json:"pay_key"` + LoginKey string `json:"login_key"` + LoginUrlH5 string `json:"login_url_h5"` + LoginUrlIos string `json:"login_url_ios"` + LoginUrlAndroid string `json:"login_url_android"` + PayUrl string `json:"pay_url"` + Ext string `json:"ext"` + Status int `json:"status"` + Company string `json:"company"` + System string `json:"system"` + Sync int `json:"sync"` + Type int `json:"type"` + GameProductId int `json:"game_product_id"` +} +type GetGameCompanyReq struct { + *requests.RpcRequest +} +type GetGameCompanyResp struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` + Data GameCompany `json:"data"` +} + +func CreateGetGameCompanyReq(gameSign string) *GetGameCompanyReq { + req := &GetGameCompanyReq{ + RpcRequest: &requests.RpcRequest{}, + } + req.InitWithApiInfo(HOST, VERSION, "/api/game/getGameCompanyBySign") + req.FormParams = map[string]string{ + "gameSign": gameSign, + } + req.Method = requests.POST + return req +} +func CreateGetGameCompanyResp() *GetGameCompanyResp { + return &GetGameCompanyResp{ + BaseResponse: &responses.BaseResponse{}, + } +}