Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3e45030be8 | ||
|
c0b4a0d83c | ||
|
7b904f4d5f |
@ -219,7 +219,7 @@ func TestKickUser(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
} // CreateKickUserReq
|
||||
getRealAuthBlackListReq := CreateKickUserReq(8677, 123, "8676", time.Now().Unix())
|
||||
getRealAuthBlackListReq := CreateKickUserReq(8677, "wzcqtest", "8676", time.Now().Unix())
|
||||
kickUserResp, err := client.KickUser(getRealAuthBlackListReq)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -447,8 +447,8 @@ func CreateGetGameRealAuthInfoResp() *GetGameRealAuthInfoResp {
|
||||
// 踢人下线
|
||||
type KickUserReq struct {
|
||||
*requests.RpcRequest
|
||||
GameId int64 `position:"Body" field:"game_id" default:"-" `
|
||||
Uid int64 `position:"Body" field:"uid" default:"-" `
|
||||
GameSign string `position:"Body" field:"game_sign" default:"-" `
|
||||
ServerSign string `position:"Body" field:"server_sign" default:"-" `
|
||||
Time int64 `position:"Body" field:"time" default:"-" `
|
||||
}
|
||||
@ -470,11 +470,11 @@ type KickUserResp struct {
|
||||
Data KickUserRespData `json:"data"`
|
||||
}
|
||||
|
||||
func CreateKickUserReq(gameId int64, uid int64, serverSign string, time int64) *KickUserReq {
|
||||
func CreateKickUserReq(uid int64, gameSign string, serverSign string, time int64) *KickUserReq {
|
||||
req := &KickUserReq{
|
||||
RpcRequest: &requests.RpcRequest{},
|
||||
GameId: gameId,
|
||||
Uid: uid,
|
||||
GameSign: gameSign,
|
||||
ServerSign: serverSign,
|
||||
Time: time,
|
||||
}
|
||||
|
@ -55,3 +55,11 @@ func (c *Client) EditCard(req EditCardRequestParam) (response string, err error)
|
||||
}
|
||||
return createEditCardResponse.GetHttpContentString(), nil
|
||||
}
|
||||
|
||||
// GetUserGameSign
|
||||
// 获取用户登录过的游戏大类
|
||||
func (c *Client) GetUserGameSign(req *GetUserGameSignRequest) (response *GetUserGameSignResponse, err error) {
|
||||
response = CreateGetUserGameSignResponse()
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
@ -63,3 +63,18 @@ func TestEditCard(t *testing.T) {
|
||||
t.Logf("%v", editCardResponse)
|
||||
|
||||
}
|
||||
|
||||
// 测试获取用户登录过的游戏大类
|
||||
func TestGetUserGameSign(t *testing.T) {
|
||||
client, err := NewClient()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
req := CreateGetUserGameSignRequest("oo70683572", "", "")
|
||||
resp, err := client.GetUserGameSign(req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
t.Logf("resp code:%+v", resp.Code)
|
||||
t.Logf("resp data:%+v", resp.Data)
|
||||
}
|
||||
|
@ -21,9 +21,35 @@ type GetUserListResponse struct {
|
||||
}
|
||||
|
||||
type UserInfo struct {
|
||||
UserName string `json:"user_name"` // 用户名
|
||||
Uid string `json:"uid"` // uid
|
||||
Telephone string `json:"telephone"` // 手机号
|
||||
Id string `json:"id"`
|
||||
Uid string `json:"uid"`
|
||||
BbsUid string `json:"bbs_uid"`
|
||||
UserName string `json:"user_name"`
|
||||
UserPwd string `json:"user_pwd"`
|
||||
Email string `json:"email"`
|
||||
Integral string `json:"integral"`
|
||||
NickName string `json:"nick_name"`
|
||||
TrueName string `json:"true_name"`
|
||||
Sex string `json:"sex"`
|
||||
IdType string `json:"id_type"`
|
||||
IdCard string `json:"id_card"`
|
||||
Birthday string `json:"birthday"`
|
||||
Telephone string `json:"telephone"`
|
||||
Mobile string `json:"mobile"`
|
||||
Address string `json:"address"`
|
||||
Zipcode int64 `json:"zipcode"`
|
||||
Level string `json:"level"`
|
||||
Qq string `json:"qq"`
|
||||
Msn string `json:"msn"`
|
||||
Question string `json:"question"`
|
||||
Answer string `json:"answer"`
|
||||
HeadPic string `json:"head_pic"`
|
||||
Defendboss string `json:"defendboss"`
|
||||
RegTime int64 `json:"reg_time"`
|
||||
RegIp string `json:"reg_ip"`
|
||||
LoginIp string `json:"login_ip"`
|
||||
LoginTime string `json:"login_time"`
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
// CreateGetUserListRequest 获取玩家用户列表
|
||||
@ -114,3 +140,63 @@ func CreateGetUserRoleListResponse() (response *GetUserRoleListResponse) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type GetUserGameSignRequest struct {
|
||||
*requests.RpcRequest
|
||||
}
|
||||
|
||||
type GetUserGameSignResponse struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data struct {
|
||||
List []UserGameSign `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type UserGameSign struct {
|
||||
Id string `json:"id"`
|
||||
AgentId string `json:"agent_id"`
|
||||
SiteId string `json:"site_id"`
|
||||
Uid string `json:"uid"`
|
||||
UserName string `json:"user_name"`
|
||||
GameId string `json:"game_id"`
|
||||
GameSign string `json:"game_sign"`
|
||||
Oaid string `json:"oaid"`
|
||||
Imei string `json:"imei"`
|
||||
Imei2 string `json:"imei2"`
|
||||
Ua string `json:"ua"`
|
||||
FirstLoginIp string `json:"first_login_ip"`
|
||||
FirstLoginTime string `json:"first_login_time"`
|
||||
LastLoginIp string `json:"last_login_ip"`
|
||||
LastLoginTime string `json:"last_login_time"`
|
||||
}
|
||||
|
||||
// CreateGetUserGameSignRequest 获取用户登录过的游戏大类
|
||||
func CreateGetUserGameSignRequest(userName, gameSign, orderBy string) (req *GetUserGameSignRequest) {
|
||||
ts, sign := GetSign()
|
||||
|
||||
req = &GetUserGameSignRequest{
|
||||
RpcRequest: &requests.RpcRequest{},
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
||||
req.FormParams = map[string]string{
|
||||
"act": "info",
|
||||
"do": "get_user_game_sign",
|
||||
"username": userName,
|
||||
"game_sign": gameSign,
|
||||
"order_by": orderBy,
|
||||
"time": fmt.Sprintf("%v", ts),
|
||||
"sign": sign,
|
||||
}
|
||||
|
||||
req.Method = requests.POST
|
||||
return
|
||||
}
|
||||
|
||||
func CreateGetUserGameSignResponse() (response *GetUserGameSignResponse) {
|
||||
response = &GetUserGameSignResponse{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user