/// <summary> /// 获取群组管理员 /// </summary> /// <param name="groupId">群组Id</param> /// <returns>若没有找到,则返回空集合</returns> public IEnumerable <User> GetGroupManagers(long groupId) { //设计要点: //1、需要缓存,并维护缓存的即时性 IEnumerable <long> manageIds = groupMemberRepository.GetGroupManagers(groupId); return(DIContainer.Resolve <UserService>().GetFullUsers(manageIds)); }
/// <summary> /// 获取群组管理员 /// </summary> /// <param name="groupId">群组Id</param> /// <returns>若没有找到,则返回空集合</returns> public IEnumerable <User> GetGroupManagers(long groupId) { //设计要点: //1、需要缓存,并维护缓存的即时性 IEnumerable <long> manageIds = groupMemberRepository.GetGroupManagers(groupId); UserService userService = new UserService(); return(userService.GetFullUsers(manageIds)); }