新增获取主播信息接口
This commit is contained in:
parent
b43289ee28
commit
c32e2b3411
69
services/game/activity.go
Normal file
69
services/game/activity.go
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
import (
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetAnchorUserReq struct {
|
||||||
|
*requests.RpcRequest
|
||||||
|
UserName string `position:"Body" field:"user_name"`
|
||||||
|
AnchorType int64 `position:"Body" field:"type"`
|
||||||
|
Columns string `position:"Body" field:"columns"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetAnchorUserResp struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Data AnchorUser `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AnchorUser struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
UserName string `json:"user_name"`
|
||||||
|
JoinTime int64 `json:"join_time"`
|
||||||
|
Remark string `json:"remark"`
|
||||||
|
AutoAudit int64 `json:"auto_audit"`
|
||||||
|
VirtualWithdraw int64 `json:"virtual_withdraw"`
|
||||||
|
Status int64 `json:"status"`
|
||||||
|
Level int64 `json:"level"`
|
||||||
|
ZhuanshengLv int64 `json:"zhuansheng_lv"`
|
||||||
|
MoneyId int64 `json:"money_id"`
|
||||||
|
PayEntryStatus int64 `json:"pay_entry_status"`
|
||||||
|
IssueMoneyMax float64 `json:"issue_money_max"`
|
||||||
|
RealMoneyProportion float64 `json:"real_money_proportion"`
|
||||||
|
DayIssueMoneyLimit float64 `json:"day_issue_money_limit"`
|
||||||
|
IssueRegTimeLimit int64 `json:"issue_reg_time_limit"`
|
||||||
|
IssueRoleCreateTimeLimit int64 `json:"issue_role_create_time_limit"`
|
||||||
|
AnchorType int64 `json:"type"`
|
||||||
|
GameIds string `json:"game_ids"`
|
||||||
|
AgentIds string `json:"agent_ids"`
|
||||||
|
DayWithdrawLimit float64 `json:"day_withdraw_limit"`
|
||||||
|
BankCompany string `json:"bank_company"`
|
||||||
|
BankAccount string `json:"bank_account"`
|
||||||
|
BankCardName string `json:"bank_card_name"`
|
||||||
|
PayPassword string `json:"pay_password"`
|
||||||
|
IssueConfigIds string `json:"issue_config_ids"`
|
||||||
|
BigMoneyProportion int64 `json:"big_money_proportion"`
|
||||||
|
BigMoneyRangeMin int64 `json:"big_money_range_min"`
|
||||||
|
BigMoneyRangeMax int64 `json:"big_money_range_max"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetAnchorUserReq(UserName string, AnchorType int64, Columns string) *GetAnchorUserReq {
|
||||||
|
req := &GetAnchorUserReq{
|
||||||
|
RpcRequest: &requests.RpcRequest{},
|
||||||
|
}
|
||||||
|
req.UserName = UserName
|
||||||
|
req.AnchorType = AnchorType
|
||||||
|
req.Columns = Columns
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/api/activity/getAnchorUser")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return req
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetAnchorUserResp() *GetAnchorUserResp {
|
||||||
|
return &GetAnchorUserResp{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -155,3 +155,11 @@ func (c *Client) GetGameRoleName(req *GetGameRoleNameReq) (response *GetGameRole
|
|||||||
err = c.DoAction(req, response)
|
err = c.DoAction(req, response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetAnchorUser
|
||||||
|
// 获取主播信息接口
|
||||||
|
func (c *Client) GetAnchorUser(req *GetAnchorUserReq) (resp *GetAnchorUserResp, err error) {
|
||||||
|
resp = CreateGetAnchorUserResp()
|
||||||
|
err = c.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
@ -255,3 +255,19 @@ func TestGetGameClientInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
_ = resp
|
_ = resp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetAnchorUser(t *testing.T) {
|
||||||
|
client, err := NewClient()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
req := CreateGetAnchorUserReq("vd22543241", 2, "*")
|
||||||
|
getAnchorUser, err := client.GetAnchorUser(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println(getAnchorUser)
|
||||||
|
fmt.Println(getAnchorUser.Data.UserName)
|
||||||
|
fmt.Println(getAnchorUser.Data.Id)
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user