ReplyService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Request.Reply;
  4. using GxPress.Result.Reply;
  5. using GxPress.Service.Interface.Reply;
  6. using System.Linq;
  7. namespace GxPress.Service.Implement.Reply
  8. {
  9. /// <summary>
  10. /// 回复
  11. /// </summary>
  12. public partial class ReplyService : IReplyService
  13. {
  14. public ReplyService()
  15. {
  16. }
  17. /// <summary>
  18. /// 获取我收到和我回复的评论
  19. /// </summary>
  20. /// <param name="request"></param>
  21. /// <returns></returns>
  22. public async Task<IEnumerable<ReplyResult>> GetReplyResults(ReplyRequest request)
  23. {
  24. var result = new List<ReplyResult>();
  25. result.AddRange(await GetReplyNoteOrTopicResults(request));
  26. //小组话题
  27. result.AddRange(await GetReplyGroupTopicResults(request));
  28. if (request.TypeValue == 0)
  29. result.AddRange(await GetReceiptCommentResult(request.UserId));
  30. else
  31. result.AddRange(await GetMyReceiptCommentResult(request.UserId));
  32. //站内信 通知
  33. result.AddRange(await GetReplyNoticeTopicResults(request));
  34. result.OrderByDescending(n => n.CreatedDate);
  35. return result;
  36. }
  37. }
  38. }