Browse Source

通知公告消息提醒功能

master
zhangli 3 years ago
parent
commit
a2e404b752
1 changed files with 30 additions and 0 deletions
  1. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs View File

@@ -36,6 +36,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
private DataItemIBLL dataItemIbll = new DataItemBLL();
private DepartmentIBLL departmentIbll = new DepartmentBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();
private MessageRindIBLL messageRindIBLL = new MessageRindBLL();


#region 视图功能
/// <summary>
/// 管理页面
@@ -384,6 +387,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
}
}
PushWeixin(needpostuserlist, entity.F_FullHead);
//消息提醒表
PushMessageRemind(needpostuserlist, entity);
return Task.CompletedTask;
}
catch (Exception e)
@@ -460,6 +465,31 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
}
}
}

/// <summary>
/// 消息提醒
/// </summary>
/// <param name="needpostuserlist"></param>
/// <param name="title"></param>
public void PushMessageRemind(List<UserEntity> needpostuserlist, NewsEntity model)
{
foreach (UserEntity userinfo in needpostuserlist)
{
MessageRemindEntity entity = new MessageRemindEntity();
entity.ReceiptId = userinfo.F_UserId;
entity.ReceiptName = userinfo.F_RealName;
entity.SenderId = model.F_CreateUserId;
entity.SenderName = model.F_CreateUserName;
entity.TheTitle = "通知公告";
entity.TheContent = model.F_FullHead;
entity.InstanceId = model.F_NewsId;
entity.ConnectionUrl = "/Utility/ListContentIndex?id=";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
messageRindIBLL.SaveEntity("", entity);
}

}
#endregion

#region 流程


Loading…
Cancel
Save