Commit 07cd2b23 authored by 吴春's avatar 吴春

提交代码

parent 9b64eb34
...@@ -447,7 +447,7 @@ namespace Mall.Module.Education ...@@ -447,7 +447,7 @@ namespace Mall.Module.Education
Type = Common.Enum.MiAi.MessageTypeEnum.CircleReply, Type = Common.Enum.MiAi.MessageTypeEnum.CircleReply,
UserId = article.CreateBy ?? 0, UserId = article.CreateBy ?? 0,
SourceId = comment.ArticleId, SourceId = comment.ArticleId,
Content = Common.Plugin.StringHelper.FromUnicodeString( comment.Content), Content = Common.Plugin.StringHelper.FromUnicodeString(comment.Content),
Status = 0, Status = 0,
TenantId = comment.TenantId, TenantId = comment.TenantId,
MallBaseId = comment.MallBaseId, MallBaseId = comment.MallBaseId,
...@@ -549,22 +549,41 @@ namespace Mall.Module.Education ...@@ -549,22 +549,41 @@ namespace Mall.Module.Education
public List<Rb_Education_Dynamic_Extend> GetMiAiAllDynamicList(Rb_Education_Dynamic_Extend model) public List<Rb_Education_Dynamic_Extend> GetMiAiAllDynamicList(Rb_Education_Dynamic_Extend model)
{ {
List<Rb_Education_Dynamic_Extend> articleList = new List<Rb_Education_Dynamic_Extend>(); List<Rb_Education_Dynamic_Extend> articleList = new List<Rb_Education_Dynamic_Extend>();
articleList = articleRepository.GetMiAiAllDynamicList( model); articleList = articleRepository.GetMiAiAllDynamicList(model);
DecoratorDynameicArticle(articleList); DecoratorDynameicArticle(articleList);
return articleList; return articleList;
} }
/// <summary> /// <summary>
/// 动态详情 /// 动态详情
/// </summary> /// </summary>
/// <param name="empId">员工id</param> /// <param name="empId">员工id</param>
/// <param name="articleId">动态id</param> /// <param name="articleId">动态id</param>
/// <returns></returns> /// <returns></returns>
public Rb_Education_Dynamic_Extend GetMiAiDynamicDetial(Rb_Education_Dynamic_Extend model) public Rb_Education_Dynamic_Extend GetMiAiDynamicDetial(Rb_Education_Dynamic_Extend model)
{ {
return articleRepository.GetMiAiDynamicDetial(model); Rb_Education_Dynamic_Extend article = articleRepository.GetMiAiDynamicDetial(model);
if (article == null)
{
return article;
}
article.LikeList = likeRepository.GetDynamicLikeList(new Rb_Education_DynamicLike_Extend { ArticleId = article.Id });
article.CommentList = commentRepository.GetDynamicCommentList(new Rb_Education_DynamicComment_Extend { ArticleId = article.Id });
foreach (var common in article.CommentList)
{
if (common.CommentId != null && common.CommentId > 0)
{
Rb_Education_DynamicComment_Extend byReplayCommon = article.CommentList.Where(t => t.Id == common.CommentId.Value).FirstOrDefault();
if (byReplayCommon != null)
{
common.ByReplyEmName = byReplayCommon.UserName;
common.ByReplyEmpId = byReplayCommon.UserId;
}
}
}
return article;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment