李昊 4 years ago
parent
commit
192b4ef905

+ 1 - 1
gx_api/GxPress/Model/GxPress.Request/UserMiddle/UserMiddleInRequest.cs

@@ -20,7 +20,7 @@ namespace GxPress.Request.UserMiddle
         /// <value></value>
         public int MiddleType { get; set; }
         /// <summary>
-        ///  来源类型 0 用户 1 部门 2系统 3 自建分组
+        ///  来源类型 0 用户 1 部门 2系统 3 自建分组 4其他
         /// </summary>
         /// <value></value>
         public int SourceType { get; set; }

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

@@ -130,7 +130,7 @@ namespace GxPress.Service.Implement.Note
                     };
                     await _middleService.InsertAsync(middleInsertTypes);
                     //修改话题访问量
-                    await _visitService.AddVisit(request.UserId, AllTypeConst.Note.GetHashCode(), noteId);
+                    await _visitService.AddVisit(request.UserId, middleInsertTypes.FolderType, noteId);
                     //添加默认文件夹
                     await recordFolderRepository.AddAsync(request.FolderId, request.UserId, request.FolderId);
                     transactionScope.Complete();

+ 6 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Visit/VisitService.cs

@@ -67,6 +67,12 @@ namespace GxPress.Service.Implement.Visit
                     note.ReadCount++;
                     await _noteRepository.UpdateAsync(note);
                 }
+                if (typeId == AllTypeConst.TopicNote.GetHashCode())
+                {
+                    var note = await _noteRepository.GetAsync(sourceId);
+                    note.ReadCount++;
+                    await _noteRepository.UpdateAsync(note);
+                }
                 return true;
             }
             return false;