lihao 4 anni fa
parent
commit
e6f2f61625

+ 6 - 3
gx_api/GxPress/Repository/GxPress.Repository.Implement/RecordFolder/RecordFolderRepository.cs

@@ -43,8 +43,11 @@ namespace GxPress.Repository.Implement.RecordFolder
             var middle = new Entity.Middle.Middle();
             if (recordFolder != null)
             {
-                middle = await _middleRepository.GetAsync(recordFolder.FolderId);
-                recordFolder.FolderName = middle != null ? middle.FolderName : "";
+                query = Q.NewQuery();
+                query.Where(nameof(Entity.Middle.Middle.Id), recordFolder.FolderId);
+                query.Where(nameof(Entity.Middle.Middle.IsDelete), false);
+                middle = await _middleRepository.GetAsync(query);
+                recordFolder.FolderName = middle != null ? middle.FolderName : "根目录";
                 recordFolder.FolderId = middle != null ? middle.Id : 0;
                 recordFolder.FolderType = folderType;
                 return recordFolder;
@@ -93,7 +96,7 @@ namespace GxPress.Repository.Implement.RecordFolder
             }
             //修改
             recordFolder.FolderId = folderId;
-            recordFolder.FolderName =middle==null?"根目录":middle.FolderName;
+            recordFolder.FolderName = middle == null ? "根目录" : middle.FolderName;
             return await _repository.UpdateAsync(recordFolder);
         }