fix
This commit is contained in:
parent
833f0ffcf5
commit
e7eeb9114c
|
@ -53,6 +53,7 @@ func (l *GetLdapUserInfoLogic) GetLdapUserInfo(req *types.GetLdapUserInfoReq, us
|
||||||
Mobile: user.Mobile,
|
Mobile: user.Mobile,
|
||||||
Avatar: user.Avatar,
|
Avatar: user.Avatar,
|
||||||
Status: user.Status,
|
Status: user.Status,
|
||||||
|
EmployeeTpye: user.EmployeeType,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,7 @@ type GetLdapUserInfoRsp struct {
|
||||||
Email string `json:"email"` //邮箱
|
Email string `json:"email"` //邮箱
|
||||||
Mobile string `json:"mobile"` //手机号
|
Mobile string `json:"mobile"` //手机号
|
||||||
Avatar string `json:"avatar"` //头像地址
|
Avatar string `json:"avatar"` //头像地址
|
||||||
|
EmployeeTpye int64 `json:"employee_tpye"` //雇佣类型 1正式 2实习 3外包
|
||||||
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,6 +249,7 @@ type GetLdapUserInfoRsp {
|
||||||
Email string `json:"email"` //邮箱
|
Email string `json:"email"` //邮箱
|
||||||
Mobile string `json:"mobile"` //手机号
|
Mobile string `json:"mobile"` //手机号
|
||||||
Avatar string `json:"avatar"` //头像地址
|
Avatar string `json:"avatar"` //头像地址
|
||||||
|
EmployeeTpye int64 `json:"employee_tpye"` //雇佣类型 1正式 2实习 3外包
|
||||||
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
||||||
}
|
}
|
||||||
//ldap组织添加成员
|
//ldap组织添加成员
|
||||||
|
|
|
@ -16,6 +16,7 @@ type GetLdapUserInfoRsp struct {
|
||||||
Email string `json:"email"` //邮箱
|
Email string `json:"email"` //邮箱
|
||||||
Mobile string `json:"mobile"` //手机号
|
Mobile string `json:"mobile"` //手机号
|
||||||
Avatar string `json:"avatar"` //头像地址
|
Avatar string `json:"avatar"` //头像地址
|
||||||
|
EmployeeType int64 `json:"employee_type"` //1正式 2实习 3外包
|
||||||
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +55,14 @@ func (l *Ldap) GetLdapUserInfo(userDN string) (*GetLdapUserInfoRsp, error) {
|
||||||
user.Avatar = strings.Join(attr.Values, "")
|
user.Avatar = strings.Join(attr.Values, "")
|
||||||
case "userPassword": //密码
|
case "userPassword": //密码
|
||||||
user.Password = strings.Join(attr.Values, ",")
|
user.Password = strings.Join(attr.Values, ",")
|
||||||
|
case "employeeType": //员工类型
|
||||||
|
if len(attr.Values) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
user.EmployeeType, err = strconv.ParseInt(attr.Values[0], 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.New("用户类型转数字失败")
|
||||||
|
}
|
||||||
case "postalCode": //状态
|
case "postalCode": //状态
|
||||||
if len(attr.Values) == 0 {
|
if len(attr.Values) == 0 {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user