lihao 4 年 前
コミット
46b45032d3

+ 1 - 0
gx_api/GxPress/Api/GxPress.Api/WebControllers/WebNoteController.cs

@@ -56,6 +56,7 @@ namespace GxPress.Api.WebControllers
         public async Task<PagedList<NotePageListRequest>> NotePageList(NoteSearchPageListRequest request)
         {
             request.UserId = _loginContext.AccountId;
+            request.UserId=281;
             return await _noteService.NotePageListAsync(request);
         }
         /// <summary>

+ 8 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/RecordFolder/RecordFolderRepository.cs

@@ -45,7 +45,14 @@ namespace GxPress.Repository.Implement.RecordFolder
                 recordFolder.FolderId = 0;
             }
             //获取文件夹
-            var middle = await _middleRepository.GetAsync(Q.Where(nameof(Entity.Middle.Middle.Id), recordFolder.FolderId).Where(nameof(Entity.Middle.Middle.IsDelete), false));
+            query = Q.NewQuery();
+            query.Where(nameof(Entity.Middle.Middle.Id), recordFolder.FolderId);
+            query.Where(nameof(Entity.Middle.Middle.IsDelete), false);
+            if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode())
+                query.Where(nameof(Entity.Middle.Middle.RoleId), 2);
+            if (folderType == GxPress.EnumConst.AllTypeConst.Note.GetHashCode())
+                query.WhereIn(nameof(Entity.Middle.Middle.RoleId), new List<int> { 1, 3 });
+            var middle = await _middleRepository.GetAsync();
             if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode())
             {
                 if (middle == null)