李昊 vor 4 Jahren
Ursprung
Commit
9b18d43a0e

+ 2 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -454,7 +454,7 @@ namespace GxPress.Service.Implement.Note
                 result.FolderName = middle != null ? middle.FolderName : "";
             }
             var analyzeRequest = new Request.App.Analyze.AnalyzeRequest();
-            analyzeRequest.TypeValue = 4;
+            analyzeRequest.TypeValue = AllTypeConst.Note.GetHashCode();
             analyzeRequest.AnalyzeType = 1;
             analyzeRequest.SourceId = id;
             analyzeRequest.UserId = userId;
@@ -482,7 +482,7 @@ namespace GxPress.Service.Implement.Note
             await _visitService.AddVisit(userId, 4, id);
             //是否自建
             result.IsAdmin = note.UserId == userId;
-            var praisePageSearchRequest = new PraisePageSearchRequest { SourceId = id, TypeValue = 3, Page = 1, PerPage = 3 };
+            var praisePageSearchRequest = new PraisePageSearchRequest { SourceId = id, TypeValue = AllTypeConst.Note.GetHashCode(), Page = 1, PerPage = 3 };
             result.NotePraisePagedList = await _analyzeService.GetPraisePageAsync(praisePageSearchRequest);
             return result;
         }

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Notice/NoticeService.cs

@@ -133,7 +133,7 @@ namespace GxPress.Service.Implement.Notice
             result.PraiseCount = praiseCount;
             //是否点赞
             result.IsPraise = await _analyzeService.ExistsAsync(analyzeRequest);
-            var request = new PraisePageSearchRequest { SourceId = id, TypeValue = 2, Page = 1, PerPage = 3 };
+            var request = new PraisePageSearchRequest { SourceId = id, TypeValue =AllTypeConst.Notice.GetHashCode(), Page = 1, PerPage = 3 };
             result.NoticePraisePagedList = await _analyzeService.GetPraisePageAsync(request);
             //是否是当前用户创建
             result.IsAdmin = notice.UserId == userId;

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Topic/TopicService.Detail.cs

@@ -71,7 +71,7 @@ namespace GxPress.Service.Implement.Topic
             result.PraiseCount = praiseCount;
             //是否点赞
             result.IsPraise = await _analyzeService.ExistsAsync(analyzeRequest);
-            var praisePageSearchRequest = new PraisePageSearchRequest { SourceId = request.Id, TypeValue = 1, Page = 1, PerPage = 3 };
+            var praisePageSearchRequest = new PraisePageSearchRequest { SourceId = request.Id, TypeValue = GxPress.EnumConst.AllTypeConst.Topic.GetHashCode(), Page = 1, PerPage = 3 };
             result.TopicPraisePagedList = await _analyzeService.GetPraisePageAsync(praisePageSearchRequest);
             return result;
         }