From 681ec8269c0b6bce926648b75dfe1b0fa4208f92 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 24 Nov 2023 12:06:00 +0800 Subject: [PATCH] fix --- .../logic/getldaporganizationslogic.go | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/server/ldap-admin/internal/logic/getldaporganizationslogic.go b/server/ldap-admin/internal/logic/getldaporganizationslogic.go index e746b31e..3b00a804 100644 --- a/server/ldap-admin/internal/logic/getldaporganizationslogic.go +++ b/server/ldap-admin/internal/logic/getldaporganizationslogic.go @@ -34,16 +34,15 @@ func NewGetLdapOrganizationsLogic(ctx context.Context, svcCtx *svc.ServiceContex // func (l *GetLdapOrganizationsLogic) BeforeLogic(w http.ResponseWriter, r *http.Request) { // } type DNItem struct { - Attribute map[string]interface{} `json:"attribute"` - MemberCount int `json:"member_count"` - BusinessCategory string `json:"business_category"` - OwnerName string `json:"owner_name"` - OwnerDN string `json:"owner_dn"` - Level int `json:"level"` - DepartmentDN string `json:"department_dn"` - DepartmentParentDN string `json:"department_parent_dn"` - Sort int `json:"sort"` - Child []*DNItem `json:"child"` + MemberCount int `json:"member_count"` + BusinessCategory string `json:"business_category"` + OwnerName string `json:"owner_name"` + OwnerDN string `json:"owner_dn"` + Level int `json:"level"` + DepartmentDN string `json:"department_dn"` + DepartmentParentDN string `json:"department_parent_dn"` + Sort int `json:"sort"` + Child []*DNItem `json:"child"` } func (l *GetLdapOrganizationsLogic) GetLdapOrganizations(req *types.Request, r *http.Request) (resp *basic.Response) { @@ -73,7 +72,6 @@ func (l *GetLdapOrganizationsLogic) GetLdapOrganizations(req *types.Request, r * ownerDN := "" for _, v := range searchResult.Entries { sortNum++ - attribute := make(map[string]interface{}) memberCount := 0 //成员数 businessCategory := "" //部门名称 for _, attr := range v.Attributes { @@ -99,7 +97,6 @@ func (l *GetLdapOrganizationsLogic) GetLdapOrganizations(req *types.Request, r * BusinessCategory: businessCategory, Level: level, MemberCount: memberCount, - Attribute: attribute, OwnerDN: ownerDN, Sort: sortNum, Child: make([]*DNItem, 0, 100),