|
@@ -133,7 +133,7 @@ namespace GxPress.Service.Implement.Notice
|
|
|
result.PraiseCount = praiseCount;
|
|
|
//是否点赞
|
|
|
result.IsPraise = await _analyzeService.ExistsAsync(analyzeRequest);
|
|
|
- var request = new PraisePageSearchRequest { SourceId = id, TypeValue =AllTypeConst.Notice.GetHashCode(), Page = 1, PerPage = 3 };
|
|
|
+ var request = new PraisePageSearchRequest { SourceId = id, TypeValue = AllTypeConst.Notice.GetHashCode(), Page = 1, PerPage = 3 };
|
|
|
result.NoticePraisePagedList = await _analyzeService.GetPraisePageAsync(request);
|
|
|
//是否是当前用户创建
|
|
|
result.IsAdmin = notice.UserId == userId;
|
|
@@ -315,7 +315,7 @@ namespace GxPress.Service.Implement.Notice
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 根据已读未读查询通知数据
|
|
|
/// </summary>
|
|
@@ -337,6 +337,22 @@ namespace GxPress.Service.Implement.Notice
|
|
|
var result = await _noticeRepository.GetNoticeListPageAsync(request);
|
|
|
foreach (var item in result.Items)
|
|
|
{
|
|
|
+ if (item.TypeValue > 0)
|
|
|
+ {
|
|
|
+ item.UserName = item.SendUserName;
|
|
|
+ item.ReadCount = item.CheckedCount;
|
|
|
+ item.UReadCount = item.UCheckedCount;
|
|
|
+ item.EnjoyUser = item.FlowUserName;
|
|
|
+ //我发起的
|
|
|
+ if (item.TypeValue == AllTypeConst.MySubmitted.GetHashCode())
|
|
|
+ item.IsRead = item.IsMyFlowRead;
|
|
|
+ //我抄送
|
|
|
+ if (item.TypeValue == AllTypeConst.MyCc.GetHashCode())
|
|
|
+ item.IsRead = item.IsFlowRead;
|
|
|
+ //我审批
|
|
|
+ if (item.TypeValue == AllTypeConst.MyChecked.GetHashCode())
|
|
|
+ item.IsRead = item.IsFlowChecked;
|
|
|
+ }
|
|
|
item.Title = _contentJsonService.GetTitile(item.Title, item.Content);
|
|
|
if (item.IsDelete == true)
|
|
|
item.NoticeStatus = 0;
|
|
@@ -360,7 +376,7 @@ namespace GxPress.Service.Implement.Notice
|
|
|
using (TransactionScope transactionScope = new TransactionScope())
|
|
|
{
|
|
|
//删除middle
|
|
|
- await _middleRepository.DeleteAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), id).Where(nameof(Entity.Middle.Middle.FolderType),GxPress.EnumConst.FolderTypeConst.Notice.GetHashCode()).Where(nameof(Entity.Middle.Middle.IsAdmin), false));
|
|
|
+ await _middleRepository.DeleteAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), id).Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.FolderTypeConst.Notice.GetHashCode()).Where(nameof(Entity.Middle.Middle.IsAdmin), false));
|
|
|
//修改为草稿箱
|
|
|
await _middleRepository.UpdateAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), id).Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.FolderTypeConst.Notice.GetHashCode()).Where(nameof(Entity.Middle.Middle.IsAdmin), true).Set(nameof(Entity.Middle.Middle.NoticeAddresseeType), 2));
|
|
|
//修改
|