12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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<MoSystemNotice>
- {
- private IDalSystemNotice dalSystemNotice;
- /// <summary>
- /// 构造函数
- /// </summary>
- public BlSystemNotice() : base()
- {
- base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
- dalSystemNotice = baseDal as IDalSystemNotice;
- dalSystemNotice.OnOperationLog += new OperationLogEventHandler(BlLogOperation.OnOperationLog);
- }
- /// <summary>
- /// 发布系统消息
- /// </summary>
- /// <param name="title">标题</param>
- /// <param name="type">类别1:提示;2:警告;3:报警</param>
- /// <param name="content">内容</param>
- 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);
- }
- }
- }
|