6
0

【stat服务】1、查询用户角色汇总,提高超时时间

This commit is contained in:
liguanjie 2025-06-25 17:11:15 +08:00
parent a274190b01
commit 384d257e03
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package stat
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"time"
)
const (
@ -53,6 +54,10 @@ func (c *Client) GetAgentList(req *GetAgentListReq) (resp *GetAgentListResp, err
// GetUserRoleRegPage 获取用户角色注册分页列表
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
resp = CreateUserRoleRegPageResp()
// 设置超时时间
req.SetConnectTimeout(10 * time.Second)
// 设置读取超时时间
req.SetReadTimeout(20 * time.Second)
err = c.DoAction(req, resp)
if err != nil {
return

View File

@ -88,8 +88,8 @@ func TestClient_GetUserRoleRegPage(t *testing.T) {
req := CreateUserRoleRegPageReq(UserRoleRegParam{
Page: 1,
PageSize: 10,
RoleId: "-1",
RoleName: "",
RoleId: "",
RoleName: "温文波箐魔灵",
})
resp, err := client.GetUserRoleRegPage(req)