李昊 4 years ago
parent
commit
08a97c4f5f

+ 26 - 26
gx_api/GxPress/Service/GxPress.Service.Implement/Collection/CollectionService.cs

@@ -413,7 +413,7 @@ namespace GxPress.Service.Implement.Collection
 
             }
             //话题类型
-            if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode())
+            if (collectionType == GxPress.EnumConst.AllTypeConst.Topic.GetHashCode())
             {
                 var topic = await _topicRepository.GetAsync(collectionDataId);
                 if (topic == null)
@@ -483,7 +483,7 @@ namespace GxPress.Service.Implement.Collection
             }
 
             //通知
-            if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode())
+            if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode()||collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode()||collectionType == GxPress.EnumConst.AllTypeConst.Anonymity.GetHashCode())
             {
                 var notice = await _noticeRepository.GetAsync(collectionDataId);
                 if (notice == null)
@@ -506,30 +506,30 @@ namespace GxPress.Service.Implement.Collection
                 });
             }
 
-            //站内信
-            if (collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode())
-            {
-                var missive = await _missiveRepository.GetAsync(collectionDataId);
-                if (missive == null)
-                    return new CollectionContentJsonData();
-                var user = await _userRepository.GetAsync(missive.UserId);
-                if (user == null)
-                    return new CollectionContentJsonData();
-                list = new CollectionContentJsonData
-                {
-                    Author = user.Name,
-                    Title = missive.Title,
-                    CreatedData = missive.CreatedDate,
-                    Type = collectionType,
-                    Id = missive.Id,
-                    File = "",
-                    AvatarUrl = StringUtils.AddDomain(user.AvatarUrl),
-                    Name = user.Name,
-                    Data = await GetCollectionContentJsonData(missive.Content),
-                    NickName = user.Nick,
-                    MissiveType = missive.MissiveType
-                };
-            }
+            // //站内信
+            // if (collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode())
+            // {
+            //     var missive = await _missiveRepository.GetAsync(collectionDataId);
+            //     if (missive == null)
+            //         return new CollectionContentJsonData();
+            //     var user = await _userRepository.GetAsync(missive.UserId);
+            //     if (user == null)
+            //         return new CollectionContentJsonData();
+            //     list = new CollectionContentJsonData
+            //     {
+            //         Author = user.Name,
+            //         Title = missive.Title,
+            //         CreatedData = missive.CreatedDate,
+            //         Type = collectionType,
+            //         Id = missive.Id,
+            //         File = "",
+            //         AvatarUrl = StringUtils.AddDomain(user.AvatarUrl),
+            //         Name = user.Name,
+            //         Data = await GetCollectionContentJsonData(missive.Content),
+            //         NickName = user.Nick,
+            //         MissiveType = missive.MissiveType
+            //     };
+            // }
 
             //小组
             if (collectionType == GxPress.EnumConst.AllTypeConst.Group.GetHashCode())