李昊 il y a 4 ans
Parent
commit
c08b7594b0

+ 31 - 0
gx_api/GxPress/Api/GxPress.Api/AdminControllers/AdminPlatformDataController.cs

@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using GxPress.Result.DataCenter;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+
+namespace GxPress.Api.AdminControllers
+{
+    /// <summary>
+    /// 平台数据
+    /// </summary>
+    [Route("api/admin/platform")]
+    [ApiController]
+    [Authorize]
+    public class AdminPlatformDataController : Controller
+    {
+        public AdminPlatformDataController()
+        {
+
+        }
+        /// <summary>
+        /// 平台数据
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("data")]
+        public async Task<PlatformDataResult> GetPlatformDataResult()
+        {
+            var result = new PlatformDataResult();
+            return result;
+        }
+    }
+}

+ 0 - 1
gx_api/GxPress/Api/GxPress.Api/Startup.cs

@@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http.Features;
 using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.StaticFiles;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.FileProviders;

+ 371 - 0
gx_api/GxPress/Model/GxPress.Result/DataCenter/PlatformDataResult.cs

@@ -0,0 +1,371 @@
+using System.Collections.Generic;
+
+namespace GxPress.Result.DataCenter
+{
+    /// <summary>
+    /// 平台数据
+    /// </summary>
+    public class PlatformDataResult
+    {
+        /// <summary>
+        /// 平台运营数据
+        /// </summary>
+        /// <value></value>
+        public PlatformOperationDataResult PlatformOperationDataResult { get; set; }
+        /// <summary>
+        /// 用户总数增长趋势
+        /// </summary>
+        /// <value></value>
+        public UserIncreaseResult UserIncreaseResult { get; set; }
+        /// <summary>
+        /// 用户地区分布
+        /// </summary>
+        /// <value></value>
+        public List<UserAreaDistributingResult> UserAreaDistributingResults { get; set; }
+        /// <summary>
+        ///  会员用户占比
+        /// </summary>
+        /// <value></value>
+        public UserVipProportionResult UserVipProportionResult { get; set; }
+        /// <summary>
+        /// 实时在线人数
+        /// </summary>
+        /// <value></value>
+        public OnlineUserResult OnlineUserResult { get; set; }
+        /// <summary>
+        /// 平台内容数据
+        /// </summary>
+        /// <value></value>
+        public PlatformContentDataResult PlatformContentDataResult { get; set; }
+        /// <summary>
+        /// 内容类型分布图
+        /// </summary>
+        public List<ContentTypeDistributingResult> ContentTypeDistributingResult { get; set; }
+        /// <summary>
+        /// 内容科学分布图
+        /// </summary>
+        public List<ContentOlogyDistributingResult> ContentOlogyDistributingResult { get; set; }
+        /// <summary>
+        /// 收费内容统计图
+        /// </summary>
+        public PayContentstatisticsResult PayContentstatisticsResult { get; set; }
+        /// <summary>
+        /// 内容增长情况图
+        /// </summary>
+        public ContentIncreaseResult ContentIncreaseResult { get; set; }
+        /// <summary>
+        ///  平台累计访问数据(次)
+        /// </summary>
+        public PlatformAccumulativeVisitResult PlatformAccumulativeVisitResult { get; set; }
+        /// <summary>
+        /// 访问终端统计
+        /// </summary>
+        public List<VisitPortResult> VisitPortResult { get; set; }
+        /// <summary>
+        /// 平台商务数据
+        /// </summary>
+        public PlatformCommerceResult PlatformCommerceResult { get; set; }
+        /// <summary>
+        /// 内容销售排行榜
+        /// </summary>
+        /// <value></value>
+        public List<ContentSaleRankingResult> ContentSaleRankingResults { get; set; }
+        /// <summary>
+        /// 内容分类销售占比
+        /// </summary>
+        public List<ContentSaleProportionResult> ContentSaleProportionResults { get; set; }
+    }
+    /// <summary>
+    /// 平台运营数据
+    /// </summary>
+    public class PlatformOperationDataResult
+    {
+        /// <summary>
+        /// 平台总人数
+        /// </summary>
+        /// <value></value>
+        public int SumUserCount { get; set; }
+        /// <summary>
+        /// 新增用户数
+        /// </summary>
+        /// <value></value>
+        public int NewUserCount { get; set; }
+        /// <summary>
+        /// 在线用户数
+        /// </summary>
+        /// <value></value>
+        public int OnlineUserCount { get; set; }
+
+        /// <summary>
+        /// 活跃用户数
+        /// </summary>
+        /// <value></value>
+        public int ActivityUserCount { get; set; }
+    }
+    /// <summary>
+    /// 用户增长
+    /// </summary>
+    public class UserIncreaseResult
+    {
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> ExpectedData { get; set; }
+        /// <summary>
+        /// 月份
+        /// </summary>
+        /// <value></value>
+        public List<string> MonthData { get; set; }
+    }
+    /// <summary>
+    /// 用户地区分布
+    /// </summary>
+    public class UserAreaDistributingResult
+    {
+        /// <summary>
+        /// 城市
+        /// </summary>
+        /// <value></value>
+        public string City { get; set; }
+        /// <summary>
+        /// 城市数量
+        /// </summary>
+        /// <value></value>
+        public int CityUserCount { get; set; }
+    }
+    /// <summary>
+    /// 会员用户占比
+    /// </summary>
+    public class UserVipProportionResult
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <value></value>
+        public decimal Value { get; set; }
+    }
+    /// <summary>
+    /// 实时在线人数
+    /// </summary>
+    public class OnlineUserResult
+    {
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> ExpectedData { get; set; }
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> ActualData { get; set; }
+        /// <summary>
+        /// 月份
+        /// </summary>
+        /// <value></value>
+        public List<string> MonthData { get; set; }
+    }
+    /// <summary>
+    /// 平台内容数据
+    /// </summary>
+    public class PlatformContentDataResult
+    {
+        /// <summary>
+        /// 平台内容总数
+        /// </summary>
+        /// <value></value>
+        public int SumContentCount { get; set; }
+        /// <summary>
+        /// 新增内容数
+        /// </summary>
+        /// <value></value>
+        public int NewContentCount { get; set; }
+        /// <summary>
+        /// 在线出版数
+        /// </summary>
+        /// <value></value>
+        public int OnlineContentCount { get; set; }
+
+        /// <summary>
+        /// 付费内容
+        /// </summary>
+        /// <value></value>
+        public int PayContentCount { get; set; }
+    }
+
+    /// <summary>
+    /// 内容类型分布图
+    /// </summary>
+    public class ContentTypeDistributingResult
+    {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        /// <value></value>
+        public string Name { get; set; }
+        /// <summary>
+        /// 占比数量
+        /// </summary>
+        /// <value></value>
+        public int Value { get; set; }
+    }
+    /// <summary>
+    /// 内容科学分布图
+    /// </summary>
+    public class ContentOlogyDistributingResult
+    {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        /// <value></value>
+        public string Name { get; set; }
+        /// <summary>
+        /// 占比数量
+        /// </summary>
+        /// <value></value>
+        public int Value { get; set; }
+    }
+    /// <summary>
+    /// 收费内容统计图
+    /// </summary>
+    public class PayContentstatisticsResult
+    {
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> PageAdata { get; set; }
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> PageBdata { get; set; }
+        /// <summary>
+        /// 标题
+        /// </summary>
+        /// <value></value>
+        public List<string> Title { get; set; }
+    }
+    /// <summary>
+    /// 内容增长情况图
+    /// </summary>
+    public class ContentIncreaseResult
+    {
+        /// <summary>
+        /// 数据
+        /// </summary>
+        /// <value></value>
+        public List<int> ExpectedData { get; set; }
+        /// <summary>
+        /// 月份
+        /// </summary>
+        /// <value></value>
+        public List<string> MonthData { get; set; }
+    }
+    /// <summary>
+    ///  平台累计访问数据(次)
+    /// </summary>
+    public class PlatformAccumulativeVisitResult
+    {
+        /// <summary>
+        /// 访问数量
+        /// </summary>
+        /// <value></value>
+        public int VisitCount { get; set; }
+        /// <summary>
+        /// 收藏
+        /// </summary>
+        /// <value></value>
+        public int CollctionCount { get; set; }
+        /// <summary>
+        /// 转发
+        /// </summary>
+        /// <value></value>
+        public int RetransmissionCount { get; set; }
+        /// <summary>
+        /// 评论
+        /// </summary>
+        /// <value></value>
+        public int CommentCount { get; set; }
+    }
+    /// <summary>
+    /// 访问终端统计
+    /// </summary>
+    public class VisitPortResult
+    {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        /// <value></value>
+        public string Name { get; set; }
+        /// <summary>
+        /// 占比数量
+        /// </summary>
+        /// <value></value>
+        public int Value { get; set; }
+    }
+    /// <summary>
+    /// 平台商务数据
+    /// </summary>
+    public class PlatformCommerceResult
+    {
+        /// <summary>
+        /// 销售总额
+        /// </summary>
+        /// <value></value>
+        public decimal Amount { get; set; }
+        /// <summary>
+        /// 订单数量
+        /// </summary>
+        /// <value></value>
+        public int OrderCount { get; set; }
+        /// <summary>
+        /// Vip总人数
+        /// </summary>
+        /// <value></value>
+        public int VipUserCount { get; set; }
+        /// <summary>
+        /// vip购物总额(元)
+        /// </summary>
+        /// <value></value>
+        public decimal VipAmount { get; set; }
+    }
+    /// <summary>
+    /// 内容销售排行榜
+    /// </summary>
+    public class ContentSaleRankingResult
+    {
+        /// <summary>
+        /// 类别名称
+        /// </summary>
+        /// <value></value>
+        public string CategoryName { get; set; }
+        /// <summary>
+        /// 销售总额
+        /// </summary>
+        /// <value></value>
+        public decimal Amount { get; set; }
+        /// <summary>
+        /// 占比
+        /// </summary>
+        /// <value></value>
+        public int Proportion { get; set; }
+    }
+    /// <summary>
+    /// 内容分类销售占比
+    /// </summary>
+    public class ContentSaleProportionResult
+    {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        /// <value></value>
+        public string Name { get; set; }
+        /// <summary>
+        /// 占比数量
+        /// </summary>
+        /// <value></value>
+        public int Value { get; set; }
+    }
+}