李昊 4 years ago
parent
commit
f85778bdba

+ 1 - 1
gx_api/GxPress/Model/GxPress.Result/User/UserResult.cs

@@ -43,7 +43,7 @@ namespace GxPress.Result.User
         /// <summary>
         /// 部门ID
         /// </summary>
-        public IEnumerable<int> DepartmentId { get; set; }
+        public IEnumerable<int> DepartmentIds { get; set; }
         /// <summary>
         /// 角色ID
         /// </summary>

+ 2 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/UserService.cs

@@ -205,12 +205,13 @@ namespace GxPress.Service.Implement
             var items = list.Select(user => _mapper.Map<UserResult>(user)).ToList();
             foreach (var item in items)
             {
+                item.AvatarUrl = StringUtils.AddDomain(item.AvatarUrl);
                 // var departmentName = string.Empty;
                 // //获取部门
                 // departmentName =
                 //     await _departmentRepository.GetDepartmentFullPathAsync(item.DepartmentId, departmentName);
                 // item.DepartmentName = departmentName;
-                item.DepartmentId = await departmentUserRepository.GetDepartmentIdsAsync(item.Id);
+                item.DepartmentIds = await departmentUserRepository.GetDepartmentIdsAsync(item.Id);
                 var role = await _roleRepository.GetAsync(item.RoleId);
                 if (role != null)
                     item.RoleName = role.Name;