lihao 4 years ago
parent
commit
7d76446058

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

@@ -137,7 +137,7 @@ namespace GxPress.Service.Implement.Note
                         await _visitService.AddVisit(request.UserId, middleInsertTypes.FolderType, noteId);
                     }
                     //添加默认文件夹
-                    await recordFolderRepository.AddAsync(request.FolderId, request.UserId, request.FolderId);
+                    await recordFolderRepository.AddAsync(request.IsTopic ? AllTypeConst.TopicNote.GetHashCode() : AllTypeConst.Note.GetHashCode(), request.UserId, request.FolderId);
                     transactionScope.Complete();
                 }
             }
@@ -614,7 +614,7 @@ namespace GxPress.Service.Implement.Note
                 await _visitService.AddVisit(note.UserId, middleInsertTypes.FolderType, note.Id);
             }
             //添加默认文件夹
-            await recordFolderRepository.AddAsync(note.FolderId, note.UserId, note.FolderId);
+            await recordFolderRepository.AddAsync(note.IsTopic ? AllTypeConst.TopicNote.GetHashCode() : AllTypeConst.Note.GetHashCode(), note.UserId, note.FolderId);
             entity.Title = note.Title;
             entity.IsDraft = note.IsDraft;
             return await _noteRepository.UpdateAsync(entity);