|
@@ -480,24 +480,29 @@ namespace GxPress.Service.Implement.Notice
|
|
|
using (TransactionScope transactionScope = new TransactionScope())
|
|
|
{
|
|
|
var query = Q.NewQuery();
|
|
|
- //获取通知
|
|
|
+ //修改通知
|
|
|
await _noticeRepository.UpdateAsync(Q.Where(nameof(Entity.Notice.Id), id).Set(nameof(Entity.Notice.IsRecall), true));
|
|
|
//删除middle
|
|
|
query.Where(nameof(Entity.Middle.Middle.MiddleId), id);
|
|
|
query.Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.AllTypeConst.Inbox.GetHashCode());
|
|
|
query.Where(nameof(Entity.Middle.Middle.IsAdmin), false);
|
|
|
- query.Set(nameof(Entity.Middle.Middle.IsRecall), true);
|
|
|
- await _middleRepository.UpdateAsync(query);
|
|
|
- //删除收件人和抄送人
|
|
|
- await _addresseeRepository.DeleteAsync(id, AllTypeConst.Notice.GetHashCode(), 0);
|
|
|
- //修改为草稿箱
|
|
|
+ //query.Set(nameof(Entity.Middle.Middle.IsRecall), true);
|
|
|
+ await _middleRepository.DeleteAsync(query);
|
|
|
+ //修改middle
|
|
|
query = Q.NewQuery();
|
|
|
query.Where(nameof(Entity.Middle.Middle.MiddleId), id);
|
|
|
- query.Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.FolderTypeConst.Notice.GetHashCode());
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.AllTypeConst.Inbox.GetHashCode());
|
|
|
query.Where(nameof(Entity.Middle.Middle.IsAdmin), true);
|
|
|
- query.Set(nameof(Entity.Middle.Middle.NoticeAddresseeType), 2);
|
|
|
+ query.Set(nameof(Entity.Middle.Middle.IsRecall), true);
|
|
|
await _middleRepository.UpdateAsync(query);
|
|
|
- //修改
|
|
|
+ // //修改为草稿箱
|
|
|
+ // query = Q.NewQuery();
|
|
|
+ // query.Where(nameof(Entity.Middle.Middle.MiddleId), id);
|
|
|
+ // query.Where(nameof(Entity.Middle.Middle.FolderType), GxPress.EnumConst.FolderTypeConst.Notice.GetHashCode());
|
|
|
+ // query.Where(nameof(Entity.Middle.Middle.IsAdmin), true);
|
|
|
+ // query.Set(nameof(Entity.Middle.Middle.NoticeAddresseeType), 2);
|
|
|
+ // await _middleRepository.UpdateAsync(query);
|
|
|
+ //修改未撤回状态
|
|
|
await _noticeRepository.UpdateAsync(Q.Where(nameof(Entity.Notice.Id), id).Set(nameof(Entity.Notice.NoticeType), NoticeTypeConst.Draft.GetHashCode()));
|
|
|
transactionScope.Complete();
|
|
|
}
|