public async Task <ActionResult> List(long?stateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1) { TakeCashSearchResult result = await takeCashService.GetModelListAsync(null, stateId, keyword, startTime, endTime, pageIndex, pageSize); TakeCashListViewModel model = new TakeCashListViewModel(); model.TakeCashes = result.TakeCashes.Select(t => new TakeCashModel { AdminMobile = t.AdminMobile, Amount = t.Amount, Code = t.Code, CreateTime = t.CreateTime, Description = t.Description, Id = t.Id, Mobile = t.Mobile, Name = t.Name, PayTypeInfo = userService.GetPayInfo(t.UserId, t.TypeName), StateId = t.StateId, StateName = t.StateName, TypeId = t.TypeId, TypeName = t.TypeName, UserId = t.UserId }).ToArray(); model.PageCount = result.PageCount; model.States = await idNameService.GetByTypeNameAsync("提现状态"); return(Json(new AjaxResult { Status = 1, Data = model })); }
public async Task <ActionResult> List(long?stateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1) { TakeCashSearchResult result = await takeCashService.GetModelListAsync(null, stateId, keyword, startTime, endTime, pageIndex, pageSize); TakeCashListViewModel model = new TakeCashListViewModel(); model.TakeCashes = result.TakeCashes; model.PageCount = result.PageCount; model.States = MyEnumHelper.GetEnumList <TakeCashStateEnum>(); return(Json(new AjaxResult { Status = 1, Data = model })); }
//public IHolderService holderService { get; set; } public ActionResult List() { double takeCashDay = Convert.ToDouble(settingsService.GetValueByKey("takecashtime")); TakeCashListViewModel model = new TakeCashListViewModel(); model.TakeCashes = takeCashService.GetByHolderId(UserId); model.Holder = holderService.GetById(UserId); if (model.Holder == null) { Session["UserId"] = null; Session["OpenId"] = null; Session["HeadImgUrl"] = null; return(Redirect("/home/index")); } if (model.Holder.TakeCashTime != model.Holder.CreateTime.AddDays(takeCashDay)) { model.Holder.TakeCashTime = model.Holder.CreateTime.AddDays(takeCashDay); holderService.Update(UserId, model.Holder.TakeCashTime); } return(View(model)); }