diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 4a69c17026c91b6ff389c07852f7f43d2a1c6370..9da41c91996e8384b1573e546e46e3112c8b692f 100644 --- a/route/group_power_r/group_power.go +++ b/route/group_power_r/group_power.go @@ -781,6 +781,7 @@ func GroupPowerRooms(c *gin.Context) (*mycontext.MyContext, error) { // @Tags 家族 // @Summary 获取家族成员列表 +// @Param userExtId query string false "用户extId,搜索时输入" // @Param id query int true "家族id" // @Param pageSize query int true "分页大小 默认:10" default(10) // @Param pageIndex query int true "第几个分页,从1开始 默认:1" default(1) @@ -805,8 +806,19 @@ func GroupPowerMembers(c *gin.Context) (*mycontext.MyContext, error) { return myContext, err } model := domain.CreateModelContext(myContext) + userExtId := c.Query("userExtId") gpU := &groupPower_m.GroupPowerUser{GroupPowerId: familyId} + if userExtId != "" { + u, err := user_c.GetUserByExternalId(model, userExtId) + if err != nil { + return myContext, err + } + if u != nil && u.ID > 0 { + gpU.UserId = u.ID + } + } + members, err := gpU.GetBy(model, pageSize, pageIndex) if err != nil { return myContext, err