Compare commits
No commits in common. "master" and "v1.2.33" have entirely different histories.
@ -75,82 +75,3 @@ func CreateGetAgentListResp() *GetAgentListResp {
|
|||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetAnchorBySiteId struct {
|
|
||||||
*requests.RpcRequest
|
|
||||||
SiteId int64 `position:"Body" field:"site_id" default:"0" json:"site_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAnchorBySiteIdResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data struct {
|
|
||||||
AnchorName string `json:"anchor_name"`
|
|
||||||
} `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetAnchorBySiteIdReq(siteId int64) *GetAnchorBySiteId {
|
|
||||||
req := &GetAnchorBySiteId{
|
|
||||||
RpcRequest: &requests.RpcRequest{},
|
|
||||||
SiteId: siteId,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/site/getAnchorBySiteID")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|
||||||
// ======== 根据口令获取达人名称
|
|
||||||
|
|
||||||
type GetAnchorByLiveCodeReq struct {
|
|
||||||
*requests.RpcRequest
|
|
||||||
LiveCode string `position:"Body" field:"live_code" default:"" json:"live_code"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAnchorByLiveCodeResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data struct {
|
|
||||||
AnchorName string `json:"anchor_name"`
|
|
||||||
} `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetAnchorByLiveCodeReq(liveCode string) *GetAnchorByLiveCodeReq {
|
|
||||||
req := &GetAnchorByLiveCodeReq{
|
|
||||||
RpcRequest: &requests.RpcRequest{},
|
|
||||||
LiveCode: liveCode,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/livecode/getAnchorByLiveCode")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据口令获取对应的site_id
|
|
||||||
|
|
||||||
type GetLiveCodeReq struct {
|
|
||||||
*requests.RpcRequest
|
|
||||||
LiveCode string `position:"Body" field:"code" default:"" json:"code"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetLiveCodeResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data struct {
|
|
||||||
Code string `json:"code"`
|
|
||||||
GameId int64 `json:"game_id"`
|
|
||||||
AgentId int64 `json:"agent_id"`
|
|
||||||
SiteId int64 `json:"site_id"`
|
|
||||||
} `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetLiveCodeReq(liveCode string) *GetLiveCodeReq {
|
|
||||||
req := &GetLiveCodeReq{
|
|
||||||
RpcRequest: &requests.RpcRequest{},
|
|
||||||
LiveCode: liveCode,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/livecode/queryCode")
|
|
||||||
req.Method = requests.POST
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|||||||
@ -67,15 +67,6 @@ func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAnchorBySiteId 通过site_id获取达人信息
|
|
||||||
func (c *Client) GetAnchorBySiteId(req *GetAnchorBySiteId) (resp *GetAnchorBySiteIdResp, err error) {
|
|
||||||
resp = &GetAnchorBySiteIdResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetUserTotalPay 获取用户累计付费
|
// GetUserTotalPay 获取用户累计付费
|
||||||
func (c *Client) GetUserTotalPay(req *GetUserTotalPayReq) (resp *GetUserTotalPayResp, err error) {
|
func (c *Client) GetUserTotalPay(req *GetUserTotalPayReq) (resp *GetUserTotalPayResp, err error) {
|
||||||
resp = CreateGetUserTotalPayResp()
|
resp = CreateGetUserTotalPayResp()
|
||||||
@ -96,32 +87,6 @@ func (c *Client) GetGameServerCountData(req *GetGameServerCountDataReq) (resp *G
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAnchorByLiveCode 通过口令获取达人信息
|
|
||||||
func (c *Client) GetAnchorByLiveCode(req *GetAnchorByLiveCodeReq) (resp *GetAnchorByLiveCodeResp, err error) {
|
|
||||||
resp = &GetAnchorByLiveCodeResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetLiveCode 根据口令获取口令信息
|
|
||||||
func (c *Client) GetLiveCode(req *GetLiveCodeReq) (resp *GetLiveCodeResp, err error) {
|
|
||||||
resp = &GetLiveCodeResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) BindLiveCode(req *BindLiveCodeReq) (resp *BindLiveCodeResp, err error) {
|
|
||||||
resp = &BindLiveCodeResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) UserReg(req *UserRegRequest) (resp *UserRegResponse, err error) {
|
func (c *Client) UserReg(req *UserRegRequest) (resp *UserRegResponse, err error) {
|
||||||
resp = &UserRegResponse{
|
resp = &UserRegResponse{
|
||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
|||||||
@ -101,32 +101,6 @@ func TestClient_GetUserRoleRegPage(t *testing.T) {
|
|||||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestClient_GetAnchorBySiteId(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
req := CreateGetAnchorBySiteIdReq(6434244)
|
|
||||||
resp, err := client.GetAnchorBySiteId(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
fmt.Println(resp.Code, resp.Msg, resp.Data.AnchorName)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestClient_GetAnchorByLiveCode(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
req := CreateGetAnchorByLiveCodeReq("梦无敌111")
|
|
||||||
resp, err := client.GetAnchorByLiveCode(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
fmt.Println(resp.Code, resp.Msg, resp.Data.AnchorName)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取用户累计付费
|
// 获取用户累计付费
|
||||||
func TestGetUserTotalPay(t *testing.T) {
|
func TestGetUserTotalPay(t *testing.T) {
|
||||||
client, err := NewClient()
|
client, err := NewClient()
|
||||||
@ -164,42 +138,6 @@ func TestGetGameServerCountData(t *testing.T) {
|
|||||||
fmt.Printf("%+v", resp.Data)
|
fmt.Printf("%+v", resp.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestClient_GetLiveCode(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
req := CreateGetLiveCodeReq("梦无敌111")
|
|
||||||
resp, err := client.GetLiveCode(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
t.Log(resp.Code, resp.Msg, resp.Data)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestClient_BindLiveCode(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
req := CreateBindLiveCodeReq(BindLiveCodeParam{
|
|
||||||
AnchorName: "梦无敌111",
|
|
||||||
BindTime: time.Now().Unix(),
|
|
||||||
GameId: 3706,
|
|
||||||
GameSign: "qwldy",
|
|
||||||
LiveCode: "梦无敌111",
|
|
||||||
LiveSiteId: 203902,
|
|
||||||
RegDate: "2023-10-09",
|
|
||||||
Uid: 123456,
|
|
||||||
UserName: "grtest1001",
|
|
||||||
})
|
|
||||||
resp, err := client.BindLiveCode(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
t.Log(resp.Code, resp.Msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUserReg(t *testing.T) {
|
func TestUserReg(t *testing.T) {
|
||||||
|
|
||||||
param := &UserRegParam{}
|
param := &UserRegParam{}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package stat
|
|||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
@ -115,39 +114,6 @@ func CreateUserRoleRegPageResp() *UserRoleRegResp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======== 上报用户绑定口令数据 =========
|
|
||||||
|
|
||||||
type BindLiveCodeParam struct {
|
|
||||||
Uid int64 `json:"uid"`
|
|
||||||
UserName string `json:"user_name"`
|
|
||||||
GameId int64 `json:"game_id"`
|
|
||||||
GameSign string `json:"game_sign"`
|
|
||||||
RegDate string `json:"reg_date"`
|
|
||||||
LiveCode string `json:"live_code"`
|
|
||||||
LiveSiteId int64 `json:"live_site_id"`
|
|
||||||
AnchorName string `json:"anchor_name"`
|
|
||||||
BindTime int64 `json:"bind_time"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BindLiveCodeReq = requests.JsonRequest
|
|
||||||
|
|
||||||
type BindLiveCodeResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateBindLiveCodeReq(param BindLiveCodeParam) *BindLiveCodeReq {
|
|
||||||
req := &requests.JsonRequest{}
|
|
||||||
_param, _ := json.Marshal(param)
|
|
||||||
paramMap := make(map[string]any)
|
|
||||||
_ = json.Unmarshal(_param, ¶mMap)
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/user/bindLiveCode")
|
|
||||||
req.Method = requests.POST
|
|
||||||
req.JsonParams = paramMap
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|
||||||
type DeviceInfo struct {
|
type DeviceInfo struct {
|
||||||
Network string `position:"Body" field:"network" default:"" json:"network"`
|
Network string `position:"Body" field:"network" default:"" json:"network"`
|
||||||
ScreenResolution string `position:"Body" field:"screen_resolution" default:"" json:"screen_resolution"`
|
ScreenResolution string `position:"Body" field:"screen_resolution" default:"" json:"screen_resolution"`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user