fix
This commit is contained in:
@@ -88,7 +88,10 @@ func (l *CreateLdapUserLogic) CreateLdapUser(req *types.CreateLdapUserReq, r *ht
|
||||
"mail": {req.Email}, //邮箱
|
||||
"postalCode": {fmt.Sprintf("%d", req.Status)}, //状态
|
||||
"roomNumber": {fmt.Sprintf("%d", req.GroupId)}, //权限分组id
|
||||
"departmentNumber": req.OrganizationDNList, //所属组织部门
|
||||
"departmentNumber": {""}, //所属组织部门
|
||||
"telexNumber": {""}, //管理的部门
|
||||
"st": {fmt.Sprintf("%d", req.Gender)}, //性别
|
||||
"title": {req.Birthday}, //生日
|
||||
"postalAddress": {req.Avatar}, //头像
|
||||
"mobile": {req.Mobile}, //手机号
|
||||
"userPassword": {req.Password}, //密码
|
||||
@@ -97,13 +100,6 @@ func (l *CreateLdapUserLogic) CreateLdapUser(req *types.CreateLdapUserReq, r *ht
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "添加用户失败,"+err.Error())
|
||||
}
|
||||
//将用户加入这些部门
|
||||
for _, v := range req.OrganizationDNList {
|
||||
if err = l.svcCtx.Ldap.AddUserToOrganization(v, userDN); err != nil {
|
||||
logx.Error("加入部门失败:", err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "添加用户成功")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user