| 
									
										
										
										
											2024-09-12 14:27:03 +08:00
										 |  |  |  | package game | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | import ( | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | 	"fmt" | 
					
						
							| 
									
										
										
										
											2024-09-12 14:27:03 +08:00
										 |  |  |  | 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" | 
					
						
							|  |  |  |  | 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" | 
					
						
							|  |  |  |  | ) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameOsInfoReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameOsInfoResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int    `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string `json:"msg"` | 
					
						
							|  |  |  |  | 	Data Data   `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type Data struct { | 
					
						
							|  |  |  |  | 	OsRelList2 []OsRelList2      `json:"os_rel_list2"` | 
					
						
							|  |  |  |  | 	OsList     map[string]OsList `json:"os_list"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type OsRelList2 struct { | 
					
						
							|  |  |  |  | 	TwPlatID int `json:"tw_plat_id"` | 
					
						
							|  |  |  |  | 	TwOs     int `json:"tw_os"` | 
					
						
							|  |  |  |  | 	Os       int `json:"os"` | 
					
						
							|  |  |  |  | 	OsTwo    int `json:"os_two"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type OsList struct { | 
					
						
							|  |  |  |  | 	Name  string `json:"name"` | 
					
						
							|  |  |  |  | 	OsTwo map[string]interface{} | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetGameOsInfoReq() *GetGameOsInfoReq { | 
					
						
							|  |  |  |  | 	req := &GetGameOsInfoReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/getGameOsInfo") | 
					
						
							|  |  |  |  | 	req.Method = requests.POST | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetGameOsInfoResp() *GetGameOsInfoResp { | 
					
						
							|  |  |  |  | 	return &GetGameOsInfoResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameInfoReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameInfoResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int          `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string       `json:"msg"` | 
					
						
							|  |  |  |  | 	Data GameInfoData `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameInfoReqData struct { | 
					
						
							|  |  |  |  | 	GameId  int | 
					
						
							|  |  |  |  | 	NoCache int | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GameInfoData struct { | 
					
						
							|  |  |  |  | 	AcceptRelatedGame     int    `json:"accept_related_game"` | 
					
						
							|  |  |  |  | 	ActCodeState          int    `json:"act_code_state"` | 
					
						
							|  |  |  |  | 	AgentSign             string `json:"agent_sign"` | 
					
						
							|  |  |  |  | 	AppId                 string `json:"app_id"` | 
					
						
							|  |  |  |  | 	AppName               string `json:"app_name"` | 
					
						
							|  |  |  |  | 	Autologin             int    `json:"autologin"` | 
					
						
							|  |  |  |  | 	BName                 string `json:"b_name"` | 
					
						
							|  |  |  |  | 	BackResult            int    `json:"back_result"` | 
					
						
							|  |  |  |  | 	BusinessPurpose       int    `json:"business_purpose"` | 
					
						
							|  |  |  |  | 	ChannelShow           int    `json:"channel_show"` | 
					
						
							|  |  |  |  | 	ClientType            int    `json:"client_type"` | 
					
						
							|  |  |  |  | 	Company               string `json:"company"` | 
					
						
							|  |  |  |  | 	CreatedAt             string `json:"created_at"` | 
					
						
							|  |  |  |  | 	CreatedRealname       string `json:"created_realname"` | 
					
						
							|  |  |  |  | 	CreatedUsername       string `json:"created_username"` | 
					
						
							|  |  |  |  | 	DisableBack           int    `json:"disable_back"` | 
					
						
							|  |  |  |  | 	DisablePay            int    `json:"disable_pay"` | 
					
						
							|  |  |  |  | 	DisableRegister       int    `json:"disable_register"` | 
					
						
							|  |  |  |  | 	DisableRelatedBack    int    `json:"disable_related_back"` | 
					
						
							|  |  |  |  | 	DisableUnrelatedLogin int    `json:"disable_unrelated_login"` | 
					
						
							|  |  |  |  | 	Discount              int    `json:"discount"` | 
					
						
							|  |  |  |  | 	Divide                int    `json:"divide"` | 
					
						
							|  |  |  |  | 	DownloadDomain        string `json:"download_domain"` | 
					
						
							| 
									
										
										
										
											2025-06-25 13:02:25 +08:00
										 |  |  |  | 	DownloadId            string `json:"download_id"` | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | 	ExchangeRate          int    `json:"exchange_rate"` | 
					
						
							|  |  |  |  | 	ExtData               string `json:"ext_data"` | 
					
						
							|  |  |  |  | 	Fcmathod              int    `json:"fcmathod"` | 
					
						
							|  |  |  |  | 	FirstLetter           string `json:"first_letter"` | 
					
						
							|  |  |  |  | 	FlashAuthId           string `json:"flash_auth_id"` | 
					
						
							|  |  |  |  | 	FlashAuthKey          string `json:"flash_auth_key"` | 
					
						
							|  |  |  |  | 	FlashAuthLogo         string `json:"flash_auth_logo"` | 
					
						
							|  |  |  |  | 	FlashAuthName         string `json:"flash_auth_name"` | 
					
						
							|  |  |  |  | 	FlashAuthStatus       int    `json:"flash_auth_status"` | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 	FlashPassId           string `json:"flash_pass_id"` | 
					
						
							|  |  |  |  | 	FlashPassKey          string `json:"flash_pass_key"` | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | 	GameByname            string `json:"game_byname"` | 
					
						
							|  |  |  |  | 	GameIconImg           string `json:"game_icon_img"` | 
					
						
							| 
									
										
										
										
											2025-07-21 17:07:12 +08:00
										 |  |  |  | 	GameImage             string `json:"game_image"` | 
					
						
							|  |  |  |  | 	GameHomeImage         string `json:"game_home_image"` | 
					
						
							|  |  |  |  | 	GameHomeShortImage    string `json:"game_home_short_image"` | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | 	GameSign              string `json:"game_sign"` | 
					
						
							|  |  |  |  | 	GameTsUrl             string `json:"game_ts_url"` | 
					
						
							|  |  |  |  | 	GameVersion           string `json:"game_version"` | 
					
						
							|  |  |  |  | 	GameZsUrl             string `json:"game_zs_url"` | 
					
						
							|  |  |  |  | 	GetRoleUrl            string `json:"get_role_url"` | 
					
						
							|  |  |  |  | 	HideRedButton         int    `json:"hide_red_button"` | 
					
						
							|  |  |  |  | 	Icon                  string `json:"icon"` | 
					
						
							|  |  |  |  | 	Icp                   string `json:"icp"` | 
					
						
							|  |  |  |  | 	IcpUrl                string `json:"icp_url"` | 
					
						
							|  |  |  |  | 	Id                    int    `json:"id"` | 
					
						
							|  |  |  |  | 	IsAugment             int    `json:"is_augment"` | 
					
						
							|  |  |  |  | 	IsOpen                int    `json:"is_open"` | 
					
						
							|  |  |  |  | 	IsSync                int    `json:"is_sync"` | 
					
						
							|  |  |  |  | 	MarketName            string `json:"market_name"` | 
					
						
							|  |  |  |  | 	MediaAbbr             string `json:"media_abbr"` | 
					
						
							|  |  |  |  | 	MobileLoginState      int    `json:"mobile_login_state"` | 
					
						
							|  |  |  |  | 	MobileRegState        int    `json:"mobile_reg_state"` | 
					
						
							|  |  |  |  | 	Name                  string `json:"name"` | 
					
						
							|  |  |  |  | 	ObjectiveId           int    `json:"objective_id"` | 
					
						
							|  |  |  |  | 	OpenGame              int    `json:"open_game"` | 
					
						
							|  |  |  |  | 	Os                    int    `json:"os"` | 
					
						
							|  |  |  |  | 	OsTwo                 int    `json:"os_two"` | 
					
						
							|  |  |  |  | 	Owner                 int    `json:"owner"` | 
					
						
							|  |  |  |  | 	PackageNameId         int    `json:"package_name_id"` | 
					
						
							|  |  |  |  | 	PayUrl                string `json:"pay_url"` | 
					
						
							|  |  |  |  | 	PlatId                int    `json:"plat_id"` | 
					
						
							|  |  |  |  | 	Platform              int    `json:"platform"` | 
					
						
							|  |  |  |  | 	ProtocolPreState      int    `json:"protocol_pre_state"` | 
					
						
							|  |  |  |  | 	Rank                  int    `json:"rank"` | 
					
						
							|  |  |  |  | 	RegisterProtocolState int    `json:"register_protocol_state"` | 
					
						
							|  |  |  |  | 	RelateGame            string `json:"relate_game"` | 
					
						
							|  |  |  |  | 	ReleaseState          int    `json:"release_state"` | 
					
						
							|  |  |  |  | 	Remark                string `json:"remark"` | 
					
						
							|  |  |  |  | 	RequestDomain         string `json:"request_domain"` | 
					
						
							|  |  |  |  | 	ResultCode            string `json:"result_code"` | 
					
						
							|  |  |  |  | 	ScreenType            int    `json:"screen_type"` | 
					
						
							|  |  |  |  | 	ServerGroupId         int    `json:"server_group_id"` | 
					
						
							|  |  |  |  | 	ServerSign            int    `json:"server_sign"` | 
					
						
							|  |  |  |  | 	SimId                 int    `json:"sim_id"` | 
					
						
							|  |  |  |  | 	SpareRequestDomain    string `json:"spare_request_domain"` | 
					
						
							|  |  |  |  | 	TwOs                  int    `json:"tw_os"` | 
					
						
							|  |  |  |  | 	TwPlatId              int    `json:"tw_plat_id"` | 
					
						
							|  |  |  |  | 	UpdatedAt             string `json:"updated_at"` | 
					
						
							|  |  |  |  | 	UpdatedRealname       string `json:"updated_realname"` | 
					
						
							|  |  |  |  | 	UpdatedUsername       string `json:"updated_username"` | 
					
						
							| 
									
										
										
										
											2025-08-07 17:49:59 +08:00
										 |  |  |  | 	IsAuth                int    `json:"is_auth"` | 
					
						
							| 
									
										
										
										
											2025-05-02 21:28:24 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetGameInfoByIdReq(gameId, noCache int) *GetGameInfoReq { | 
					
						
							|  |  |  |  | 	req := &GetGameInfoReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, fmt.Sprintf("/api/game/getGameById/%d?no_cache=%d", gameId, noCache)) | 
					
						
							|  |  |  |  | 	req.Method = requests.GET | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetGameInfoByIdResp() *GetGameInfoResp { | 
					
						
							|  |  |  |  | 	return &GetGameInfoResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-05-28 17:57:52 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameSimpleListReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetGameSimpleListResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int                   `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string                `json:"msg"` | 
					
						
							|  |  |  |  | 	Data map[string]GameSimple `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GameSimple struct { | 
					
						
							|  |  |  |  | 	ID       int    `json:"id"` | 
					
						
							|  |  |  |  | 	Name     string `json:"name"` | 
					
						
							|  |  |  |  | 	GameSign string `json:"game_sign"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | // CreateGetGameSimpleListReq
 | 
					
						
							|  |  |  |  | // gids 子游戏字符串,多个子游戏id用英文逗号分割
 | 
					
						
							|  |  |  |  | // game_signs 根游戏标识字符串,多个标识用英文逗号分割
 | 
					
						
							|  |  |  |  | func CreateGetGameSimpleListReq(gameIds string, gameSigns string) *GetGameSimpleListReq { | 
					
						
							|  |  |  |  | 	req := &GetGameSimpleListReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/getSimpleList") | 
					
						
							|  |  |  |  | 	tmpParams := make(map[string]string) | 
					
						
							|  |  |  |  | 	if gameIds != "" { | 
					
						
							|  |  |  |  | 		tmpParams["gids"] = gameIds | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	if gameSigns != "" { | 
					
						
							|  |  |  |  | 		tmpParams["game_signs"] = gameSigns | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.FormParams = tmpParams | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	req.Method = requests.POST | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetGameSimpleListResp() *GetGameSimpleListResp { | 
					
						
							|  |  |  |  | 	return &GetGameSimpleListResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-05-30 16:32:43 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // GameCompany
 | 
					
						
							| 
									
										
										
										
											2025-06-25 14:59:31 +08:00
										 |  |  |  | // ==== 获取根游戏信息
 | 
					
						
							| 
									
										
										
										
											2025-05-30 16:32:43 +08:00
										 |  |  |  | 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{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // ==== 获取游戏客户端版本配置
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-25 16:44:10 +08:00
										 |  |  |  | type GameVersion struct { | 
					
						
							| 
									
										
										
										
											2025-07-25 17:20:51 +08:00
										 |  |  |  | 	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"` | 
					
						
							|  |  |  |  | 	RequestDomain      string         `json:"request_domain"` | 
					
						
							|  |  |  |  | 	SpareRequestDomain string         `json:"spare_request_domain"` | 
					
						
							|  |  |  |  | 	OtherRequestDomain string         `json:"other_request_domain"` | 
					
						
							| 
									
										
										
										
											2025-06-25 16:44:10 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 15:13:16 +08:00
										 |  |  |  | type GetGameVersionReq struct { | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | 	GameId      int    `position:"Body" field:"game_id"` | 
					
						
							|  |  |  |  | 	GameVersion string `position:"Body" field:"game_version"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 15:13:16 +08:00
										 |  |  |  | type GetGameVersionResp struct { | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 	*responses.BaseResponse | 
					
						
							| 
									
										
										
										
											2025-06-25 16:44:10 +08:00
										 |  |  |  | 	Code int         `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string      `json:"msg"` | 
					
						
							|  |  |  |  | 	Data GameVersion `json:"data"` | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 15:44:41 +08:00
										 |  |  |  | func CreateGetGameVersionReq(gameId int, gameVersion string) *GetGameVersionReq { | 
					
						
							| 
									
										
										
										
											2025-06-20 15:13:16 +08:00
										 |  |  |  | 	req := &GetGameVersionReq{ | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.GameId = gameId | 
					
						
							|  |  |  |  | 	req.GameVersion = gameVersion | 
					
						
							| 
									
										
										
										
											2025-06-20 19:12:43 +08:00
										 |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/getGameVersion") | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 	req.Method = requests.POST | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 15:44:41 +08:00
										 |  |  |  | func CreateGetGameVersionResp() *GetGameVersionResp { | 
					
						
							| 
									
										
										
										
											2025-06-20 15:13:16 +08:00
										 |  |  |  | 	return &GetGameVersionResp{ | 
					
						
							| 
									
										
										
										
											2025-06-20 12:09:20 +08:00
										 |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-07-10 11:42:07 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // GetConfigReq
 | 
					
						
							|  |  |  |  | // 游戏全局配置
 | 
					
						
							|  |  |  |  | type GetConfigReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | 	Key string `position:"Query" field:"key" default:"-" ` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetConfigRespData struct { | 
					
						
							|  |  |  |  | 	Id      int    `json:"id"` | 
					
						
							|  |  |  |  | 	Key     string `json:"key"` | 
					
						
							|  |  |  |  | 	ExtData string `json:"ext_data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | type GetConfigResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int               `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string            `json:"msg"` | 
					
						
							|  |  |  |  | 	Data GetConfigRespData `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetConfigReq(key string) *GetConfigReq { | 
					
						
							|  |  |  |  | 	req := &GetConfigReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.Key = key | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/getConfig") | 
					
						
							|  |  |  |  | 	req.Method = requests.GET | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetConfigResp() *GetConfigResp { | 
					
						
							|  |  |  |  | 	return &GetConfigResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-07-10 15:45:07 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // GetRealAuthBlackListReq
 | 
					
						
							|  |  |  |  | // 获取实名黑名单
 | 
					
						
							|  |  |  |  | type GetRealAuthBlackListReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | 	Key string `position:"Query" field:"key" default:"-" ` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetRealAuthBlackListRespDataItem struct { | 
					
						
							|  |  |  |  | 	Id        int    `json:"id"` | 
					
						
							|  |  |  |  | 	TrueName  string `json:"true_name"` | 
					
						
							|  |  |  |  | 	IdCard    string `json:"id_card"` | 
					
						
							|  |  |  |  | 	Remark    string `json:"remark"` | 
					
						
							|  |  |  |  | 	CreateBy  string `json:"create_by"` | 
					
						
							|  |  |  |  | 	UpdateBy  string `json:"update_by"` | 
					
						
							|  |  |  |  | 	CreatedAt string `json:"created_at"` | 
					
						
							|  |  |  |  | 	UpdatedAt string `json:"updated_at"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type GetRealAuthBlackListResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int                                `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string                             `json:"msg"` | 
					
						
							|  |  |  |  | 	Data []GetRealAuthBlackListRespDataItem `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetRealAuthBlackListReq() *GetRealAuthBlackListReq { | 
					
						
							|  |  |  |  | 	req := &GetRealAuthBlackListReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/getRealAuthBlackList") | 
					
						
							|  |  |  |  | 	req.Method = requests.GET | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateGetRealAuthBlackListResp() *GetRealAuthBlackListResp { | 
					
						
							|  |  |  |  | 	return &GetRealAuthBlackListResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-07-10 18:05:09 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // GetGameRealAuthInfoReq
 | 
					
						
							|  |  |  |  | // 获取实名参数
 | 
					
						
							|  |  |  |  | type GetGameRealAuthInfoReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | 	GameId int64 `position:"Body" field:"game_id" default:"-" ` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-10 18:26:12 +08:00
										 |  |  |  | type GetGameRealAuthInfoRespData 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"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-10 18:05:09 +08:00
										 |  |  |  | type GetGameRealAuthInfoResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							| 
									
										
										
										
											2025-07-10 18:26:12 +08:00
										 |  |  |  | 	Code int                         `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string                      `json:"msg"` | 
					
						
							|  |  |  |  | 	Data GetGameRealAuthInfoRespData `json:"data"` | 
					
						
							| 
									
										
										
										
											2025-07-10 18:05:09 +08:00
										 |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 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{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-08-29 17:12:22 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | // KickUserReq
 | 
					
						
							|  |  |  |  | // 踢人下线
 | 
					
						
							|  |  |  |  | type KickUserReq struct { | 
					
						
							|  |  |  |  | 	*requests.RpcRequest | 
					
						
							|  |  |  |  | 	Uid        int64  `position:"Body" field:"uid" default:"-" ` | 
					
						
							| 
									
										
										
										
											2025-08-29 18:31:51 +08:00
										 |  |  |  | 	GameSign   string `position:"Body" field:"game_sign" default:"-" ` | 
					
						
							| 
									
										
										
										
											2025-08-29 17:12:22 +08:00
										 |  |  |  | 	ServerSign string `position:"Body" field:"server_sign" default:"-" ` | 
					
						
							|  |  |  |  | 	Time       int64  `position:"Body" field:"time" default:"-" ` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type KickUserRespDataCallCpInfo struct { | 
					
						
							|  |  |  |  | 	Url          string         `json:"url"` | 
					
						
							|  |  |  |  | 	RequestParam map[string]any `json:"request_param"` | 
					
						
							|  |  |  |  | 	Response     map[string]any `json:"response"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type KickUserRespData struct { | 
					
						
							|  |  |  |  | 	CallCpInfo KickUserRespDataCallCpInfo `json:"call_cp_info"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | type KickUserResp struct { | 
					
						
							|  |  |  |  | 	*responses.BaseResponse | 
					
						
							|  |  |  |  | 	Code int              `json:"code"` | 
					
						
							|  |  |  |  | 	Msg  string           `json:"msg"` | 
					
						
							|  |  |  |  | 	Data KickUserRespData `json:"data"` | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-29 18:31:51 +08:00
										 |  |  |  | func CreateKickUserReq(uid int64, gameSign string, serverSign string, time int64) *KickUserReq { | 
					
						
							| 
									
										
										
										
											2025-08-29 17:12:22 +08:00
										 |  |  |  | 	req := &KickUserReq{ | 
					
						
							|  |  |  |  | 		RpcRequest: &requests.RpcRequest{}, | 
					
						
							|  |  |  |  | 		Uid:        uid, | 
					
						
							| 
									
										
										
										
											2025-08-29 18:31:51 +08:00
										 |  |  |  | 		GameSign:   gameSign, | 
					
						
							| 
									
										
										
										
											2025-08-29 17:12:22 +08:00
										 |  |  |  | 		ServerSign: serverSign, | 
					
						
							|  |  |  |  | 		Time:       time, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 	req.InitWithApiInfo(HOST, VERSION, "/api/game/kickUser") | 
					
						
							|  |  |  |  | 	req.Method = requests.POST | 
					
						
							|  |  |  |  | 	return req | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func CreateKickUserResp() *KickUserResp { | 
					
						
							|  |  |  |  | 	return &KickUserResp{ | 
					
						
							|  |  |  |  | 		BaseResponse: &responses.BaseResponse{}, | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | } |