You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
3.6 KiB
130 lines
3.6 KiB
9 months ago
|
using FY.BLL;
|
||
|
using Platform.Infrastructure.SignalRLayer.Entity;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq.Expressions;
|
||
|
|
||
|
namespace Platform.Infrastructure.SignalRLayer.Service
|
||
|
{
|
||
|
public class SignalRMessage : ISignalRMessage<TBL_SYS_NOTICE>
|
||
|
{
|
||
|
BLL_Common common = new BLL_Common();
|
||
|
|
||
|
/// <summary>
|
||
|
/// 新增
|
||
|
/// </summary>
|
||
|
/// <param name="message">MessageEntity</param>
|
||
|
/// <returns></returns>
|
||
|
public bool Add(TBL_SYS_NOTICE message)
|
||
|
{
|
||
|
return common.Insert<TBL_SYS_NOTICE>(message);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 更新
|
||
|
/// </summary>
|
||
|
/// <param name="message">MessageEntity</param>
|
||
|
/// <returns></returns>
|
||
|
public bool Update(TBL_SYS_NOTICE message)
|
||
|
{
|
||
|
|
||
|
return common.Update<TBL_SYS_NOTICE>(message);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 删除
|
||
|
/// </summary>
|
||
|
/// <param name="message"></param>
|
||
|
/// <returns></returns>
|
||
|
//public bool Delete(MessageEntity message)
|
||
|
//{
|
||
|
// return common.Delete<MessageEntity>(message);
|
||
|
|
||
|
//}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 删除
|
||
|
/// </summary>
|
||
|
/// <param name="expression"></param>
|
||
|
/// <returns></returns>
|
||
|
public bool Delete(Expression<Func<TBL_SYS_NOTICE, bool>> expression)
|
||
|
{
|
||
|
|
||
|
return common.Delete(expression);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询
|
||
|
/// </summary>
|
||
|
/// <param name="expression"></param>
|
||
|
/// <returns></returns>
|
||
|
public TBL_SYS_NOTICE FirstOrDefault(Expression<Func<TBL_SYS_NOTICE, bool>> expression)
|
||
|
{
|
||
|
return common.FirstOrDefault(expression);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询总条数
|
||
|
/// </summary>
|
||
|
/// <param name="expression"></param>
|
||
|
/// <returns></returns>
|
||
|
public int GetTotalCount(Expression<Func<TBL_SYS_NOTICE, bool>> expression)
|
||
|
{
|
||
|
|
||
|
return common.Count<TBL_SYS_NOTICE>(expression);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询所有数据
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public List<TBL_SYS_NOTICE> GetAll()
|
||
|
{
|
||
|
return common.SelectList<TBL_SYS_NOTICE>();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件查询
|
||
|
/// </summary>
|
||
|
/// <param name="expression">条件表达式</param>
|
||
|
/// <returns></returns>
|
||
|
public List<TBL_SYS_NOTICE> GetAllByCondition(Expression<Func<TBL_SYS_NOTICE, bool>> expression)
|
||
|
{
|
||
|
return common.SelectList<TBL_SYS_NOTICE>(expression);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件查询
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件字符串</param>
|
||
|
/// <returns></returns>
|
||
|
public List<TBL_SYS_NOTICE> GetAllByCondition(string condition)
|
||
|
{
|
||
|
return common.SelectList<TBL_SYS_NOTICE>(condition);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件查询单条数据
|
||
|
/// </summary>
|
||
|
/// <param name="expression">条件表达式</param>
|
||
|
/// <returns></returns>
|
||
|
public TBL_SYS_NOTICE GetSingal(Expression<Func<TBL_SYS_NOTICE, bool>> expression)
|
||
|
{
|
||
|
return common.Single<TBL_SYS_NOTICE>(expression);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据主键查询单条数据
|
||
|
/// </summary>
|
||
|
/// <param name="condition">主键条件字符串</param>
|
||
|
/// <returns></returns>
|
||
|
public TBL_SYS_NOTICE GetSingal(string condition)
|
||
|
{
|
||
|
return common.InSingle<TBL_SYS_NOTICE>(condition);
|
||
|
}
|
||
|
}
|
||
|
}
|