/// <summary> /// /// </summary> /// <param name="p"></param> /// <param name="actionName"></param> /// <param name="gettype"></param> /// <param name="stime"></param> /// <param name="etime"></param> /// <returns></returns> public ActionResult IntegralList(int p = 1, string actionName = "", int gettype = 1, DateTime?stime = null, DateTime?etime = null) { int total; var list = service.GetUserIntegrals(out total, CurrentUser.UserId, gettype, stime, etime, p, 10); foreach (var item in list) { item.CodeDesc = string.IsNullOrWhiteSpace(item.RuleCode) ? item.IntegralDesc : IntegrationRules.Instance.GetDesc(item.RuleCode); } if (!string.IsNullOrEmpty(actionName)) { list = list.Where(k => k.CodeDesc.ToLower().Contains(actionName.ToLower())); } total = list.Count(); var pagelist = new RetechWing.MvcPager.PagedList <BusinessCommon.Integration.UserIntegral>(list, p, 10, total); var integralRank = service.GetUserRankIntegral(CurrentUser.UserId); ViewBag.totalIntegral = integralRank == null ? 0 : integralRank.TotalIntegral; ViewBag.todayIntegral = integralRank == null ? 0 : integralRank.TodayIntegral; ViewBag.integralRank = (integralRank == null || integralRank.RankIndex < 0) ? 0 : integralRank.RankIndex; UserLevel currentLevel = _levelService.GetUserLevel(CurrentTenant.TenantId, CurrentUser.UserId); ViewBag.currentLevel = currentLevel; return(View(pagelist)); }