From f80cb3cc646f932ebcc8ad45102737de63c76081 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 22 Nov 2023 18:34:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=88=E6=9D=83=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/gmodel/ldap_group_logic.go | 2 +- server/ldap-admin/internal/logic/getldapgroupslogic.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/gmodel/ldap_group_logic.go b/model/gmodel/ldap_group_logic.go index 2234e12e..3bcee265 100644 --- a/model/gmodel/ldap_group_logic.go +++ b/model/gmodel/ldap_group_logic.go @@ -23,7 +23,7 @@ func (s *LdapGroupModel) FindAll(ctx context.Context, gorm *gorm.DB) (resp []Lda // FindPage 分页查询 func (s *LdapGroupModel) FindPage(ctx context.Context, req FindPageReq) (resp []LdapGroup, total int64, err error) { - db := s.db.WithContext(ctx).Model(&LdapGroup{}) + db := s.db.WithContext(ctx).Model(&LdapGroup{}).Where("type != ?", "people") if req.Fields != "" { db = db.Select(req.Fields) } diff --git a/server/ldap-admin/internal/logic/getldapgroupslogic.go b/server/ldap-admin/internal/logic/getldapgroupslogic.go index bf62e6dd..470424e9 100644 --- a/server/ldap-admin/internal/logic/getldapgroupslogic.go +++ b/server/ldap-admin/internal/logic/getldapgroupslogic.go @@ -39,7 +39,7 @@ func (l *GetLdapGroupsLogic) GetLdapGroups(req *types.GetLdapGroupsReq, userinfo resList, resCount, err := l.svcCtx.AllModels.LdapGroup.FindPage(l.ctx, gmodel.FindPageReq{ Page: req.CurrentPage, Limit: req.PerPage, - Fields: "id,name,keyword,remark,status,sort", + Fields: "id,type,name,keyword,remark,status,sort", }) if err != nil { return resp.SetStatus(basic.CodeServiceErr)