public IActionResult Index() { var dtoList = _refundService.FindList(); List <RefundViewModel> modelList = new List <RefundViewModel>(); dtoList.ForEach(r => { modelList.Add(new RefundViewModel() { AddTime = r.AddTime.ToString("yyyy-MM-dd HH:mm:ss"), Status = r.Status, Id = r.Id, UserId = r.UserId, Nickname = r.Nickname, Account = r.Account, Deposit = r.Deposit, Money = r.Money, AccountType = r.AccountType == "alipay" ? "支付宝" : r.AccountType, Type = r.Type }); }); ViewBag.RefundList = modelList; return(View()); }