This commit is contained in:
laodaming 2023-11-15 17:11:19 +08:00
parent b9399f887b
commit 33c5cc6b0b

View File

@ -60,13 +60,14 @@ func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth.
sortNum++
attribute := make(map[string]interface{})
for _, attr := range v.Attributes {
//objectcalss属性特别处理
if attr.Name == "objectClass" {
mapObjectClass := make(map[string]struct{})
for _, objectClassItem := range attr.Values {
mapObjectClass[objectClassItem] = struct{}{}
}
attribute[attr.Name] = mapObjectClass
} else {
} else { //普通属性
attribute[attr.Name] = strings.Join(attr.Values, ",")
}
}