新增系统通知实时通知给连接的客户端

This commit is contained in:
不做码农
2022-03-01 14:04:21 +08:00
parent 06b81d5f5e
commit 267469dc55
11 changed files with 148 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using ZR.Model.Models;
namespace ZR.Service.System.IService
@@ -11,5 +12,6 @@ namespace ZR.Service.System.IService
/// </summary>
public interface ISysNoticeService: IBaseService<SysNotice>
{
List<SysNotice> GetSysNotices();
}
}

View File

@@ -1,5 +1,7 @@
using Infrastructure;
using Infrastructure.Attribute;
using SqlSugar;
using System.Collections.Generic;
using ZR.Model.Models;
using ZR.Repository;
using ZR.Repository.System;
@@ -24,6 +26,20 @@ namespace ZR.Service.System
#region
/// <summary>
/// 查询系统通知
/// </summary>
/// <returns></returns>
public List<SysNotice> GetSysNotices()
{
//开始拼装查询条件
var predicate = Expressionable.Create<SysNotice>();
//搜索条件查询语法参考Sqlsugar
predicate = predicate.And(m => m.Status == "0");
return _SysNoticerepository.GetList(predicate.ToExpression());
}
#endregion
}
}