fix
This commit is contained in:
parent
dbf39e3057
commit
681ec8269c
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user