feature: 添加自定义字段,docker-compose添加配置文件挂载 (#51)
Co-authored-by: ruochen <ruochen@feishu.com>
This commit is contained in:
parent
e4e4786ebf
commit
0367a6376c
|
@ -21,4 +21,5 @@ go-ldap-admin
|
|||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
tmp
|
||||
tmp
|
||||
docs/docker-compose/data
|
|
@ -0,0 +1 @@
|
|||
config.yml
|
|
@ -76,6 +76,8 @@ services:
|
|||
WAIT_HOSTS: mysql:3306, openldap:389
|
||||
ports:
|
||||
- 8888:8888
|
||||
volumes:
|
||||
- ./config/config.yml:/app/config.yml
|
||||
depends_on:
|
||||
- mysql
|
||||
- openldap
|
||||
|
|
|
@ -52,7 +52,7 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
|
|||
ele := make(map[string]interface{})
|
||||
ele["userid"] = user.UserId
|
||||
ele["unionid"] = user.UnionId
|
||||
ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["name"] = user.Name
|
||||
ele["avatar"] = user.Avatar
|
||||
ele["mobile"] = user.Mobile
|
||||
|
@ -62,7 +62,13 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
|
|||
ele["remark"] = user.Remark
|
||||
ele["leader"] = user.Leader
|
||||
ele["org_email"] = user.OrgEmail
|
||||
if user.OrgEmail != "" {
|
||||
ele["custom_nickname_org_email"] = strings.Split(user.OrgEmail, "@")[0]
|
||||
}
|
||||
ele["email"] = user.Email
|
||||
if user.Email != "" {
|
||||
ele["custom_nickname_email"] = strings.Split(user.Email, "@")[0]
|
||||
}
|
||||
// 部门ids
|
||||
var sourceDeptIds []string
|
||||
for _, deptId := range user.DeptIds {
|
||||
|
|
|
@ -71,12 +71,18 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
|
|||
for _, user := range res.Items {
|
||||
ele := make(map[string]interface{})
|
||||
ele["name"] = user.Name
|
||||
ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["union_id"] = user.UnionID
|
||||
ele["user_id"] = user.UserID
|
||||
ele["open_id"] = user.OpenID
|
||||
ele["en_name"] = user.EnName
|
||||
ele["nickname"] = user.Nickname
|
||||
if user.Email != "" {
|
||||
ele["custom_nickname_email"] = strings.Split(user.Email, "@")[0]
|
||||
}
|
||||
if user.EnterpriseEmail != "" {
|
||||
ele["custom_nickname_enterprise_email"] = strings.Split(user.EnterpriseEmail, "@")[0]
|
||||
}
|
||||
ele["email"] = user.Email
|
||||
ele["mobile"] = user.Mobile[3:]
|
||||
ele["gender"] = user.Gender
|
||||
|
|
|
@ -50,13 +50,19 @@ func GetAllUsers() (ret []map[string]interface{}, err error) {
|
|||
for _, user := range users.UserList {
|
||||
ele := make(map[string]interface{})
|
||||
ele["name"] = user.Name
|
||||
ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(user.Name, nil), "")
|
||||
ele["userid"] = user.UserID
|
||||
ele["mobile"] = user.Mobile
|
||||
ele["position"] = user.Position
|
||||
ele["gender"] = user.Gender
|
||||
ele["email"] = user.Email
|
||||
if user.Email != "" {
|
||||
ele["custom_nickname_email"] = strings.Split(user.Email, "@")[0]
|
||||
}
|
||||
ele["biz_email"] = user.BizMail
|
||||
if user.BizMail != "" {
|
||||
ele["custom_nickname_biz_email"] = strings.Split(user.BizMail, "@")[0]
|
||||
}
|
||||
ele["avatar"] = user.Avatar
|
||||
ele["telephone"] = user.Telephone
|
||||
ele["alias"] = user.Alias
|
||||
|
|
Loading…
Reference in New Issue