feat(game): 添加获取游戏客户端版本配置接口
- 在 game/client.go 中添加了 GetGameByVersion 方法- 在 game/game.go 中定义了 GetGameByVersionReq 和 GetGameByVersionResp 结构体 - 实现了创建请求和响应对象的函数 CreateGetGameByVersionReq 和 CreateGetGameByVersionResp
This commit is contained in:
		
							parent
							
								
									eb25c8f20a
								
							
						
					
					
						commit
						25552dd187
					
				@ -82,3 +82,9 @@ func (c *Client) GetIsBlockOutIos(req *IsBlockOutIosReq) (resp *IsBlockOutIosRes
 | 
				
			|||||||
	err = c.DoAction(req, resp)
 | 
						err = c.DoAction(req, resp)
 | 
				
			||||||
	return
 | 
						return
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *Client) GetGameByVersion(req *GetGameByVersionReq) (resp *GetGameByVersionResp, err error) {
 | 
				
			||||||
 | 
						resp = CreateGetGameByVersionResp()
 | 
				
			||||||
 | 
						err = c.DoAction(req, resp)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -99,6 +99,8 @@ type GameInfoData struct {
 | 
				
			|||||||
	FlashAuthLogo         string `json:"flash_auth_logo"`
 | 
						FlashAuthLogo         string `json:"flash_auth_logo"`
 | 
				
			||||||
	FlashAuthName         string `json:"flash_auth_name"`
 | 
						FlashAuthName         string `json:"flash_auth_name"`
 | 
				
			||||||
	FlashAuthStatus       int    `json:"flash_auth_status"`
 | 
						FlashAuthStatus       int    `json:"flash_auth_status"`
 | 
				
			||||||
 | 
						FlashPassId           string `json:"flash_pass_id"`
 | 
				
			||||||
 | 
						FlashPassKey          string `json:"flash_pass_key"`
 | 
				
			||||||
	GameByname            string `json:"game_byname"`
 | 
						GameByname            string `json:"game_byname"`
 | 
				
			||||||
	GameIconImg           string `json:"game_icon_img"`
 | 
						GameIconImg           string `json:"game_icon_img"`
 | 
				
			||||||
	GameSign              string `json:"game_sign"`
 | 
						GameSign              string `json:"game_sign"`
 | 
				
			||||||
@ -255,3 +257,35 @@ func CreateGetGameCompanyResp() *GetGameCompanyResp {
 | 
				
			|||||||
		BaseResponse: &responses.BaseResponse{},
 | 
							BaseResponse: &responses.BaseResponse{},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ==== 获取游戏客户端版本配置
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type GetGameByVersionReq struct {
 | 
				
			||||||
 | 
						*requests.RpcRequest
 | 
				
			||||||
 | 
						GameId      int    `position:"Body" field:"game_id"`
 | 
				
			||||||
 | 
						GameVersion string `position:"Body" field:"game_version"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type GetGameByVersionResp struct {
 | 
				
			||||||
 | 
						*responses.BaseResponse
 | 
				
			||||||
 | 
						Code int             `json:"code"`
 | 
				
			||||||
 | 
						Msg  string          `json:"msg"`
 | 
				
			||||||
 | 
						Data GameVersionInfo `json:"data"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameByVersionReq {
 | 
				
			||||||
 | 
						req := &GetGameByVersionReq{
 | 
				
			||||||
 | 
							RpcRequest: &requests.RpcRequest{},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						req.GameId = gameId
 | 
				
			||||||
 | 
						req.GameVersion = gameVersion
 | 
				
			||||||
 | 
						req.InitWithApiInfo(HOST, VERSION, "/api/game/getGameByVersion")
 | 
				
			||||||
 | 
						req.Method = requests.POST
 | 
				
			||||||
 | 
						return req
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func CreateGetGameByVersionResp() *GetGameByVersionResp {
 | 
				
			||||||
 | 
						return &GetGameByVersionResp{
 | 
				
			||||||
 | 
							BaseResponse: &responses.BaseResponse{},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user