6
0

【stat服务】

1、查询用户角色注册分页
This commit is contained in:
liguanjie 2025-06-23 17:19:50 +08:00
parent 25552dd187
commit de55d3d7d5
3 changed files with 86 additions and 0 deletions

View File

@ -49,3 +49,13 @@ func (c *Client) GetAgentList(req *GetAgentListReq) (resp *GetAgentListResp, err
}
return
}
// GetUserRoleRegPage 获取用户角色注册分页列表
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
resp = CreateUserRoleRegPageResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}

View File

@ -78,3 +78,23 @@ func TestClient_GetAgentList(t *testing.T) {
t.Log("GetAgentList test passed")
}
}
// TestClient_GetUserRoleRegPage 查询用户角色注册分页
func TestClient_GetUserRoleRegPage(t *testing.T) {
client, err := NewClient()
if err != nil {
panic(err)
}
req := CreateUserRoleRegPageReq(UserRoleRegParam{
Page: 1,
PageSize: 10,
RoleId: "-1",
RoleName: "",
})
resp, err := client.GetUserRoleRegPage(req)
if err != nil {
panic(err)
}
fmt.Println(resp.Code, resp.Msg, resp.Data)
}

View File

@ -57,3 +57,59 @@ func CreateSetUserNewGameAuthResp() *SetUserNewGameAuthResp {
BaseResponse: &responses.BaseResponse{},
}
}
// ------------------------------------
// UserRoleReg 玩家汇总角色创建记录
type UserRoleReg struct {
UserName string `json:"user_name"`
Uid string `json:"uid"`
RoleId string `json:"role_id"`
RoleName string `json:"role_name"`
GameSign string `json:"game_sign"`
Id string `json:"id"`
CreatedAt string `json:"created_at"`
}
type UserRoleRegPage struct {
Page int `json:"page"`
TotalCount int `json:"page_count"`
PageSize int `json:"page_size"`
Data []UserRoleReg `json:"data"`
}
type UserRoleRegParam struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
RoleId string `json:"role_id"`
RoleName string `json:"role_name"`
}
type UserRoleRegReq struct {
*requests.RpcRequest
}
type UserRoleRegResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data UserRoleRegPage `json:"data"`
}
func CreateUserRoleRegPageReq(param UserRoleRegParam) *UserRoleRegReq {
req := &UserRoleRegReq{
&requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/user/getRoleRegPage")
req.Method = requests.POST
req.FormParams = map[string]string{
"page": fmt.Sprintf("%v", param.Page),
"page_size": fmt.Sprintf("%v", param.PageSize),
"role_id": param.RoleId,
"role_name": param.RoleName,
}
return req
}
func CreateUserRoleRegPageResp() *UserRoleRegResp {
return &UserRoleRegResp{
BaseResponse: &responses.BaseResponse{},
}
}