Ejemplo n.º 1
0
        /// <summary>
        /// 用户排行列表
        /// </summary>
        public ActionResult _UserRank(int topNum = 5)
        {
            IEnumerable <long>      userIds         = ownerDataService.GetTopOwnerIds(OwnerDataKeys.Instance().ThreadCount(), topNum, OwnerData_SortBy.LongValue_DESC);
            IEnumerable <IUser>     users           = userService.GetFullUsers(userIds);
            Dictionary <long, long> userThreadCount = new Dictionary <long, long>();

            foreach (long userId in userIds)
            {
                //用户日志数
                long threadCount = ownerDataService.GetLong(userId, OwnerDataKeys.Instance().ThreadCount());
                userThreadCount[userId] = threadCount;
            }

            ViewData["userThreadCount"] = userThreadCount;
            return(View(users));
        }