lihao 4 年之前
父節點
當前提交
29b79ffb9d

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

@@ -41,7 +41,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));
+            var middle = await _middleRepository.GetAsync(Q.Where(nameof(Entity.Middle.Middle.Id), recordFolder.FolderId).Where(nameof(Entity.Middle.Middle.IsDelete), false));
+            if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode())
+            {
+                if (middle == null)
+                {
+                    middle = await _middleRepository.GetAsync(Q.Where(nameof(Entity.Middle.Middle.FolderType), folderType).Where(nameof(Entity.Middle.Middle.IsSystemDefault), true));
+                }
+            }
             recordFolder.FolderName = middle != null ? middle.FolderName : "";
             recordFolder.FolderId = middle != null ? middle.Id : 0;
             return recordFolder;