From e1c163ef10ca478d65895bc1e6ff6be53a7a1cd9 Mon Sep 17 00:00:00 2001 From: yuxh Date: Wed, 25 Jun 2025 16:44:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor(services/game):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=89=88=E6=9C=AC=E9=85=8D=E7=BD=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 GameVersion 结构体,用于获取游戏客户端版本配置 - 修改 GetGameVersionResp 结构,将 Data 字段类型改为 GameVersion -优化了游戏版本信息的组织和返回方式 --- services/game/game.go | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/services/game/game.go b/services/game/game.go index f22ea4d..6d42791 100644 --- a/services/game/game.go +++ b/services/game/game.go @@ -260,6 +260,32 @@ func CreateGetGameCompanyResp() *GetGameCompanyResp { // ==== 获取游戏客户端版本配置 +type GameVersion struct { + ID int `json:"id"` + GameID int `json:"game_id"` + GameVersion string `json:"version"` + GameURL string `json:"url"` + PayCallbackURL string `json:"pay_callback_url"` + DomainURL string `json:"domain_url"` + Status int `json:"status"` + H5Version int `json:"h5_version"` + H5Status int `json:"h5_status"` + IsH5Logout int `json:"is_h5_logout"` + HideWindow int `json:"hidewindow"` + PayInfo PayInfo `json:"pay_display_info"` + IsYsdk int `json:"is_ysdk"` + CheckVerified int `json:"check_verified"` + Company string `json:"company"` + CompanyKf string `json:"company_kf"` + CompanyProto string `json:"company_proto"` + CompanySms string `json:"company_sms"` + KfStatus int `json:"kf_status"` + PopupTime int `json:"popup_time"` + ExtData map[string]any `json:"ext_data"` + VersionStatus int `json:"version_status"` + VersionTime int `json:"version_time"` +} + type GetGameVersionReq struct { *requests.RpcRequest GameId int `position:"Body" field:"game_id"` @@ -268,9 +294,9 @@ type GetGameVersionReq struct { type GetGameVersionResp struct { *responses.BaseResponse - Code int `json:"code"` - Msg string `json:"msg"` - Data GameVersionInfo `json:"data"` + Code int `json:"code"` + Msg string `json:"msg"` + Data GameVersion `json:"data"` } func CreateGetGameVersionReq(gameId int, gameVersion string) *GetGameVersionReq {