|
@@ -6,8 +6,8 @@ using Datory;
|
|
|
using GxPress.Common.Exceptions;
|
|
|
using GxPress.Common.Page;
|
|
|
using GxPress.Common.Tools;
|
|
|
-using GxPress.Entity.Middle;
|
|
|
using GxPress.Entity.WorkMeeting;
|
|
|
+using GxPress.EnumConst;
|
|
|
using GxPress.Repository.Interface;
|
|
|
using GxPress.Repository.Interface.Collection;
|
|
|
using GxPress.Repository.Interface.Missive;
|
|
@@ -103,14 +103,6 @@ namespace GxPress.Service.Implement.Collection
|
|
|
TypeValue = request.CollectionType,// 10 会议纪要 0 文章 1 话题 2 通知 3 笔记 4站内信 12 收藏文件夹 13 笔记文件夹
|
|
|
SourceUserId = request.SourceUserId
|
|
|
};
|
|
|
- if (request.CollectionType == 1)
|
|
|
- analyzeRequest.TypeValue = 0;
|
|
|
- if (request.CollectionType == 2)
|
|
|
- analyzeRequest.TypeValue = 1;
|
|
|
- if (request.CollectionType == 4)
|
|
|
- analyzeRequest.TypeValue = 3;
|
|
|
- if (request.CollectionType == 5)
|
|
|
- analyzeRequest.TypeValue = 2;
|
|
|
if (findCollection != null)
|
|
|
{
|
|
|
await _collectionRepository.DeleteAsync(findCollection.Id);
|
|
@@ -121,24 +113,24 @@ namespace GxPress.Service.Implement.Collection
|
|
|
return true;
|
|
|
}
|
|
|
//收藏文章
|
|
|
- if (request.CollectionType == 1)
|
|
|
+ if (request.CollectionType == AllTypeConst.Article.GetHashCode())
|
|
|
{
|
|
|
var article = await _articleRepository.GetArticleAsync(request.CollectionDataId);
|
|
|
collection.Title = article.Title;
|
|
|
- analyzeRequest.TypeValue = 0;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
//话题
|
|
|
- else if (request.CollectionType == 2)
|
|
|
+ else if (request.CollectionType == AllTypeConst.Notice.GetHashCode())
|
|
|
{
|
|
|
var topic = await _topicRepository.GetAsync(request.CollectionDataId);
|
|
|
collection.Title = topic.Title;
|
|
|
//收藏
|
|
|
- analyzeRequest.TypeValue = 1;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
//收藏收藏
|
|
|
- else if (request.CollectionType == 3)
|
|
|
+ else if (request.CollectionType == AllTypeConst.Collect.GetHashCode())
|
|
|
{
|
|
|
//获取
|
|
|
var collectionEntity = await _collectionRepository.GetAsync(request.CollectionDataId);
|
|
@@ -146,45 +138,45 @@ namespace GxPress.Service.Implement.Collection
|
|
|
collection.EndCollectionType = collectionEntity.EndCollectionType;
|
|
|
}
|
|
|
//笔记
|
|
|
- else if (request.CollectionType == 4 || request.CollectionType == 21)
|
|
|
+ else if (request.CollectionType == AllTypeConst.Note.GetHashCode() || request.CollectionType == 21)
|
|
|
{
|
|
|
//收藏
|
|
|
- analyzeRequest.TypeValue = 3;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
var note = await _noteRepository.GetAsync(request.CollectionDataId);
|
|
|
collection.Title = note.Title;
|
|
|
}
|
|
|
//通知
|
|
|
- else if (request.CollectionType == 5)
|
|
|
+ else if (request.CollectionType == AllTypeConst.Notice.GetHashCode())
|
|
|
{
|
|
|
//通知
|
|
|
- analyzeRequest.TypeValue = 2;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
var notice = await _noticeRepository.GetAsync(request.CollectionDataId);
|
|
|
collection.Title = notice.Title;
|
|
|
}
|
|
|
//站内信
|
|
|
- else if (request.CollectionType == 6)
|
|
|
+ else if (request.CollectionType == AllTypeConst.Missive.GetHashCode())
|
|
|
{
|
|
|
var missive = await _missiveRepository.GetAsync(request.CollectionDataId);
|
|
|
collection.Title = missive.Title;
|
|
|
//站内信
|
|
|
- analyzeRequest.TypeValue = 4;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
//收藏会议
|
|
|
- if (request.CollectionType == 8)
|
|
|
+ if (request.CollectionType == AllTypeConst.Meeting.GetHashCode())
|
|
|
{
|
|
|
var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.MeetingId), request.CollectionDataId));
|
|
|
if (meetingSummary == null)
|
|
|
throw new BusinessException("会议无效");
|
|
|
collection.Title = meetingSummary.Title;
|
|
|
//收藏会议
|
|
|
- analyzeRequest.TypeValue = 10;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
//文件
|
|
|
- if (request.CollectionType == 300)
|
|
|
+ if (request.CollectionType == AllTypeConst.File.GetHashCode())
|
|
|
{
|
|
|
//获取文件信息
|
|
|
var fileLibrary = await fileLibraryRepository.GetFileLibraryByIdAsync(collection.CollectionDataId);
|
|
@@ -193,18 +185,18 @@ namespace GxPress.Service.Implement.Collection
|
|
|
collection.Title = fileLibrary.FileName;
|
|
|
}
|
|
|
//会议纪要
|
|
|
- if (request.CollectionType == 400)
|
|
|
+ if (request.CollectionType == AllTypeConst.MeetingSummary.GetHashCode())
|
|
|
{
|
|
|
var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.Id), request.CollectionDataId));
|
|
|
if (meetingSummary == null)
|
|
|
throw new BusinessException("会议无效");
|
|
|
collection.Title = meetingSummary.Title;
|
|
|
//会议纪要
|
|
|
- analyzeRequest.TypeValue = 10;
|
|
|
+ analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
//收藏、笔记文件
|
|
|
- if (request.CollectionType == 12 || request.CollectionType == 13)
|
|
|
+ if (request.CollectionType == AllTypeConst.NoteFolder.GetHashCode() || request.CollectionType == AllTypeConst.CollectFolder.GetHashCode())
|
|
|
{
|
|
|
if (request.CollectionDataId > 0)
|
|
|
{
|
|
@@ -219,7 +211,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
if (user == null)
|
|
|
throw new BusinessException("用户不存在!");
|
|
|
collection.Title = $"{user.Name}的";
|
|
|
- collection.Title += request.CollectionType == 12 ? "收藏" : "笔记";
|
|
|
+ collection.Title += request.CollectionType == AllTypeConst.CollectFolder.GetHashCode() ? "收藏" : "笔记";
|
|
|
}
|
|
|
//笔记文件
|
|
|
analyzeRequest.TypeValue = request.CollectionType;
|
|
@@ -231,7 +223,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
{
|
|
|
AttributeValue = 1,
|
|
|
FolderId = request.FolderId,
|
|
|
- FolderType = 3,
|
|
|
+ FolderType = AllTypeConst.Collect.GetHashCode(),
|
|
|
MiddleId = collectionId,
|
|
|
MiddleSonId = 0,
|
|
|
UserId = request.UserId
|
|
@@ -254,19 +246,19 @@ namespace GxPress.Service.Implement.Collection
|
|
|
if (string.IsNullOrWhiteSpace(item.Title))
|
|
|
{
|
|
|
item.Title = "";
|
|
|
- if (item.Data.Type == 1)
|
|
|
+ if (item.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Title;
|
|
|
- else if (item.Data.Type == 400)
|
|
|
+ else if (item.Data.Type == AllTypeConst.MeetingSummary.GetHashCode())
|
|
|
item.Title = item.Data.Title;
|
|
|
else
|
|
|
{
|
|
|
if (item.Data.Data != null)
|
|
|
{
|
|
|
- if (item.Data.Type == 1)
|
|
|
+ if (item.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Text;
|
|
|
- else if (item.Data.Data.Type == 1)
|
|
|
+ else if (item.Data.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Data.Text;
|
|
|
- else if (item.Data.Data.Type == 2)
|
|
|
+ else if (item.Data.Data.Type == AllTypeConst.Image.GetHashCode())
|
|
|
item.Title = "[图片]";
|
|
|
else
|
|
|
item.Title = "[附件]";
|
|
@@ -300,7 +292,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
analyzeRequest.CommentId = 0;
|
|
|
analyzeRequest.SourceId = request.FolderId;
|
|
|
analyzeRequest.UserId = request.UserId;
|
|
|
- analyzeRequest.TypeValue = 12;
|
|
|
+ analyzeRequest.TypeValue = AllTypeConst.CollectFolder.GetHashCode();
|
|
|
result.IsCollect = await _analyzeService.ExistsSourceUserAsync(analyzeRequest);
|
|
|
analyzeRequest.AnalyzeType = 4;
|
|
|
result.RetransmissionCount = await _analyzeService.RetransmissionCountAsync(analyzeRequest);
|
|
@@ -311,52 +303,26 @@ namespace GxPress.Service.Implement.Collection
|
|
|
if (string.IsNullOrWhiteSpace(item.Title))
|
|
|
{
|
|
|
item.Title = "";
|
|
|
- if (item.Data.Type == 1)
|
|
|
+ if (item.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Title;
|
|
|
- else if (item.Data.Type == 400)
|
|
|
+ else if (item.Data.Type == AllTypeConst.MeetingSummary.GetHashCode())
|
|
|
item.Title = item.Data.Title;
|
|
|
else
|
|
|
{
|
|
|
if (item.Data.Data != null)
|
|
|
{
|
|
|
- if (item.Data.Type == 1)
|
|
|
+ if (item.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Text;
|
|
|
- else if (item.Data.Data.Type == 1)
|
|
|
+ else if (item.Data.Data.Type == AllTypeConst.Text.GetHashCode())
|
|
|
item.Title = item.Data.Data.Text;
|
|
|
- else if (item.Data.Data.Type == 2)
|
|
|
+ else if (item.Data.Data.Type == AllTypeConst.Image.GetHashCode())
|
|
|
item.Title = "[图片]";
|
|
|
else
|
|
|
item.Title = "[附件]";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // //获取文件夹数量
|
|
|
- // if (item.AttributeValue == 2)
|
|
|
- // {
|
|
|
- // var missiveCount =
|
|
|
- // await _middleRepository.CountAsync(
|
|
|
- // Q.Where(nameof(Entity.Middle.Middle.ParentId), item.Id)
|
|
|
- // .Where(nameof(Entity.Middle.Middle.IsDelete), false));
|
|
|
- // // //获取文件夹数量
|
|
|
- // // var missiveFolderCount =
|
|
|
- // // await _middleRepository.CountAsync(
|
|
|
- // // Q.Where(nameof(Entity.Middle.Middle.ParentId), item.Id)
|
|
|
- // // .Where(nameof(Entity.Middle.Middle.FolderType), 3)
|
|
|
- // // .Where(nameof(Entity.Middle.Middle.IsDelete), false).Where(nameof(Entity.Middle.Middle.AttributeValue),2));
|
|
|
- // //文件夹里面数量
|
|
|
- // item.FileCount = missiveCount;
|
|
|
- // }
|
|
|
- //获取共享人员
|
|
|
- // if (item.RoleId == 3)
|
|
|
- // {
|
|
|
- // var sourceId = item.Id;
|
|
|
- // if (item.ParentId > 0)
|
|
|
- // sourceId = item.MiddleSonId;
|
|
|
- // var userMiddles = await _userMiddleService.FindUserMiddlesAsync(item.FolderType, sourceId);
|
|
|
- // item.EnjoyUser = StringUtils.ObjectCollectionToString(userMiddles.Select(n => n.SourceName), "、");
|
|
|
- // // var folderUsers = await _folderUserRepository.GetAllAsync(Q.Where(nameof(FolderUser.MiddleId), item.Id).OrderByDesc(nameof(FolderUser.CreatedDate)).Take(10));
|
|
|
- // // item.EnjoyUser = StringUtils.ObjectCollectionToString(folderUsers.Select(n => n.UserName), "、");
|
|
|
- // }
|
|
|
+
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -370,12 +336,10 @@ namespace GxPress.Service.Implement.Collection
|
|
|
{
|
|
|
//var middle = await _middleRepository.GetMiddleAsync(middleId);
|
|
|
var collection = await _collectionRepository.GetAsync(middleId);
|
|
|
- if (collection.CollectionType == 3)
|
|
|
+ if (collection.CollectionType == AllTypeConst.Collect.GetHashCode())
|
|
|
await GetCollectionRecursion(collection.CollectionType);
|
|
|
return collection;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 笔记解析
|
|
|
/// </summary>
|
|
@@ -384,45 +348,30 @@ namespace GxPress.Service.Implement.Collection
|
|
|
public async Task<CollectionContentJsonData> AnalyzeAsync(List<CollectionContentJsonData> data)
|
|
|
{
|
|
|
var result = new CollectionContentJsonData();
|
|
|
- var fileCount = data.Count(n => n.Type == 3);
|
|
|
+ var fileCount = data.Count(n => n.Type == AllTypeConst.File.GetHashCode());
|
|
|
//提取图片
|
|
|
- if (data.Any(n => n.Type == 2))
|
|
|
+ if (data.Any(n => n.Type == AllTypeConst.Image.GetHashCode()))
|
|
|
{
|
|
|
- var contentJsonData = new CollectionContentJsonData { FileCount = fileCount, Type = 2 };
|
|
|
+ var contentJsonData = new CollectionContentJsonData { FileCount = fileCount, Type = AllTypeConst.Image.GetHashCode() };
|
|
|
//获取图片
|
|
|
- var imgList = data.Where(n => n.Type == 2);
|
|
|
+ var imgList = data.Where(n => n.Type == AllTypeConst.Image.GetHashCode());
|
|
|
contentJsonData.ArticleImgUrl = imgList.Select(n => StringUtils.AddDomain(n.File)).ToList();
|
|
|
result = (contentJsonData);
|
|
|
return result;
|
|
|
}
|
|
|
//提取文字
|
|
|
- if (data.Any(n => n.Type == 1))
|
|
|
+ if (data.Any(n => n.Type == AllTypeConst.Text.GetHashCode()))
|
|
|
{
|
|
|
- var contentJsonData = new CollectionContentJsonData { FileCount = fileCount, Type = 1 };
|
|
|
+ var contentJsonData = new CollectionContentJsonData { FileCount = fileCount, Type = AllTypeConst.Text.GetHashCode() };
|
|
|
//获取图片
|
|
|
- var textList = data.Where(n => n.Type == 1);
|
|
|
+ var textList = data.Where(n => n.Type == AllTypeConst.Text.GetHashCode());
|
|
|
contentJsonData.Text = textList.FirstOrDefault().Text;
|
|
|
result = (contentJsonData);
|
|
|
return result;
|
|
|
}
|
|
|
//获取
|
|
|
- foreach (var item in data.Where(n => n.Type != 1 && n.Type != 3))
|
|
|
- {
|
|
|
- if (item.Type == 4)
|
|
|
- //4 Article:文章 5 notice通知 6 topic话题 7 note笔记 8 collection收藏 9站内信 10小组 11会议
|
|
|
- item.Type = 1;
|
|
|
- else if (item.Type == 6)
|
|
|
- item.Type = 2;
|
|
|
- else if (item.Type == 7)
|
|
|
- item.Type = 4;
|
|
|
- else if (item.Type == 8)
|
|
|
- item.Type = 3;
|
|
|
- else if (item.Type == 9)
|
|
|
- item.Type = 6;
|
|
|
- else if (item.Type == 10)
|
|
|
- item.Type = 7;
|
|
|
- else if (item.Type == 11)
|
|
|
- item.Type = 8;
|
|
|
+ foreach (var item in data.Where(n => n.Type != AllTypeConst.Text.GetHashCode() && n.Type != AllTypeConst.File.GetHashCode()))
|
|
|
+ {
|
|
|
return await StructCollectionData(item.Id, item.Type, 0);
|
|
|
}
|
|
|
return result;
|
|
@@ -440,7 +389,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
var list = new CollectionContentJsonData();
|
|
|
//1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8会议 14工作流审核 300 文件 400会议纪要
|
|
|
//文章类型
|
|
|
- if (collectionType == 1)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Article.GetHashCode())
|
|
|
{
|
|
|
var articleResult = await _articleService.GetAsync(collectionDataId, 0);
|
|
|
if (articleResult == null)
|
|
@@ -454,7 +403,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = articleResult.Source,
|
|
|
Title = articleResult.Title,
|
|
|
CreatedData = articleResult.AddDate,
|
|
|
- Type = 4,
|
|
|
+ Type = collectionType,
|
|
|
Id = articleResult.Id,
|
|
|
ArticleImgUrl = articleImgUrl,
|
|
|
ReadCount = articleResult.ReadCount
|
|
@@ -462,7 +411,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
|
|
|
}
|
|
|
//话题类型
|
|
|
- if (collectionType == 2)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode())
|
|
|
{
|
|
|
var topic = await _topicRepository.GetAsync(collectionDataId);
|
|
|
if (topic == null)
|
|
@@ -484,7 +433,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = user.Name,
|
|
|
Title = topic.Title,
|
|
|
CreatedData = topic.CreatedDate,
|
|
|
- Type = 6,
|
|
|
+ Type = collectionType,
|
|
|
Id = topic.Id,
|
|
|
File = StringUtils.AddDomain(user.AvatarUrl),
|
|
|
ReadCount = topic.ReadCount,
|
|
@@ -499,7 +448,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
}
|
|
|
|
|
|
//收藏
|
|
|
- if (collectionType == 3)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Collect.GetHashCode())
|
|
|
{
|
|
|
var collection = await GetCollectionRecursion(collectionDataId);
|
|
|
list = await StructCollectionData(collection.EndCollectionDataId, collection.EndCollectionType, collection.SourceUserId);
|
|
@@ -507,7 +456,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
}
|
|
|
|
|
|
//笔记
|
|
|
- if (collectionType == 4 || collectionType == 21)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode() || collectionType == 21)
|
|
|
{
|
|
|
var note = await _noteRepository.GetAsync(collectionDataId);
|
|
|
if (note != null)
|
|
@@ -522,7 +471,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Name = user.Name,
|
|
|
Title = note.Title,
|
|
|
CreatedData = note.CreatedDate,
|
|
|
- Type = collectionType == 4 ? 7 : 2,
|
|
|
+ Type = collectionType,
|
|
|
Id = note.Id,
|
|
|
File = "",
|
|
|
AvatarUrl = StringUtils.AddDomain(user.AvatarUrl),
|
|
@@ -532,7 +481,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
}
|
|
|
|
|
|
//通知
|
|
|
- if (collectionType == 5)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode())
|
|
|
{
|
|
|
var notice = await _noticeRepository.GetAsync(collectionDataId);
|
|
|
if (notice == null)
|
|
@@ -545,7 +494,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = user.Name,
|
|
|
Title = notice.Title,
|
|
|
CreatedData = notice.CreatedDate,
|
|
|
- Type = 5,
|
|
|
+ Type = collectionType,
|
|
|
Id = notice.Id,
|
|
|
File = "",
|
|
|
AvatarUrl = StringUtils.AddDomain(user.AvatarUrl),
|
|
@@ -556,7 +505,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
}
|
|
|
|
|
|
//站内信
|
|
|
- if (collectionType == 6)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode())
|
|
|
{
|
|
|
var missive = await _missiveRepository.GetAsync(collectionDataId);
|
|
|
if (missive == null)
|
|
@@ -569,7 +518,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = user.Name,
|
|
|
Title = missive.Title,
|
|
|
CreatedData = missive.CreatedDate,
|
|
|
- Type = 9,
|
|
|
+ Type = collectionType,
|
|
|
Id = missive.Id,
|
|
|
File = "",
|
|
|
AvatarUrl = StringUtils.AddDomain(user.AvatarUrl),
|
|
@@ -581,7 +530,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
}
|
|
|
|
|
|
//小组
|
|
|
- if (collectionType == 7)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Group.GetHashCode())
|
|
|
{
|
|
|
var group = await _groupRepository.GetAsync(collectionDataId);
|
|
|
var user = await _userRepository.GetAsync(group.UserId);
|
|
@@ -592,7 +541,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = user.Name,
|
|
|
Title = group.Name,
|
|
|
CreatedData = group.CreatedDate,
|
|
|
- Type = 10,
|
|
|
+ Type = collectionType,
|
|
|
Id = group.Id,
|
|
|
File = StringUtils.AddDomain(group.AvatarUrl),
|
|
|
Name = user.Name,
|
|
@@ -600,7 +549,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
};
|
|
|
}
|
|
|
//会议
|
|
|
- if (collectionType == 8)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Meeting.GetHashCode())
|
|
|
{
|
|
|
var meetingSummary = await _meetingSummaryRepository.GetAsync(Q.Where(nameof(MeetingSummary.MeetingId), collectionDataId));
|
|
|
if (meetingSummary == null)
|
|
@@ -613,7 +562,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = "",
|
|
|
Title = meetingSummary.Title,
|
|
|
CreatedData = meetingSummary.CreatedDate,
|
|
|
- Type = 11,
|
|
|
+ Type = collectionType,
|
|
|
Id = meetingSummary.Id,
|
|
|
File = "",
|
|
|
Name = user.Name,
|
|
@@ -623,7 +572,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
//工作流
|
|
|
|
|
|
//300 文件
|
|
|
- if (collectionType == 300)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.Flow.GetHashCode())
|
|
|
{
|
|
|
var fileLibrary = await fileLibraryRepository.GetFileLibraryByIdAsync(collectionDataId);
|
|
|
if (fileLibrary == null)
|
|
@@ -634,7 +583,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = "",
|
|
|
Title = fileLibrary.FileName,
|
|
|
CreatedData = fileLibrary.CreatedData,
|
|
|
- Type = 3,
|
|
|
+ Type = collectionType,
|
|
|
Id = fileLibrary.Id,
|
|
|
File = StringUtils.AddDomain(fileLibrary.FileUrl),
|
|
|
MinFile = fileLibrary.FileType == "image" ? StringUtils.AddDomainMin(fileLibrary.FileUrl) : "",
|
|
@@ -647,7 +596,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
};
|
|
|
}
|
|
|
//400 会议纪要
|
|
|
- if (collectionType == 400)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.MeetingSummary.GetHashCode())
|
|
|
{
|
|
|
var meetingSummary = await _meetingSummaryRepository.GetAsync(collectionDataId);
|
|
|
if (meetingSummary == null)
|
|
@@ -660,7 +609,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
Author = user.Name,
|
|
|
Title = meetingSummary.Title,
|
|
|
CreatedData = meetingSummary.CreatedDate,
|
|
|
- Type = 400,
|
|
|
+ Type = collectionType,
|
|
|
Id = meetingSummary.Id,
|
|
|
File = "",
|
|
|
MinFile = "",
|
|
@@ -673,7 +622,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
};
|
|
|
}
|
|
|
//收藏笔记文件夹
|
|
|
- if (collectionType == 12 || collectionType == 13)
|
|
|
+ if (collectionType == GxPress.EnumConst.AllTypeConst.NoteFolder.GetHashCode() || collectionType == GxPress.EnumConst.AllTypeConst.CollectFolder.GetHashCode())
|
|
|
{
|
|
|
if (sourceUserId == 0)
|
|
|
return new CollectionContentJsonData();
|