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.
101 lines
3.2 KiB
101 lines
3.2 KiB
using System;
|
|
using System.Data;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using FangYar.Model.TBL;
|
|
|
|
namespace FangYar.BLL.TBL
|
|
{
|
|
public class SysMessageLogBLL
|
|
{
|
|
|
|
private static readonly IDAL.TBL.SysMessageLogIDAL dal = DALFactory.Factory.GetSysMessageLogDAL();
|
|
|
|
/// <summary>
|
|
/// 根据接收人uid获取未读数
|
|
/// </summary>
|
|
/// <param name="ReceiveId">接收人uid</param>
|
|
/// <returns></returns>
|
|
public int GetPendingCount(string ReceiveId)
|
|
{
|
|
return dal.GetPendingCount(ReceiveId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取符合条件的数量
|
|
/// </summary>
|
|
/// <param name="whereStr"></param>
|
|
/// <returns></returns>
|
|
public int GetListCount(string whereStr)
|
|
{
|
|
return dal.GetListCount(whereStr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据接收人uid获取消息通知(日志)(包含分页)
|
|
/// </summary>
|
|
/// <param name="PageIndex">页码</param>
|
|
/// <param name="PageSize">条数</param>
|
|
/// <param name="ReceiveId">接收人uid</param>
|
|
/// <param name="orderById">点击的本条数据置顶</param>
|
|
/// <returns></returns>
|
|
public DataTable GetList(int PageIndex, int PageSize, string ReceiveId, string state, string orderById)
|
|
{
|
|
return dal.GetList(PageIndex, PageSize, ReceiveId, state, orderById);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据主键ID,获取消息通知(日志)
|
|
/// </summary>
|
|
/// <param name="id">主键ID</param>
|
|
/// <returns></returns>
|
|
public Model.TBL.TBL_MESSAGE_LOG GetModel(string id)
|
|
{
|
|
return dal.GetModel(id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加
|
|
/// </summary>
|
|
/// <param name="logModel">APP消息通知(日志)表</param>
|
|
/// <returns></returns>
|
|
public bool AddLog(TBL_MESSAGE_LOG logModel)
|
|
{
|
|
return dal.AddLog(logModel);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
/// <param name="logModel">APP消息通知(日志)表</param>
|
|
/// <returns></returns>
|
|
public bool EditLog(TBL_MESSAGE_LOG logModel) {
|
|
return dal.EditLog(logModel);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 根据主键ID修改:打开时间、状态
|
|
/// </summary>
|
|
/// <param name="id">主键ID</param>
|
|
/// <param name="openTime">打开时间</param>
|
|
/// <param name="state">状态:0:未读;1:已读</param>
|
|
/// <returns></returns>
|
|
public bool EditLog(string id, string openTime, string state) {
|
|
return dal.EditLog(id, openTime, state);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据接收人ID修改 (将未读状态转为已读状态):打开时间、状态
|
|
/// </summary>
|
|
/// <param name="receiveId">接收人ID</param>
|
|
/// <param name="openTime">打开时间</param>
|
|
/// <param name="state">状态:0:未读;1:已读</param>
|
|
/// <returns></returns>
|
|
public bool EditReceiveLog(string receiveId, string openTime, string state)
|
|
{
|
|
return dal.EditReceiveLog(receiveId, openTime, state);
|
|
}
|
|
}
|
|
}
|
|
|