/// <summary> /// 发布日志---房源查看 /// </summary> /// <param name="parames"></param> /// <returns></returns> public JsonResult GetLogByHouses(PostLogListParames parames) { int totalSize = 0; parames.userId = this.GetLoginUser().UserID; List <PostLogModel> postLogList = postLogBll.GetPostLogGroupByHouseId(parames, ref totalSize); if (postLogList != null && postLogList.Count > 0) { var resultList = postLogList.Select(p => new { InfoID = p.InfoID, TargetUrl = p.TargetUrl, CommunityName = p.CommunityName, BuildArea = p.BuildArea, CurFloor = p.CurFloor, MaxFloor = p.MaxFloor, Price = p.Price, PriceUnit = p.PriceUnit, Title = p.Title, PostCount = p.PostCount }); return(Json(new { data = resultList, totalSize = totalSize }, JsonRequestBehavior.AllowGet)); } return(Json(new { data = postLogList, totalSize = totalSize }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetPostLogList(PostLogListParames parames) { int totalSize = 0; parames.userId = this.GetLoginUser().UserID; int houseid = 0; int.TryParse(parames.title, out houseid);//支持房源编号 或者标题搜索用到 parames.houseId = houseid; if (parames.houseId > 0) { parames.title = string.Empty; } List <PostLogModel> postLogList = postLogBll.GetPostLogList(parames, ref totalSize); if (postLogList.IsNoNull() && postLogList.Count > 0) { var resultList = postLogList.Select(p => new { DateTime = p.DateTime.IsNoNull()?p.DateTime.ToString():"", ShortDateTime = p.DateTime.IsNoNull()?(p.DateTime.ToString("MM-dd HH:mm")):"", ShortBetinTime = p.BeginTime.IsNoNull() ? (p.BeginTime.ToString("MM-dd HH:mm")) : "", ID = p.ID, InfoID = p.InfoID, SiteID = p.SiteID, Status = p.Status, TargetID = p.TargetID, UserID = p.UserID, TargetUrl = p.TargetUrl, IsOrder = p.IsOrder, Msg = p.Msg, SiteUserName = p.SiteUserName, TradeType = p.TradeType, BuildType = p.BuildType, CommunityName = p.CommunityName, BuildArea = p.BuildArea, CurFloor = p.CurFloor, MaxFloor = p.MaxFloor, Price = p.Price, PriceUnit = p.PriceUnit, Title = p.Title, SiteName = p.SiteName, PostType = p.PostType, ReRelease = p.ReRelease }); return(Json(new { data = resultList, totalSize = totalSize }, JsonRequestBehavior.AllowGet)); } return(Json(new { data = postLogList, totalSize = totalSize }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 发布日志--房源查看统计 /// </summary> /// <param name="parames"></param> /// <param name="totalSize"></param> /// <returns></returns> public virtual List <PostLogModel> GetPostLogGroupByHouseId(PostLogListParames parames, ref int totalSize) { DbCommand cmd = GetStoredProcCommand("P_Api_GetPostLogGroupByHouseId"); AddInParameter(cmd, "@userId", DbType.Int32, parames.userId); AddInParameter(cmd, "@pageIndex", DbType.Int32, parames.pageIndex); AddInParameter(cmd, "@pageSize", DbType.Int32, parames.pageSize); AddOutParameter(cmd, "@totalSize", DbType.Int32, 4); DataSet ds = ExecuteDataSet(cmd); int.TryParse(cmd.Parameters["@totalSize"].Value.ToString(), out totalSize); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { return(BuildModelToList(ds.Tables[0].Select())); } return(null); }
/// <summary> /// 发布日志--房源查看统计 /// </summary> /// <param name="parames"></param> /// <param name="totalSize"></param> /// <returns></returns> public virtual List <PostLogModel> GetPostLogGroupByHouseId(PostLogListParames parames, ref int totalSize) { return(postLogDal.GetPostLogGroupByHouseId(parames, ref totalSize)); }
public ActionResult GetPostLogView(PostLogListParames parames = null) { ViewBag.parames = parames; return(View()); }