using System; using System.Collections.Generic; using System.Threading.Tasks; using Furion; using Furion.DatabaseAccessor; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Waste.Application; using Waste.Domain; namespace Waste.Web.Entry.Pages.Result { /// /// ͳ¼Æ±¨±í /// public class IndexModel : BaseModel { public string defaulttime = ""; private readonly ResultColumnConfigService columnConfigService; public IndexModel(ResultColumnConfigService columnConfigService) { this.columnConfigService = columnConfigService; } public async Task OnGetAsync() { defaulttime = $"{DateTime.Now.Date} ~ {DateTime.Now.Date.AddDays(1).AddSeconds(-1)}"; //var value = await service.GetAccountConfig(Baseuser.UserId); Column = await columnConfigService.GetAccountColumn(); DefaultColumn = await columnConfigService.GetAccountDefaultColumn(); } public async Task OnPostUpdateAccountConfigAsync([FromBody] List input) { await columnConfigService.WriteAccountConfig(input); //await service.UpdateAccountConfig(Baseuser.UserId, config); return Content("ok"); } public Dictionary Column { get; set; } //private static Dictionary EmptyColumn = new Dictionary(); public Dictionary DefaultColumn = new Dictionary(); } }