using ProjectBase.Data.BaseDAL; using ProjectBase.Data.Redis; using SIMDP.DAL.IDALSQL; using SIMDP.Model; using SIMDP.Util; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SIMDP.BLL { public class BlSystemNotice : BaseBLL { private IDalSystemNotice dalSystemNotice; /// /// 构造函数 /// public BlSystemNotice() : base() { base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name); dalSystemNotice = baseDal as IDalSystemNotice; dalSystemNotice.OnOperationLog += new OperationLogEventHandler(BlLogOperation.OnOperationLog); } /// /// 发布系统消息 /// /// 标题 /// 类别1:提示;2:警告;3:报警 /// 内容 public void PublishSysMessage(string title, int type, string content) { string message = null; message = title + "|" + type + "|" + content + "|" + DateTime.Now.ToString() + "|" + "False"; RedisHelper redis = new RedisHelper(); redis.Publish(SysEnvironment.SystemMessage, message); } } }