调整分组name_pinyin的字段名 (#56)

This commit is contained in:
二丫讲梵 2022-07-05 09:30:54 +08:00 committed by GitHub
parent 474c40421a
commit 81d571472c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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