From f885db9e204c172c62779f45c3edee3cae463b8d Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期二, 01 四月 2025 16:00:33 +0800 Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3 --- LifePayment/LifePayment.Domain/LifePay/LifePayConsumption.cs | 72 ++++++++ LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 115 ++++++++++++ LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 36 ++++ LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 19 ++ LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs | 2 LifePayment/LifePayment.Application.Contracts/LifePay/IStatisticsService.cs | 3 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs | 21 ++ LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 127 +++++++++++++- LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs | 2 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 115 ++++++++++++ LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs | 5 LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs | 16 + LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 7 13 files changed, 527 insertions(+), 13 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/IStatisticsService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/IStatisticsService.cs index 14477ef..4e37cda 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/IStatisticsService.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/IStatisticsService.cs @@ -12,4 +12,7 @@ { Task<TopStatisticsOutput> GetTopStatistics(List<string>? channleList = null); + Task<ReceiptsListOutPut> GetReceiptsList(List<string>? channleList = null); + + Task<ChannelDataListOutPut> GetChannelDataList(List<string>? channleList = null); } \ No newline at end of file diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs index 408752d..7190e9a 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs @@ -593,7 +593,28 @@ public decimal Profit { get; set; } } +public class LifePayConsumptionPageInput : ChannelsBaseInput +{ + /// <summary> + /// 鏌ヨ鏉′欢 + /// </summary> + public string? KeyWord { get; set; } + /// <summary> + /// 璧勯噾娴佸悜 + /// </summary> + public ConsumptionFlowEnum? Flow { get; set; } + + /// <summary> + /// 璁拌处寮�濮嬫椂闂� + /// </summary> + public DateTime? TimeBegin { get; set; } + + /// <summary> + /// 璁拌处缁撴潫鏃堕棿 + /// </summary> + public DateTime? TimeEnd { get; set; } +} public class LifePayRechargeReceiptsPageInput : ChannelsBaseInput { /// <summary> diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs index a93a33f..8ce0ecf 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs @@ -1096,6 +1096,7 @@ /// </summary> public int YesterdayActiveUsers { get; set; } + } public class ChannelRateOutput @@ -1150,6 +1151,54 @@ /// 璁拌处鏃堕棿 /// </summary> public DateTime CreationTime { get; set; } +} + +public class LifePayConsumptionListOutput +{ + /// <summary> + /// 缂栧彿 + /// </summary> + public Guid Id { get; set; } + + // <summary> + /// 骞冲彴璁㈠崟鍙� + /// </summary> + public string OrderNo { get; set; } + + /// <summary> + /// 娓犻亾娴佹按鍙� + /// </summary> + public string OutOrderNo { get; set; } + + /// <summary> + /// 浜ゆ槗閲戦 + /// </summary> + public decimal Amount { get; set; } + + /// <summary> + /// 璁拌处鏃堕棿 + /// </summary> + public DateTime FinishTime { get; set; } + + /// <summary> + /// 鍐荤粨鐘舵�� + /// </summary> + public ConsumptionFrozenStatusEnum FrozenStatus { get; set; } + + /// <summary> + /// 璧勯噾娴佸悜 + /// </summary> + public ConsumptionFlowEnum Flow { get; set; } + + /// <summary> + /// 鎵f閲戦 + /// </summary> + public decimal DeductionAmount { get; set; } + + /// <summary> + /// 鍐荤粨閲戦 + /// </summary> + public decimal FrozenAmount { get; set; } } public class LifePayPhoneMesssageCodeLoginOutput @@ -1262,13 +1311,77 @@ public class ReceiptsListOutPut { /// <summary> + /// 30澶╂敹娆� + /// </summary> + public List<ReceiptsDetail> ReceiveList { get; set; } = new List<ReceiptsDetail>(); + + /// <summary> + /// 30澶╂敹鍏� + /// </summary> + public List<ReceiptsDetail> IncomeList { get; set; } = new List<ReceiptsDetail>(); +} + +public class ReceiptsDetail +{ + /// <summary> /// 鍒涘缓鏃堕棿 /// </summary> - public DateTime CreationTime { get; set; } + public string CreationTime { get; set; } + /// <summary> + /// 閲戦 + /// </summary> public decimal Amount { get; set; } } +public class ChannelDataListOutPut +{ + /// <summary> + /// Top5娓犻亾鏀舵 + /// </summary> + public List<ChannelDataReceive> ReceiveList { get; set; } = new List<ChannelDataReceive>(); + + /// <summary> + /// Top5娓犻亾鐢ㄦ埛 + /// </summary> + public List<ChannelDataUserNumber> UserNumberList { get; set; } = new List<ChannelDataUserNumber>(); + +} + +public class ChannelDataReceive +{ + /// <summary> + /// 娓犻亾缂栧彿 + /// </summary> + public string ChannelId { get; set; } + + /// <summary> + /// 鏀舵 + /// </summary> + public decimal ReceivePrice { get; set; } + + /// <summary> + /// 浣i噾 + /// </summary> + public decimal ChannlesRakePrice { get; set; } + +} + +public class ChannelDataUserNumber +{ + /// <summary> + /// 娓犻亾缂栧彿 + /// </summary> + public string ChannelId { get; set; } + + /// <summary> + /// 鐢ㄦ埛鏁伴噺 + /// </summary> + public int Number { get; set; } + +} + + public class LifePayChannlesRakeListOutput { diff --git a/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs index 19822f8..b111635 100644 --- a/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs +++ b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs @@ -89,7 +89,7 @@ public string[] RoleNames { get; set; } /// <summary> - /// 娓犻亾鍒楄〃 + /// 娓犻亾缂栧彿 /// </summary> public string[] ChannlesId { get; set; } diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs index 856e067..aa03716 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs @@ -23,6 +23,7 @@ { private readonly IRepository<LifePayRechargeReceipts, Guid> _lifePayRechargeReceiptsRepository; private readonly IRepository<LifePayExpensesReceipts, Guid> _lifePayExpensesReceiptsRepository; + private readonly IRepository<LifePayConsumption, Guid> _lifePayConsumption; private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository; private readonly IRepository<LifePayOrder, Guid> _lifePayOrderRepository; private readonly IAliPayApi _aliPayApi; @@ -31,6 +32,7 @@ public LifePayOrderService( IRepository<LifePayRechargeReceipts, Guid> lifePayRechargeReceiptsRepository, IRepository<LifePayExpensesReceipts, Guid> lifePayExpensesReceiptsRepository, + IRepository<LifePayConsumption, Guid> lifePayConsumptionRepository, IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository, IRepository<LifePayOrder, Guid> lifePayOrderRepository, IAliPayApi aliPayApi, @@ -38,6 +40,7 @@ { _lifePayRechargeReceiptsRepository = lifePayRechargeReceiptsRepository; _lifePayExpensesReceiptsRepository = lifePayExpensesReceiptsRepository; + _lifePayConsumption = lifePayConsumptionRepository; _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository; _lifePayOrderRepository = lifePayOrderRepository; _aliPayApi = aliPayApi; @@ -45,6 +48,39 @@ } #region 鏌ヨ + + /// <summary> + /// 鑾峰彇娑堣垂娴佹按 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<PageOutput<LifePayConsumptionListOutput>> GetLifePayConsumptionPage(LifePayConsumptionPageInput input) + { + var list = await _lifePayConsumption.Where(x => x.IsDeleted == false) + .WhereIf(input.KeyWord.IsNotNullOrEmpty(), x => x.OrderNo.Contains(input.KeyWord) || x.OutOrderNo.Contains(input.KeyWord) || x.ChannelId.Contains(input.KeyWord)) + .WhereIf(input.Flow.HasValue,x => x.Flow == input.Flow) + .WhereIf(input.TimeBegin.HasValue, x => x.FinishTime >= input.TimeBegin) + .WhereIf(input.TimeEnd.HasValue, x => x.FinishTime <= input.TimeEnd) + .Select(x => new LifePayConsumptionListOutput() + { + Id = x.Id, + OrderNo = x.OrderNo, + OutOrderNo = x.OutOrderNo, + Amount = x.Amount, + FinishTime = x.FinishTime, + FrozenStatus = x.FrozenStatus, + Flow = x.Flow, + DeductionAmount = x.DeductionAmount, + }) + .GetPageResult(input.PageModel); + + var total = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false).SumAsync(x => x.RechargeAmount); + LifePayRechargeReceiptsStatistics objectData = new LifePayRechargeReceiptsStatistics(); + objectData.TotalRechargeAmount = total; + list.ObjectData = objectData; + return list; + } + /// <summary> /// 鑾峰彇鍏呭�兼祦姘� /// </summary> diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs index 0ff2fb3..4998753 100644 --- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs +++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs @@ -18,6 +18,7 @@ using Microsoft.EntityFrameworkCore; using System.Threading.Channels; using ZeroD.Util; +using NPOI.SS.Formula.Functions; namespace LifePayment.Application.LifePay { @@ -26,17 +27,20 @@ private readonly IRepository<LifePayOrder, Guid> _lifePayOrderRepository; private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository; private readonly IRepository<DallyStatistics, Guid> _dallyStatisticsRepository; + private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository; private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep; public StatisticsService( IRepository<LifePayOrder, Guid> lifePayOrderRepository, IRepository<LifePayUser, Guid> lifePayUserRepository, IRepository<DallyStatistics, Guid> dallyStatisticsRepository, + IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository, IRepository<LifePayChannles, Guid> lifePayChannlesRep) { _lifePayOrderRepository = lifePayOrderRepository; _lifePayUserRepository = lifePayUserRepository; _dallyStatisticsRepository = dallyStatisticsRepository; + _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository; _lifePayChannlesRep = lifePayChannlesRep; } @@ -72,8 +76,6 @@ topStatisticsOutput.YesterdayActiveUsers += entity.YesterdayActiveUsers; } } - - return topStatisticsOutput; } else @@ -95,11 +97,114 @@ } } - //public async Task<ReceiptsListOutPut> GetReceiptsList(List<string> channleList) - //{ - // var today = DateTime.Now.Date; + /// <summary> + /// 杩�30鏃ユ敹娆炬暟鎹� + /// </summary> + /// <param name="channleList"></param> + /// <returns></returns> + public async Task<ReceiptsListOutPut> GetReceiptsList(List<string> channleList) + { + var today = DateTime.Now.Date; + var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.Date <= today && x.CreationTime.Date >= today.AddDays(-30)) + .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) + .OrderBy(o => o.CreationTime) + .ToListAsync(); - //} + var groupedStatistics = statistics + .GroupBy(x => x.CreationTime) + .Select(g => new + { + CreationTime = g.Key, + TotalReceiptsYesterday = g.Sum(x => x.ReceiptsYesterday), + TotalIncomeYesterday = g.Sum(x => x.IncomeYesterday) + }) + .ToList(); + ReceiptsListOutPut receiptsListOutPut = new ReceiptsListOutPut(); + + foreach (var item in groupedStatistics) + { + ReceiptsDetail receive = new ReceiptsDetail() + { + CreationTime = item.CreationTime.ToString("yyyy-MM-dd"), + Amount = item.TotalReceiptsYesterday + }; + ReceiptsDetail income = new ReceiptsDetail() + { + CreationTime = item.CreationTime.ToString("yyyy-MM-dd"), + Amount = item.TotalIncomeYesterday + }; + receiptsListOutPut.ReceiveList.Add(receive); + receiptsListOutPut.IncomeList.Add(income); + } + + return receiptsListOutPut; + + } + + public async Task<ChannelDataListOutPut> GetChannelDataList(List<string> channleList) + { + + var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) + .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) + .ToListAsync(); + var groupedStatistics = statistics + .GroupBy(x => x.ChannelId) + .Select(g => new + { + ChannelId = g.Key, + ReceivePrice = g.Sum(x => x.PayAmount), + ChannlesRakePrice = g.Sum(x => x.ChannlesRakePrice), + }) + .OrderByDescending(o => o.ReceivePrice) + .ToList(); + + ChannelDataListOutPut channelDataList = new ChannelDataListOutPut(); + + foreach (var item in groupedStatistics) + { + ChannelDataReceive receive = new ChannelDataReceive() + { + ChannelId = item.ChannelId, + ReceivePrice = item.ReceivePrice, + ChannlesRakePrice = item.ChannlesRakePrice, + }; + if (channelDataList.ReceiveList.Count() < 5) + { + channelDataList.ReceiveList.Add(receive); + } + } + + /// 绱鐢ㄦ埛 + var users = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(channleList.Count() > 0, x => channleList.Contains(x.CreationChannleNum)) + .ToListAsync(); + var groupedUsers = users + .GroupBy(x => x.CreationChannleNum) + .Select(g => new + { + ChannelId = g.Key, + Number = g.Count(), + }) + .OrderByDescending(o => o.Number) + .ToList(); + foreach (var item in groupedUsers) + { + ChannelDataUserNumber usernumber = new ChannelDataUserNumber() + { + ChannelId = item.ChannelId, + Number = item.Number, + }; + if (channelDataList.UserNumberList.Count() < 5) + { + channelDataList.UserNumberList.Add(usernumber); + } + } + + + + return channelDataList; + + } + private async Task<DallyStatistics> TopStatistics(string channleId, DateTime today) { @@ -116,6 +221,9 @@ /// 绱鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 var accumulatedIncome = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); + /// 鏄ㄦ棩鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 + var yesterdayIncome = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) + .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); /// 绱涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏃堕棿鐨勮鍗曡褰曪紱 var accumulatedOrders = await _lifePayOrderRepository.Where(x => x.CreationTime < today).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); /// 鏄ㄦ棩涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� @@ -128,18 +236,19 @@ var yesterdayFail = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆�) .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); /// 绱鐢ㄦ埛 - var accumulatedUsers = await _lifePayUserRepository.WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).CountAsync(); + var accumulatedUsers = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).CountAsync(); /// 鏄ㄦ棩娲昏穬鐢ㄦ埛 - var yesterdayActiveUsers = await _lifePayUserRepository.WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).Where(x => x.LastLoginTime >= today.AddDays(-1)).CountAsync(); + var yesterdayActiveUsers = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).Where(x => x.LastLoginTime >= today.AddDays(-1)).CountAsync(); var entity = new DallyStatistics() { Id = GuidGenerator.Create(), - CreationTime = DateTime.Now, + CreationTime = today, Amount = 0, AccumulatedReceipts = accumulatedReceipts ?? 0, AccumulatedIncome = accumulatedIncome ?? 0, + IncomeYesterday = yesterdayIncome ?? 0, ReceiptsYesterday = receiptsYesterday ?? 0, AccumulatedOrders = accumulatedOrders, OrdersNumYesterday = ordersNumYesterday, diff --git a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs index a7c1146..d2a2396 100644 --- a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs +++ b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayEnum.cs @@ -196,5 +196,21 @@ [Description("鏀嚭")] Receipts = 20, +} +public enum ConsumptionFrozenStatusEnum +{ + [Description("鍐荤粨")] + Frozen = 10, + [Description("瑙e喕")] + Thaw = 20, +} + +public enum ConsumptionFlowEnum +{ + [Description("涓嶅彉")] + Unchanged = 10, + + [Description("鍑洪噾")] + Out = 20, } diff --git a/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs b/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs index d5b6125..a5cb249 100644 --- a/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs +++ b/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs @@ -34,6 +34,11 @@ public decimal AccumulatedIncome { get; set; } /// <summary> + /// 鏄ㄦ棩鏀跺叆 + /// </summary> + public decimal IncomeYesterday { get; set; } + + /// <summary> /// 绱涓嬪崟 /// </summary> public int AccumulatedOrders { get; set; } diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayConsumption.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayConsumption.cs new file mode 100644 index 0000000..2ae50e7 --- /dev/null +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayConsumption.cs @@ -0,0 +1,72 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp; +using LifePayment.Domain.Shared; + +namespace LifePayment.Domain.LifePay +{ + /// <summary> + /// 娑堣垂娴佹按 + /// </summary> + public class LifePayConsumption : FullAuditedEntity<Guid>, IDataUserFilter + { + public LifePayConsumption() + { + } + + /// <summary> + /// 骞冲彴璁㈠崟鍙� + /// </summary> + public string OrderNo { get; set; } + + /// <summary> + /// 娓犻亾娴佹按鍙� + /// </summary> + public string OutOrderNo { get; set; } + + /// <summary> + /// 浜ゆ槗閲戦 + /// </summary> + public decimal Amount { get; set; } + + /// <summary> + /// 璁拌处鏃堕棿 + /// </summary> + public DateTime FinishTime { get; set; } + + /// <summary> + /// 鎷撳睍灞炴�� + /// </summary> + public string ExtraProperties { get; set; } + + /// <summary> + /// 鍐荤粨鐘舵�� + /// </summary> + public ConsumptionFrozenStatusEnum FrozenStatus { get; set; } + + /// <summary> + /// 璧勯噾娴佸悜 + /// </summary> + public ConsumptionFlowEnum Flow { get; set; } + + /// <summary> + /// 鎵f閲戦 + /// </summary> + public decimal DeductionAmount { get; set; } + + /// <summary> + /// 鍐荤粨閲戦 + /// </summary> + public decimal? FrozenAmount { get; set; } + + /// <summary> + /// 娓犻亾鍙� + /// </summary> + public string ChannelId { get; set; } + + } +} diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs index 796362e..6daff53 100644 --- a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs +++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs @@ -25,6 +25,8 @@ public virtual DbSet<LifePayPremium> LifePayPremium { get; set; } + + public virtual DbSet<LifePayConsumption> LifePayConsumption { get; set; } public virtual DbSet<LifePayRechargeReceipts> LifePayRechargeReceipts { get; set; } public virtual DbSet<LifePayExpensesReceipts> LifePayExpensesReceipts { get; set; } diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml index a6d4b04..fb8cfab 100644 --- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml +++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml @@ -70,6 +70,13 @@ <param name="input"></param> <returns></returns> </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetReceiptsList(LifePayment.Application.Contracts.TopStatisticsInput)"> + <summary> + 鑾峰彇30鏃ユ敹娆剧粺璁� + </summary> + <param name="input"></param> + <returns></returns> + </member> <member name="M:LifePayment.HttpApi.LifePayController.GetElectricParValue(LifePayment.Domain.Shared.ChannelsBaseInput)"> <summary> 鑾峰彇鐢佃垂闈㈠�� diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml index 1d5df00..cde063b 100644 --- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml +++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml @@ -724,6 +724,26 @@ 鍒╂鼎 </summary> </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionPageInput.KeyWord"> + <summary> + 鏌ヨ鏉′欢 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionPageInput.Flow"> + <summary> + 璧勯噾娴佸悜 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionPageInput.TimeBegin"> + <summary> + 璁拌处寮�濮嬫椂闂� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionPageInput.TimeEnd"> + <summary> + 璁拌处缁撴潫鏃堕棿 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.LifePayRechargeReceiptsPageInput.KeyWord"> <summary> 鏌ヨ鏉′欢 @@ -1759,6 +1779,47 @@ 璁拌处鏃堕棿 </summary> </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.Id"> + <summary> + 缂栧彿 + </summary> + </member> + <!-- Badly formed XML comment ignored for member "P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.OrderNo" --> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.OutOrderNo"> + <summary> + 娓犻亾娴佹按鍙� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.Amount"> + <summary> + 浜ゆ槗閲戦 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.FinishTime"> + <summary> + 璁拌处鏃堕棿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.FrozenStatus"> + <summary> + 鍐荤粨鐘舵�� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.Flow"> + <summary> + 璧勯噾娴佸悜 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.DeductionAmount"> + <summary> + 鎵f閲戦 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayConsumptionListOutput.FrozenAmount"> + <summary> + 鍐荤粨閲戦 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.LifePayPhoneMesssageCodeLoginOutput.UserId"> <summary> 鐢ㄦ埛Id @@ -1839,9 +1900,59 @@ 鍚堣浣i噾 </summary> </member> - <member name="P:LifePayment.Application.Contracts.ReceiptsListOutPut.CreationTime"> + <member name="P:LifePayment.Application.Contracts.ReceiptsListOutPut.ReceiveList"> + <summary> + 30澶╂敹娆� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ReceiptsListOutPut.IncomeList"> + <summary> + 30澶╂敹鍏� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ReceiptsDetail.CreationTime"> <summary> 鍒涘缓鏃堕棿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ReceiptsDetail.Amount"> + <summary> + 閲戦 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataListOutPut.ReceiveList"> + <summary> + Top5娓犻亾鏀舵 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataListOutPut.UserNumberList"> + <summary> + Top5娓犻亾鐢ㄦ埛 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataReceive.ChannelId"> + <summary> + 娓犻亾缂栧彿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataReceive.ReceivePrice"> + <summary> + 鏀舵 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataReceive.ChannlesRakePrice"> + <summary> + 浣i噾 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataUserNumber.ChannelId"> + <summary> + 娓犻亾缂栧彿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.ChannelDataUserNumber.Number"> + <summary> + 鐢ㄦ埛鏁伴噺 </summary> </member> <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.Id"> @@ -2839,7 +2950,7 @@ </member> <member name="P:LifePayment.Application.Contracts.CreateAccountInput.ChannlesId"> <summary> - 娓犻亾鍒楄〃 + 娓犻亾缂栧彿 </summary> </member> <member name="P:LifePayment.Application.Contracts.CreateAccountInput.OpenId"> diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index 5dd5a70..606efc1 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -61,6 +61,25 @@ } /// <summary> + /// 鑾峰彇30鏃ユ敹娆剧粺璁� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [AllowAnonymous] + public async Task<ReceiptsListOutPut> GetReceiptsList(TopStatisticsInput input) + { + return await _statisticsService.GetReceiptsList(input.ChannleList); + } + + [HttpPost] + [AllowAnonymous] + public async Task<ChannelDataListOutPut> GetChannelDataList(TopStatisticsInput input) + { + return await _statisticsService.GetChannelDataList(input.ChannleList); + } + + /// <summary> /// 鑾峰彇鐢佃垂闈㈠�� /// </summary> /// <returns></returns> -- Gitblit v1.9.1