123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using GxPress.Request.Reply;
- using GxPress.Result.Reply;
- using GxPress.Service.Interface.Reply;
- using System.Linq;
- using GxPress.Repository.Interface.Analyze;
- namespace GxPress.Service.Implement.Reply
- {
- /// <summary>
- /// 回复
- /// </summary>
- public partial class ReplyService : IReplyService
- {
- private readonly IAnalyzeRepository analyzeRepository;
- public ReplyService(IAnalyzeRepository analyzeRepository)
- {
- this.analyzeRepository = analyzeRepository;
- }
- /// <summary>
- /// 获取我收到和我回复的评论
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- public async Task<IEnumerable<ReplyResult>> GetReplyResults(ReplyRequest request)
- {
- var result = new List<ReplyResult>();
- //话题本
- result.AddRange(await GetReplyNoteOrTopicResults(request));
- //小组话题
- result.AddRange(await GetReplyGroupTopicResults(request));
- if (request.TypeValue == 0)
- result.AddRange(await GetReceiptCommentResult(request));
- else
- result.AddRange(await GetMyReceiptCommentResult(request));
- //站内信 通知
- result.AddRange(await GetReplyNoticeTopicResults(request));
- var data = result.OrderByDescending(n => n.CreatedDate);
- return data;
- }
- }
- }
|