/// <summary> /// 玩家剩余的爽币 /// </summary> /// <returns></returns> public ActionResult GetCoolCoinUsed() { string guid = Request["userId"]; var user = Common.CacheHelper.Get(guid) as PersonalUser; int coinUsed = UserMessageBll.CoolCoinsUsed(user); return(Json(coinUsed, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { var user = GetCurrentUser(); ViewData.Model = PersonalUserBll.LoadEntities(u => u.Id == user.Id).FirstOrDefault(); //爽币余额 ViewBag.CoinsUsed = UserMessageBll.CoolCoinsUsed(user); return(View()); }
public ActionResult UserTop() { ViewData.Model = GetCurrentUser(); var user = ViewData.Model as PersonalUser; //-------------最新的五条消息----------------------------- var data = UserMessageBll.LoadEntities(um => um.UserId == user.Id && (um.IsDel == "0" || um.IsDel == null)).ToList() .OrderByDescending(um => um.InTime) .Select(um => new UserMessage() { Title = um.Title, Id = um.Id, InTime = um.InTime }).Take(4).ToList(); ViewBag.TopFiveMsg = data; //------------爽币余额-------------------------------------------- ViewBag.CoinsUsed = UserMessageBll.CoolCoinsUsed(user); return(PartialView("UserTop", ViewData.Model)); }
public ActionResult CoolCoins() { var user = GetCurrentUser(); //---------------赚爽币记录------- ViewBag.Pays = UserMessageBll.LoadEntities(um => um.PayType == "1" && um.UserId == user.Id).Sum(um => (int?)um.Pay); //------------充值记录----------- ViewData["payRecord"] = UserMessageBll.LoadEntities(um => um.PayType == "2" && um.UserId == user.Id && um.Pay != null).Sum(um => (int?)um.Pay); //------------消费记录----------- ViewData["expenseRecord"] = UserMessageBll.LoadEntities(um => um.PayType == "3" && um.UserId == user.Id).Sum(um => (int?)um.Pay); //-----------爽币余额------- ViewBag.CoolCoinsUsedCount = UserMessageBll.CoolCoinsUsed(user); return(View()); }