/// <summary> /// 获取接收人UserId集合 /// </summary> /// <param name="activityService">动态业务逻辑类</param> /// <param name="activity">动态</param> /// <returns></returns> IEnumerable <long> IActivityReceiverGetter.GetReceiverUserIds(ActivityService activityService, Activity activity) { GroupService groupService = new GroupService(); IEnumerable <long> userIds = groupService.GetUserIdsOfGroup(activity.OwnerId); if (userIds == null) { return(new List <long>()); } return(userIds.Where(n => IsReceiveActivity(activityService, n, activity))); }
/// <summary> /// 获取接收人UserId集合 /// </summary> /// <param name="activityService">动态业务逻辑类</param> /// <param name="activity">动态</param> /// <returns></returns> IEnumerable<long> IActivityReceiverGetter.GetReceiverUserIds(ActivityService activityService, Activity activity) { GroupService groupService = new GroupService(); IEnumerable<long> userIds = groupService.GetUserIdsOfGroup(activity.OwnerId); bool isPublic = false; var group = groupService.Get(activity.OwnerId); if (group != null) isPublic = group.IsPublic; if (userIds == null) return new List<long>(); return userIds.Where(n => IsReceiveActivity(activityService, isPublic, n, activity)); }
/// <summary> /// 获取接收人UserId集合 /// </summary> /// <param name="activityService">动态业务逻辑类</param> /// <param name="activity">动态</param> /// <returns></returns> IEnumerable <long> IActivityReceiverGetter.GetReceiverUserIds(ActivityService activityService, Activity activity) { GroupService groupService = new GroupService(); IEnumerable <long> userIds = groupService.GetUserIdsOfGroup(activity.OwnerId); bool isPublic = false; var group = groupService.Get(activity.OwnerId); if (group != null) { isPublic = group.IsPublic; } if (userIds == null) { return(new List <long>()); } return(userIds.Where(n => IsReceiveActivity(activityService, isPublic, n, activity))); }