/// <summary> /// 查询推送历史 /// </summary> /// <param name="condtion"></param> /// <returns></returns> internal static SearchSentPushListReplayModel RunSearchHistoryPushList(SearchSentPushListRequestModel condtion) { using (SysTemDataBaseDataContext context = new SysTemDataBaseDataContext(SqlConnection)) { SearchSentPushListReplayModel result = new SearchSentPushListReplayModel(); result.total = (from c in context.Us_RunSentPush where (1 == 1) && (condtion.beginDate == null ? true : c.createdOn >= condtion.beginDate) && (condtion.endDate == null ? true : c.createdOn <= condtion.endDate) && (string.IsNullOrEmpty(condtion.keyWords) ? true : (SqlMethods.Like(c.title, string.Format("%{0}%", condtion.keyWords)) || SqlMethods.Like(c.msg, string.Format("%{0}%", condtion.keyWords)))) select c.Us_RunSentPushId).Count(); if (result.total > 0) { result.rows = (from c in context.Us_RunSentPush where (1 == 1) && (condtion.beginDate == null ? true : c.createdOn >= condtion.beginDate) && (condtion.endDate == null ? true : c.createdOn <= condtion.endDate) && (string.IsNullOrEmpty(condtion.keyWords) ? true : (SqlMethods.Like(c.title, string.Format("%{0}%", condtion.keyWords)) || SqlMethods.Like(c.msg, string.Format("%{0}%", condtion.keyWords)))) orderby c.createdOn descending select new SentPushInfoModel { id = c.Us_RunSentPushId, createdBy = BaseSysTemDataBaseManager.SysGetSysUserById(c.createdBy), createdOn = c.createdOn, customInfo = c.customInfo, messageType = (EnumPushMessagesType)c.messageType, msg = c.msg, sentResultAndroid = c.sentResultAndroid, sentResultIos = c.sentResultIos, sentStats = c.sentStats, sentUserNum = c.Us_RunSentPushDetail.Count, title = c.title, sentUserList = (from x in c.Us_RunSentPushDetail select new SentPushInfoDetailInfoModel { sentDeviceInfo = new GeTuiSetModel() { clientId = x.clientId, deviceType = (EnumUserDeviceType)x.deviceType, userId = x.sentUserId }, sentUserInfo = (x.sentUserId == null || x.sentUserId == "") ? null : BaseSysTemDataBaseManager.SysGetSysUserById(x.sentUserId) } ).ToList() }).Skip((condtion.Page - 1) * condtion.PageSize).Take(condtion.PageSize).ToList(); } else { result.rows = new List <SentPushInfoModel>(); } return(result); } }
/// <summary> /// 获取历史推送 /// </summary> /// <param name="condtion"></param> /// <returns></returns> internal static SearchSentPushListReplayModel SearchPushHistoryList(SearchSentPushListRequestModel condtion) { SearchSentPushListReplayModel result = new SearchSentPushListReplayModel(); try { result = SysSmsDataBaseManager.RunSearchHistoryPushList(condtion); } catch (Exception e) { result.rows = new List <SentPushInfoModel>(); SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion); } return(result); }
public SearchSentPushListReplayModel SearchPushHistoryList(SearchSentPushListRequestModel condtion) { SearchSentPushListReplayModel result = PushService.SearchPushHistoryList(condtion); return(result); }
public ActionResult pushhistory(SearchSentPushListRequestModel condtion) { ViewBag.condtion = condtion; ViewBag.PageId = Guid.NewGuid().ToString(); return(View()); }