6
0

refactor(game): 重构游戏版本获取接口

- 将 GetGameByVersionReq 重命名为 GetGameVersionReq
- 将 GetGameByVersionResp 重命名为 GetGameVersionResp
- 更新了相关的函数和结构体名称,以提高代码的一致性和可读性
This commit is contained in:
余 欣怀 2025-06-20 15:13:16 +08:00
parent 25552dd187
commit 7e9eae718c
2 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ func (c *Client) GetIsBlockOutIos(req *IsBlockOutIosReq) (resp *IsBlockOutIosRes
return
}
func (c *Client) GetGameByVersion(req *GetGameByVersionReq) (resp *GetGameByVersionResp, err error) {
func (c *Client) GetGameByVersion(req *GetGameVersionReq) (resp *GetGameVersionResp, err error) {
resp = CreateGetGameByVersionResp()
err = c.DoAction(req, resp)
return

View File

@ -260,21 +260,21 @@ func CreateGetGameCompanyResp() *GetGameCompanyResp {
// ==== 获取游戏客户端版本配置
type GetGameByVersionReq struct {
type GetGameVersionReq struct {
*requests.RpcRequest
GameId int `position:"Body" field:"game_id"`
GameVersion string `position:"Body" field:"game_version"`
}
type GetGameByVersionResp struct {
type GetGameVersionResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data GameVersionInfo `json:"data"`
}
func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameByVersionReq {
req := &GetGameByVersionReq{
func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameVersionReq {
req := &GetGameVersionReq{
RpcRequest: &requests.RpcRequest{},
}
req.GameId = gameId
@ -284,8 +284,8 @@ func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameByVersion
return req
}
func CreateGetGameByVersionResp() *GetGameByVersionResp {
return &GetGameByVersionResp{
func CreateGetGameByVersionResp() *GetGameVersionResp {
return &GetGameVersionResp{
BaseResponse: &responses.BaseResponse{},
}
}