From 87df9c7873b143bc348a43a28340356a8e9ab641 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Fri, 10 Mar 2023 17:05:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E6=97=8F=E6=88=90=E5=91=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/group_power_r/group_power.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 4a69c17..9da41c9 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 -- 2.22.0