李昊 4 years ago
parent
commit
c3dbd1c7aa

+ 0 - 1
gx_api/GxPress/Model/GxPress.Result/User/UserInfoResult.cs

@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 
 namespace GxPress.Result.User
 {

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Department/DepartmentService.cs

@@ -48,7 +48,7 @@ namespace GxPress.Service.Implement.Department
                     var departments = new List<Entity.Department>();
                     await _departmentRepository.GetDepartmentById(item.Id, departments);
                     var userIds = await departmentUserRepository.GetUserIdsByDepartmentIdsAsync(departments.Select(n => n.Id));
-                    item.UserCount = userIds.Count();
+                    item.UserCount = userIds.Distinct().Count();
                 }
 
             }