lihao 4 年之前
父節點
當前提交
56afc7117f

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/GroupRepository.cs

@@ -193,7 +193,7 @@ namespace GxPress.Repository.Implement
                                                 tede_topic
                                             WHERE
                                                 GroupId = a.MiddleId)
-                                            AND UserId = 17
+                                            AND UserId = {request.UserId}
                                             AND IsRead = 0) AS UReadTopicCount,
                                 (SELECT 
                                         FolderName

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

@@ -39,11 +39,17 @@ namespace GxPress.Repository.Implement.RecordFolder
             query.Where(nameof(Entity.RecordFolder.RecordFolder.FolderType), folderType);
             query.OrderByDesc(nameof(Entity.RecordFolder.RecordFolder.CreatedDate));
             var recordFolder = await _repository.GetAsync(query);
+            //获取文件夹
+            var middle = new Entity.Middle.Middle();
             if (recordFolder != null)
+            {
+                middle = await _middleRepository.GetAsync(recordFolder.FolderId);
+                recordFolder.FolderName = middle != null ? middle.FolderName : "";
+                recordFolder.FolderId = middle != null ? middle.Id : 0;
+                recordFolder.FolderType = folderType;
                 return recordFolder;
+            }
             recordFolder = new Entity.RecordFolder.RecordFolder();
-            //获取文件夹
-            var middle = new Entity.Middle.Middle();
             if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode())
             {
                 query = Q.NewQuery();