using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using GxPress.Common.Tools; using GxPress.Entity; using GxPress.Repository.Interface.AppReport; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace GxPress.Api.AppControllers { /// /// App数据报表 /// [Route("api/app/app-report")] [ApiController] [Authorize] public class AppReportController : ControllerBase { private readonly IAppReportRepository _appReportRepository; public AppReportController(IAppReportRepository appReportRepository) { _appReportRepository = appReportRepository; } /// /// 查询 /// /// [HttpPost("list")] public async Task> GetAppReportList() { var result = await _appReportRepository.GetAppReportListAsync(); var appReportList = result as AppReport[] ?? result.ToArray(); foreach (var appReport in appReportList) { appReport.IocUrl = StringUtils.AddDomain(appReport.IocUrl); } return appReportList; } } }