From 2622e7c3c97e098cdbafd4525037b7bf7541da81 Mon Sep 17 00:00:00 2001 From: huangqz Date: Thu, 10 Jul 2025 18:05:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E5=AE=9E?= =?UTF-8?q?=E5=90=8D=E8=AE=A4=E8=AF=81=E5=8F=82=E6=95=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/game/client.go | 7 ++++++ services/game/client_test.go | 15 +++++++++++++ services/game/game.go | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/services/game/client.go b/services/game/client.go index 54d2476..8708394 100644 --- a/services/game/client.go +++ b/services/game/client.go @@ -102,3 +102,10 @@ func (c *Client) GetRealAuthBlackList(req *GetRealAuthBlackListReq) (resp *GetRe err = c.DoAction(req, resp) return } + +// GetGameRealAuthInfo 获取实名参数 +func (c *Client) GetGameRealAuthInfo(req *GetGameRealAuthInfoReq) (resp *GetGameRealAuthInfoResp, err error) { + resp = CreateGetGameRealAuthInfoResp() + err = c.DoAction(req, resp) + return +} diff --git a/services/game/client_test.go b/services/game/client_test.go index b7ee7f8..ecdcc8f 100644 --- a/services/game/client_test.go +++ b/services/game/client_test.go @@ -164,3 +164,18 @@ func TestGetRealAuthBlackList(t *testing.T) { } t.Log(isBlockOutIos) } + +// 获取实名黑名单 +func TestGetGameRealAuthInfo(t *testing.T) { + client, err := NewClient() + if err != nil { + t.Error(err) + } + getGameRealAuthInfoReq := CreateGetGameRealAuthInfoReq(7081) + isBlockOutIos, err := client.GetGameRealAuthInfo(getGameRealAuthInfoReq) + if err != nil { + t.Error(err) + return + } + t.Log(isBlockOutIos) +} diff --git a/services/game/game.go b/services/game/game.go index 86eb9f0..c59bffe 100644 --- a/services/game/game.go +++ b/services/game/game.go @@ -390,3 +390,46 @@ func CreateGetRealAuthBlackListResp() *GetRealAuthBlackListResp { BaseResponse: &responses.BaseResponse{}, } } + +// GetGameRealAuthInfoReq +// 获取实名参数 +type GetGameRealAuthInfoReq struct { + *requests.RpcRequest + GameId int64 `position:"Body" field:"game_id" default:"-" ` +} + +type GetGameRealAuthInfoResp struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` + Data struct { + GroupName string `json:"group_name"` + GroupDescription int `json:"group_description"` + VerifiedTime string `json:"verified_time"` + AreaProvince string `json:"area_province"` + VersionInfo string `json:"version_info"` + IsReal int `json:"is_real"` + IsDirect int `json:"is_direct"` + AuthChannel string `json:"auth_channel"` + StandbyAuthChannel string `json:"standby_auth_channel"` + ProtectTime int `json:"protect_time"` + GovIoReport int `json:"gov_io_report"` + MinorBan int `json:"minor_ban"` + } `json:"data"` +} + +func CreateGetGameRealAuthInfoReq(gameId int64) *GetGameRealAuthInfoReq { + req := &GetGameRealAuthInfoReq{ + RpcRequest: &requests.RpcRequest{}, + GameId: gameId, + } + req.InitWithApiInfo(HOST, VERSION, "/api/login/getGameRealAuthInfo") + req.Method = requests.POST + return req +} + +func CreateGetGameRealAuthInfoResp() *GetGameRealAuthInfoResp { + return &GetGameRealAuthInfoResp{ + BaseResponse: &responses.BaseResponse{}, + } +}