using System.Collections.Generic; using System.Threading.Tasks; using GxPress.Result.DataCenter; using GxPress.Service.Interface.PlatformData; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace GxPress.Api.AdminControllers { /// /// 平台数据 /// [Route("api/admin/platform")] [ApiController] [Authorize] public class AdminPlatformDataController : Controller { private readonly IPlatformDataService platformDataService; public AdminPlatformDataController(IPlatformDataService platformDataService) { this.platformDataService = platformDataService; } /// /// 平台数据 /// /// [HttpGet("data")] public async Task GetPlatformDataResult() { var result = new PlatformDataResult(); result.PlatformOperationDataResult = await platformDataService.GetPlatformDataAsync(); result.UserIncreaseResult = await platformDataService.GetUserIncreaseResult(); result.UserAreaDistributingResults = await platformDataService.GetUserAreaDistributingResults(); result.UserVipProportionResult = await platformDataService.GetUserVipProportionResult(); result.OnlineUserResult = await platformDataService.GetOnlineUserResult(); result.PlatformContentDataResult = await platformDataService.GetPlatformContentDataResult(); result.ContentTypeDistributingResult = new List(); result.ContentOlogyDistributingResult = new List(); result.PayContentstatisticsResult = new PayContentstatisticsResult(); result.ContentIncreaseResult = new ContentIncreaseResult(); result.PlatformAccumulativeVisitResult = new PlatformAccumulativeVisitResult(); result.VisitPortResult = new List(); result.PlatformCommerceResult = new PlatformCommerceResult(); result.ContentSaleRankingResults = new List(); result.ContentSaleProportionResults = new List(); return result; } } }