소스 검색

组织架构

kobe6258 8 달 전
부모
커밋
6cef6692b0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      services/sys_user.go

+ 3 - 0
services/sys_user.go

@@ -15,6 +15,9 @@ func GetSysUserList(condition string, pars []interface{}, startSize, pageSize in
 	}
 	departmentIdToName := make(map[models.DepartmentType]map[int]string)
 	for _, dep := range departmentList {
+		if _, ok := departmentIdToName[dep.Type]; !ok {
+			departmentIdToName[dep.Type] = make(map[int]string)
+		}
 		departmentIdToName[dep.Type][dep.OutId] = dep.SysDepartmentName
 	}
 	// 匹配系统用户