lihao преди 4 години
родител
ревизия
ea00487a1d

+ 33 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Collection/CollectionService.cs

@@ -287,6 +287,7 @@ namespace GxPress.Service.Implement.Collection
                                 item.Data.Title = "[图片]";
                             else
                                 item.Data.Title = "[附件]";
+                            item.Title = item.Data.Text;
                         }
                     }
                 }
@@ -435,6 +436,38 @@ namespace GxPress.Service.Implement.Collection
                 };
 
             }
+            if (collectionType == GxPress.EnumConst.AllTypeConst.TopicNoteAll.GetHashCode())
+            {
+                var user = await _userRepository.GetAsync(sourceUserId);
+                if (user == null)
+                    return new CollectionContentJsonData();
+                list = new CollectionContentJsonData
+                {
+                    Name = user.Name,
+                    Title = "",
+                    Type = collectionType,
+                    Id = user.Id,
+                    SourceUserId = sourceUserId
+                };
+            }
+            if (collectionType == GxPress.EnumConst.AllTypeConst.TopicNoteFolder.GetHashCode())
+            {
+                var middle = await _middleRepository.GetMiddleAsync(collectionDataId);
+                if (middle == null)
+                    return new CollectionContentJsonData();
+                var user = await _userRepository.GetAsync(sourceUserId);
+                if (user == null)
+                    return new CollectionContentJsonData();
+                list = new CollectionContentJsonData
+                {
+                    Name = middle.FolderName,
+                    Title = "",
+                    Type = collectionType,
+                    Id = middle.Id,
+                    Author = user.Name,
+                    SourceUserId = sourceUserId
+                };
+            }
             //话题类型
             if (collectionType == GxPress.EnumConst.AllTypeConst.Topic.GetHashCode())
             {

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -244,7 +244,7 @@ namespace GxPress.Service.Implement.Note
                 analyzeRequest.CommentId = 0;
                 analyzeRequest.SourceId = request.FolderId;
                 analyzeRequest.UserId = request.UserId;
-                analyzeRequest.TypeValue = AllTypeConst.TopicNote.GetHashCode();
+                analyzeRequest.TypeValue = request.FolderId == 0 ? AllTypeConst.TopicNoteAll.GetHashCode() : AllTypeConst.TopicNoteFolder.GetHashCode();
                 result.IsCollect = await _analyzeService.ExistsSourceUserAsync(analyzeRequest);
                 analyzeRequest.AnalyzeType = 4;
                 result.RetransmissionCount = await _analyzeService.RetransmissionCountAsync(analyzeRequest);