using System; using System.Collections.Generic; using System.Data; using System.Linq; using WX.CRM.Common; using WX.CRM.DAL.Wx; using WX.CRM.IBLL.Wx; using WX.CRM.Model.Entity; using WX.CRM.Model.MAP; using WX.CRM.Model.QueryMap; namespace WX.CRM.BLL.Wx { public class WX_MESSAGE_BL : DbContextRepository, IWX_MESSAGE { WX_Message_DAL dal = new WX_Message_DAL(); public List GetTopList(decimal maxtPkid, int topNum) { using (var db = new WX.CRM.Model.Entity.crmContext()) { return db.WX_MESSAGE.Where(p => p.PKID > maxtPkid).Take(topNum).ToList(); } } public List GetMessageList(ref Pager pager, string keyword, string tableName, string userNames, string stime, string etime, string customerUserName) { int recordCount = 0; DataTable dt = dal.GetMessage(pager.rows, pager.page, keyword, tableName, userNames, stime, etime, customerUserName, out recordCount); pager.totalRows = recordCount; if (dt != null) { return dt.ToList(); } else { return new List(); } } public void UpdateMessageIsIllegal(string tableName, string userName, string msgSvrid) { dal.UpdateMessageIsIllegal(tableName, userName, msgSvrid); } public List GetMessageCount(string groupId, string inneruserId, DateTime sTime, DateTime eTime) { return dal.GetMessageCount(groupId, inneruserId, sTime, eTime); } public List GetMessageCount2(string groupId, string inneruserId, DateTime sTime, DateTime eTime) { return dal.GetMessageCount2(groupId, inneruserId, sTime, eTime); } } }