【stat服务】1、查询用户角色汇总,提高超时时间
This commit is contained in:
parent
a274190b01
commit
384d257e03
@ -3,6 +3,7 @@ package stat
|
|||||||
import (
|
import (
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -53,6 +54,10 @@ func (c *Client) GetAgentList(req *GetAgentListReq) (resp *GetAgentListResp, err
|
|||||||
// GetUserRoleRegPage 获取用户角色注册分页列表
|
// GetUserRoleRegPage 获取用户角色注册分页列表
|
||||||
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
|
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
|
||||||
resp = CreateUserRoleRegPageResp()
|
resp = CreateUserRoleRegPageResp()
|
||||||
|
// 设置超时时间
|
||||||
|
req.SetConnectTimeout(10 * time.Second)
|
||||||
|
// 设置读取超时时间
|
||||||
|
req.SetReadTimeout(20 * time.Second)
|
||||||
err = c.DoAction(req, resp)
|
err = c.DoAction(req, resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -88,8 +88,8 @@ func TestClient_GetUserRoleRegPage(t *testing.T) {
|
|||||||
req := CreateUserRoleRegPageReq(UserRoleRegParam{
|
req := CreateUserRoleRegPageReq(UserRoleRegParam{
|
||||||
Page: 1,
|
Page: 1,
|
||||||
PageSize: 10,
|
PageSize: 10,
|
||||||
RoleId: "-1",
|
RoleId: "",
|
||||||
RoleName: "",
|
RoleName: "温文波箐魔灵",
|
||||||
})
|
})
|
||||||
|
|
||||||
resp, err := client.GetUserRoleRegPage(req)
|
resp, err := client.GetUserRoleRegPage(req)
|
||||||
|
Loading…
Reference in New Issue
Block a user