lihao 4 anni fa
parent
commit
b233436714

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

@@ -68,7 +68,11 @@ namespace GxPress.Repository.Implement.RecordFolder
         /// <returns></returns>
         public async Task<bool> AddAsync(int folderType, int userId, int folderId)
         {
-            var recordFolder = await _repository.GetAsync(Q.Where(nameof(Entity.RecordFolder.RecordFolder.UserId), userId).Where(nameof(Entity.RecordFolder.RecordFolder.FolderType), folderType));
+            var query = Q.NewQuery();
+            query.Where(nameof(Entity.RecordFolder.RecordFolder.UserId), userId);
+            query.Where(nameof(Entity.RecordFolder.RecordFolder.FolderType), folderType);
+            query.Where(nameof(Entity.RecordFolder.RecordFolder.FolderId), folderId);
+            var recordFolder = await _repository.GetAsync(query);
             var middle = await _middleRepository.GetAsync(folderId);
             if (middle == null)
                 return true;