李昊 4 years ago
parent
commit
8c6221b6c9

+ 1 - 1
gx_api/GxPress/Model/GxPress.Entity/AdminVerify.cs

@@ -11,7 +11,7 @@ namespace GxPress.Entity
     public class AdminVerify : Datory.Entity
     {
         /// <summary>
-        /// 类型 1 单聊 2群聊 3小组
+        /// 类型 1 单聊 2群聊 3小组 4 好友
         /// </summary>
         [DataColumn]
         public GroupTypeConst VerifyType { get; set; }

+ 4 - 3
gx_api/GxPress/Service/GxPress.Service.Implement/Article/ArticleService.cs

@@ -14,6 +14,7 @@ using GxPress.Service.Interface.Visit;
 using GxPress.Request.Article;
 using GxPress.Service.Interface.ArticleLabel;
 using GxPress.Entity.Article;
+using GxPress.EnumConst;
 
 namespace GxPress.Service.Implement.Article
 {
@@ -109,7 +110,7 @@ namespace GxPress.Service.Implement.Article
                 imageUrls[i] = StringUtils.AddDomain(imageUrls[i]);
             articleResult.ImageUrls = imageUrls;
             var analyzeRequest = new Request.App.Analyze.AnalyzeRequest();
-            analyzeRequest.TypeValue = 0;
+            analyzeRequest.TypeValue = AllTypeConst.Article.GetHashCode();
             analyzeRequest.AnalyzeType = 1;
             analyzeRequest.SourceId = id;
             analyzeRequest.UserId = userId;
@@ -117,7 +118,7 @@ namespace GxPress.Service.Implement.Article
             articleResult.PraiseCount = await _analyzeService.CountAsync(analyzeRequest);
             //获取话题的评论数量
             var commentCount =
-                await _commentRepository.CountAsync(Q.Where(nameof(Entity.Comment.ArticleId), id).Where(nameof(Entity.Comment.TypeValue), 0).Where(nameof(Entity.Comment.Pid), 0));
+                await _commentRepository.CountAsync(Q.Where(nameof(Entity.Comment.ArticleId), id).Where(nameof(Entity.Comment.TypeValue), AllTypeConst.Article.GetHashCode()).Where(nameof(Entity.Comment.Pid), 0));
             articleResult.CommentCount = commentCount;
             //获取话题的转发数量
             analyzeRequest.AnalyzeType = 4;
@@ -136,7 +137,7 @@ namespace GxPress.Service.Implement.Article
             articleResult.PraiseCount = praiseCount;
             //是否点赞
             articleResult.IsPraise = await _analyzeService.ExistsAsync(analyzeRequest);
-            var request = new PraisePageSearchRequest { SourceId = id, TypeValue = 0, Page = 1, PerPage = 3 };
+            var request = new PraisePageSearchRequest { SourceId = id, TypeValue =AllTypeConst.Article.GetHashCode(), Page = 1, PerPage = 3 };
             articleResult.ArticlePraisePagedList = await _analyzeService.GetPraisePageAsync(request);
             return articleResult;
         }