李昊 4 年之前
父节点
当前提交
954f619a9a
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      gx_api/GxPress/Service/GxPress.Service.Implement/Collection/CollectionService.cs

+ 7 - 5
gx_api/GxPress/Service/GxPress.Service.Implement/Collection/CollectionService.cs

@@ -42,6 +42,7 @@ namespace GxPress.Service.Implement.Collection
         private readonly IMissiveRepository _missiveRepository;
         private readonly IMissiveRepository _missiveRepository;
         private readonly IGroupRepository _groupRepository;
         private readonly IGroupRepository _groupRepository;
         private readonly IMeetingSummaryRepository _meetingSummaryRepository;
         private readonly IMeetingSummaryRepository _meetingSummaryRepository;
+        private readonly IMeetingRepository meetingRepository;
         private readonly IMapper _mapper;
         private readonly IMapper _mapper;
         private readonly IFolderUserRepository _folderUserRepository;
         private readonly IFolderUserRepository _folderUserRepository;
         private readonly IAnalyzeService _analyzeService;
         private readonly IAnalyzeService _analyzeService;
@@ -52,7 +53,7 @@ namespace GxPress.Service.Implement.Collection
             IArticleRepository articleRepository, ITopicRepository topicRepository, IMiddleRepository middleRepository,
             IArticleRepository articleRepository, ITopicRepository topicRepository, IMiddleRepository middleRepository,
             INoteRepository noteRepository, IUserRepository userRepository, IArticleService articleService, INoticeRepository noticeRepository,
             INoteRepository noteRepository, IUserRepository userRepository, IArticleService articleService, INoticeRepository noticeRepository,
             IMissiveRepository missiveRepository, IMapper mapper,
             IMissiveRepository missiveRepository, IMapper mapper,
-            IGroupRepository groupRepository, IMeetingSummaryRepository meetingSummaryRepository, IFolderUserRepository folderUserRepository, IAnalyzeService analyzeService, IFileLibraryRepository fileLibraryRepository, IUserMiddleService userMiddleService, IMediaRepository mediaRepository)
+            IGroupRepository groupRepository, IMeetingSummaryRepository meetingSummaryRepository, IFolderUserRepository folderUserRepository, IAnalyzeService analyzeService, IFileLibraryRepository fileLibraryRepository, IUserMiddleService userMiddleService, IMediaRepository mediaRepository, IMeetingRepository meetingRepository)
         {
         {
             _collectionRepository = collectionRepository;
             _collectionRepository = collectionRepository;
             _middleService = middleService;
             _middleService = middleService;
@@ -72,6 +73,7 @@ namespace GxPress.Service.Implement.Collection
             this.fileLibraryRepository = fileLibraryRepository;
             this.fileLibraryRepository = fileLibraryRepository;
             _userMiddleService = userMiddleService;
             _userMiddleService = userMiddleService;
             this.mediaRepository = mediaRepository;
             this.mediaRepository = mediaRepository;
+            this.meetingRepository = meetingRepository;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -186,10 +188,10 @@ namespace GxPress.Service.Implement.Collection
             //收藏会议
             //收藏会议
             if (request.CollectionType == AllTypeConst.Meeting.GetHashCode())
             if (request.CollectionType == AllTypeConst.Meeting.GetHashCode())
             {
             {
-                var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.MeetingId), request.CollectionDataId));
-                if (meetingSummary == null)
+                var meeting = await meetingRepository.GetAsync(request.CollectionDataId);
+                if (meeting == null)
                     throw new BusinessException("会议无效");
                     throw new BusinessException("会议无效");
-                collection.Title = meetingSummary.Title;
+                collection.Title = meeting.Name;
                 //收藏会议
                 //收藏会议
                 analyzeRequest.TypeValue = request.CollectionType;
                 analyzeRequest.TypeValue = request.CollectionType;
                 await _analyzeService.SetAnalyzeAsync(analyzeRequest);
                 await _analyzeService.SetAnalyzeAsync(analyzeRequest);
@@ -208,7 +210,7 @@ namespace GxPress.Service.Implement.Collection
             {
             {
                 var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.Id), request.CollectionDataId));
                 var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.Id), request.CollectionDataId));
                 if (meetingSummary == null)
                 if (meetingSummary == null)
-                    throw new BusinessException("会议无效");
+                    throw new BusinessException("会议纪要无效");
                 collection.Title = meetingSummary.Title;
                 collection.Title = meetingSummary.Title;
                 //会议纪要
                 //会议纪要
                 analyzeRequest.TypeValue = request.CollectionType;
                 analyzeRequest.TypeValue = request.CollectionType;