7
0

【game服务】获取根游戏游戏详情

This commit is contained in:
liguanjie 2025-05-30 16:32:43 +08:00
parent 34de4b0401
commit abca5f01ed
3 changed files with 71 additions and 0 deletions

View File

@ -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
}

View File

@ -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)
}

View File

@ -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{},
}
}