李昊 4 years ago
parent
commit
e0aca396d8

+ 2 - 1
gx_api/GxPress/Api/GxPress.Api/AppControllers/ArticleController.cs

@@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Mvc;
 using GxPress.Repository.Interface.WorkFlow;
 using GxPress.Request.App.Flow;
 using GxPress.Service.Interface.Visit;
+using GxPress.EnumConst;
 
 namespace GxPress.Api.AppControllers
 {
@@ -59,7 +60,7 @@ namespace GxPress.Api.AppControllers
             var blacklistArticles = await _blacklistArticleRepository.GetListAsync(blacklistArticleSearchRequest);
             var pagedList = await _articleRepository.GetUserListAsync(request, blacklistArticles);
             foreach (var item in pagedList.Items)
-                item.ReadCount = await _visitService.GetCountAsync(1, item.Id);
+                item.ReadCount = await _visitService.GetCountAsync(AllTypeConst.Article.GetHashCode(), item.Id);
             var resultList = new List<Result.Article.ArticleResult>();
             if (!string.IsNullOrWhiteSpace(request.Keyword))
             {

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Article/ArticleService.cs

@@ -80,7 +80,7 @@ namespace GxPress.Service.Implement.Article
                 AddDate = article.AddDate,
                 Sort = article.Sort,
                 GroupName = groupName,
-                ReadCount = await _visitService.GetCountAsync(1, article.Id),
+                ReadCount = await _visitService.GetCountAsync(AllTypeConst.Article.GetHashCode(), article.Id),
                 IsTop = article.IsTop,
                 CreatedDate = article.CreatedDate,
                 IsBlocks = article.IsBlocks