/// <summary> /// 获取公告 /// </summary> /// <returns></returns> public ActionResult GetNotice() { DateTime dtNow = DateTime.Now; //判断是否有登录用户 if (Session["AN"] != null) { var msgStatus = DALUtility.MDbS.List <NoticState>("XMShop", "noticstate", x => x.uid.Equals(AN) && x.state < 2, x => new NoticState() { msgid = x.msgid }, null); var result = DALUtility.MDbS.List <NoticEntity>("XMShop", "notic", x => x.starttime <dtNow && x.endtime> dtNow && (x.receiver == null || x.receiver.Contains(Agent_Acc)) && (x.receivermember == null || x.receivermember.Contains(AN)), null, null); return(PagerData(-1, new { msgStatus, result })); } else { MongoDbService dbService = new MongoDbService(); var result = dbService.List <NoticEntity>("XMShop", "notic", x => x.starttime <dtNow && x.endtime> dtNow && x.receiver == null, null, null); return(PagerData(result.Count, result)); } }
/// <summary> /// 请求 /// </summary> public void QryDBLogs() { var retData = dbService.List <DBLogEntity>("YMOA", "DBLog", x => x.tId == "1" && x.tabName == "tbUser", null, 1, false, x => x.ctime); }