diff --git a/public/client/dingtalk/dingtalk.go b/public/client/dingtalk/dingtalk.go index adc40d1..580ceb0 100644 --- a/public/client/dingtalk/dingtalk.go +++ b/public/client/dingtalk/dingtalk.go @@ -20,9 +20,9 @@ func GetAllDepts() (ret []map[string]interface{}, err error) { for _, dept := range depts.Dept { ele := make(map[string]interface{}) ele["id"] = dept.Id - ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") ele["name"] = dept.Name ele["parentid"] = dept.ParentId + ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") ret = append(ret, ele) } return diff --git a/public/client/feishu/feishu.go b/public/client/feishu/feishu.go index 15e1a47..98ad47a 100644 --- a/public/client/feishu/feishu.go +++ b/public/client/feishu/feishu.go @@ -31,7 +31,7 @@ func GetAllDepts() (ret []map[string]interface{}, err error) { for _, dept := range res.Items { ele := make(map[string]interface{}) ele["name"] = dept.Name - ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") + ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") ele["parent_department_id"] = dept.ParentDepartmentID ele["department_id"] = dept.DepartmentID ele["open_department_id"] = dept.OpenDepartmentID diff --git a/public/client/wechat/wecom.go b/public/client/wechat/wecom.go index 22b331c..8c9d750 100644 --- a/public/client/wechat/wecom.go +++ b/public/client/wechat/wecom.go @@ -21,7 +21,7 @@ func GetAllDepts() (ret []map[string]interface{}, err error) { for _, dept := range depts.Department { ele := make(map[string]interface{}) ele["name"] = dept.Name - ele["name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") + ele["custom_name_pinyin"] = strings.Join(pinyin.LazyConvert(dept.Name, nil), "") ele["id"] = dept.ID ele["name_en"] = dept.NameEn ele["parentid"] = dept.ParentID