浏览代码

组织架构

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
 	}
 	// 匹配系统用户