调整分组name_pinyin的字段名 (#56)
This commit is contained in:
parent
474c40421a
commit
81d571472c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue