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
{
///
/// 回复
///
public partial class ReplyService : IReplyService
{
private readonly IAnalyzeRepository analyzeRepository;
public ReplyService(IAnalyzeRepository analyzeRepository)
{
this.analyzeRepository = analyzeRepository;
}
///
/// 获取我收到和我回复的评论
///
///
///
public async Task> GetReplyResults(ReplyRequest request)
{
var result = new List();
//话题本
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;
}
}
}