Beispiel #1
0
        /// <summary>
        /// 推荐位
        /// </summary>
        private IEnumerable <RecommendView> GetRecList(int classId = 0, int pageSize = 10, int pageIndex = 1)
        {
            string where = " and r.RecClassId = @classId ";
            string orderby  = " order by r.onlinetime desc, r.sortid desc ";
            int    rowCount = 0;

            return(_recommendService.GetPagerList(where, orderby, pageIndex, pageSize, out rowCount, new { classId }));
        }
Beispiel #2
0
        public ActionResult GuessLike(int classId)
        {
            string where = " and r.RecClassId = @classId ";
            string orderby  = " order by r.onlinetime desc, r.sortid desc ";
            int    rowCount = 0;

            var recommendList = _recommendService.GetPagerList(where, orderby, 1, 3, out rowCount, new { classId });
            var model         = new SimpleResponse <IEnumerable <RecommendView> >(!recommendList.IsObjectNullOrEmpty(), recommendList);

            return(PartialView(model));
        }
Beispiel #3
0
        private IEnumerable <RecommendView> GetRecList(int classId = 0, int pageSize = 10, int pageIndex = 1)
        {
            string where = " and r.recclassid = @ClassId ";
            string orderBy     = " order by r.onlinetime desc, r.sortid desc, r.id desc";
            int    recRowCount = 0;
            object param       = new
            {
                ClassId = classId
            };

            return(_recommendService.GetPagerList(where, orderBy, pageIndex, pageSize, out recRowCount, param));
        }