/// <summary> /// 获取群组所有成员用户Id集合(用于推送动态) /// </summary> /// <param name="groupId">群组Id</param> /// <returns></returns> public IEnumerable <long> GetUserIdsOfGroup(long groupId) { GroupEntity group = groupRepository.Get(groupId); if (group == null) { return(new List <long>()); } //不必缓存 IEnumerable <long> userIds = groupMemberRepository.GetUserIdsOfGroup(groupId); var list = userIds.ToList(); list.Add(group.UserId); return(list); }