From d7399b083de823860a56b68c79f8e36603fb4ea3 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 31 三月 2025 13:37:19 +0800
Subject: [PATCH] fix:获取渠道分佣分页列表
---
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 58 +++++++
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 80 ++++++++++
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 143 +++++++++++++----
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 23 ++
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs | 7
LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs | 2
LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs | 57 +++++++
LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs | 2
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs | 36 ++++
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 13 +
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 20 +-
11 files changed, 389 insertions(+), 52 deletions(-)
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
index 0beef1a..84b2d0a 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
@@ -12,11 +12,16 @@
{
Task<PageOutput<LifePayRechargeReceiptsListOutput>> GetLifePayRechargeReceiptsPage(LifePayRechargeReceiptsPageInput input);
+ Task<PageOutput<LifePayExpensesReceiptsListOutput>> GetLifePayExpensesReceiptsPage(LifePayExpensesReceiptsPageInput input);
+
+ Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input);
+
Task AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input);
- Task<PageOutput<LifePayExpensesReceiptsListOutput>> GetLifePayExpensesReceiptsPage(LifePayExpensesReceiptsPageInput input);
Task AddLifePayExpensesReceipts(AddLifePayExpensesReceiptsInput input);
Task GetAllLifePayExpensesReceipts();
+
+ Task GetAllChannlesRake();
}
\ 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 6a84270..545f42d 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
@@ -736,4 +736,38 @@
public decimal Amount { get; set; }
public string ExpensesReceiptsOrder { get; set; }
-}
\ No newline at end of file
+}
+public class LifePayChannlesRakePageInput : ChannelsBaseInput
+{
+
+ /// <summary>
+ /// 鏌ヨ鏉′欢
+ /// </summary>
+ public string? KeyWord { get; set; }
+
+ /// <summary>
+ /// 娓犻亾鍙�
+ /// </summary>
+ public string? ChannelId { get; set; }
+
+ /// <summary>
+ /// 璧峰涓嬪崟鏃堕棿
+ /// </summary>
+ public DateTime? CreationTimeBegin { get; set; }
+
+ /// <summary>
+ /// 缁撴潫涓嬪崟鏃堕棿
+ /// </summary>
+ public DateTime? CreationTimeEnd { get; set; }
+
+ /// <summary>
+ /// 璧峰缁撶畻鏃堕棿
+ /// </summary>
+ public DateTime? FinishTimeBegin { get; set; }
+
+ /// <summary>
+ /// 缁堟缁撶畻鏃堕棿
+ /// </summary>
+ public DateTime? FinishTimeEnd { get; set; }
+
+}
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
index 7fe3e08..7f2380f 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -1232,6 +1232,14 @@
public decimal RealIncome { get; set; }
}
+public class LifePayLifePayChannlesRakeStatistics
+{
+ /// <summary>
+ /// 鍚堣浣i噾
+ /// </summary>
+ public decimal TotalRakePrice { get; set; }
+
+}
public class ReceiptsListOutPut
{
/// <summary>
@@ -1240,4 +1248,54 @@
public DateTime CreationTime { get; set; }
public decimal Amount { get; set; }
+}
+
+public class LifePayChannlesRakeListOutput
+{
+
+ /// <summary>
+ /// 缂栧彿
+ /// </summary>
+ public Guid Id { get; set; }
+
+ /// <summary>
+ /// 骞冲彴璁㈠崟鍙�
+ /// </summary>
+ public string OrderNo { get; set; }
+
+ /// <summary>
+ /// 鎴愪氦閲戦
+ /// </summary>
+ public decimal PayAmount { get; set; }
+
+
+ /// <summary>
+ /// 娓犻亾浣i噾姣斾緥
+ /// </summary>
+ public decimal ChannlesRakeRate { get; set; }
+
+ /// <summary>
+ /// 浣i噾
+ /// </summary>
+ public decimal ChannlesRakePrice { get; set; }
+
+ /// <summary>
+ /// 缁撶畻鏃堕棿
+ /// </summary>
+ public DateTime FinishTime { get; set; }
+
+ /// <summary>
+ /// 涓嬪崟鏃堕棿
+ /// </summary>
+ public DateTime CreationTime { set; get; }
+
+ /// <summary>
+ /// 鎷撳睍灞炴��
+ /// </summary>
+ public string ExtraProperties { get; set; }
+
+ /// <summary>
+ /// 涓嬪崟娓犻亾
+ /// </summary>
+ public string ChannelId { get; set; }
}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
index f17ba62..fc61849 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -21,6 +21,7 @@
{
private readonly IRepository<LifePayRechargeReceipts, Guid> _lifePayRechargeReceiptsRepository;
private readonly IRepository<LifePayExpensesReceipts, Guid> _lifePayExpensesReceiptsRepository;
+ private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository;
private readonly IRepository<LifePayOrder, Guid> _lifePayOrderRepository;
private readonly IAliPayApi _aliPayApi;
private readonly IWxPayApi _wxPayApi;
@@ -28,17 +29,20 @@
public LifePayOrderService(
IRepository<LifePayRechargeReceipts, Guid> lifePayRechargeReceiptsRepository,
IRepository<LifePayExpensesReceipts, Guid> lifePayExpensesReceiptsRepository,
+ IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository,
IRepository<LifePayOrder, Guid> lifePayOrderRepository,
IAliPayApi aliPayApi,
IWxPayApi wxPayApi)
{
_lifePayRechargeReceiptsRepository = lifePayRechargeReceiptsRepository;
_lifePayExpensesReceiptsRepository = lifePayExpensesReceiptsRepository;
+ _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository;
_lifePayOrderRepository = lifePayOrderRepository;
_aliPayApi = aliPayApi;
_wxPayApi = wxPayApi;
}
+ #region 鏌ヨ
/// <summary>
/// 鑾峰彇鍏呭�兼祦姘�
/// </summary>
@@ -68,42 +72,6 @@
return list;
}
-
-
- /// <summary>
- /// 缂栬緫鍏呭�兼祦姘�
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input)
- {
- CheckExtensions.IfTrueThrowUserFriendlyException(input.OrderNo == null, "璇疯緭鍏ヤ笟鍔¤鍗曞彿");
- CheckExtensions.IfTrueThrowUserFriendlyException(input.RechargeAmount <= 0, "鍏呭�奸噾棰濆簲澶т簬0");
- CheckExtensions.IfTrueThrowUserFriendlyException(input.Voucher == null, "璇锋彁浜ゅ厖鍊煎嚟璇�");
- var repeat = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.OrderNo == input.OrderNo).FirstOrDefaultAsync();
- CheckExtensions.IfTrueThrowUserFriendlyException(repeat != null && repeat.Id != input.Id, "涓氬姟璁㈠崟鍙烽噸澶�");
- if (input.Id.HasValue)
- {
- var payRechargeReceipts = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.Id == input.Id.Value).FirstOrDefaultAsync();
- payRechargeReceipts.OrderNo = input.OrderNo;
- payRechargeReceipts.RechargeAmount = input.RechargeAmount;
- payRechargeReceipts.Remark = input.Remark;
- payRechargeReceipts.Voucher = input.Voucher;
- }
- else
- {
- LifePayRechargeReceipts payRechargeReceipts = new LifePayRechargeReceipts()
- {
- Id = Guid.NewGuid(),
- OrderNo = input.OrderNo,
- RechargeAmount = input.RechargeAmount,
- Remark = input.Remark,
- Voucher = input.Voucher,
- };
- await _lifePayRechargeReceiptsRepository.InsertAsync(payRechargeReceipts);
- }
- }
-
/// <summary>
/// 鑾峰彇鏀舵敮娴佹按
/// </summary>
@@ -142,6 +110,82 @@
}
/// <summary>
+ /// 鑾峰彇娓犻亾鍒嗕剑
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ public async Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input)
+ {
+ var list = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false)
+ .WhereIf(input.ChannelId != null, x => x.ChannelId == input.ChannelId)
+ .WhereIf(input.CreationTimeBegin.HasValue, x => x.CreationTime >= input.CreationTimeBegin)
+ .WhereIf(input.CreationTimeEnd.HasValue, x => x.CreationTime <= input.CreationTimeEnd)
+ .WhereIf(input.FinishTimeBegin.HasValue, x => x.FinishTime >= input.FinishTimeBegin)
+ .WhereIf(input.FinishTimeEnd.HasValue, x => x.FinishTime <= input.FinishTimeEnd)
+
+ .Select(x => new LifePayChannlesRakeListOutput()
+ {
+ Id = x.Id,
+ OrderNo = x.OrderNo,
+ PayAmount = x.PayAmount,
+ ChannlesRakeRate = x.ChannlesRakeRate,
+ ChannlesRakePrice = x.ChannlesRakePrice,
+ ChannelId = x.ChannelId,
+ FinishTime = x.FinishTime,
+ CreationTime = x.CreationTime,
+ })
+ .GetPageResult(input.PageModel);
+
+ var totalRakePrice = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false).SumAsync(x => x.ChannlesRakePrice);
+
+ LifePayLifePayChannlesRakeStatistics objectData = new LifePayLifePayChannlesRakeStatistics();
+ objectData.TotalRakePrice = totalRakePrice;
+ list.ObjectData = objectData;
+ return list;
+ }
+
+ #endregion
+
+
+
+
+
+ /// <summary>
+ /// 缂栬緫鍏呭�兼祦姘�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ public async Task AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input)
+ {
+ CheckExtensions.IfTrueThrowUserFriendlyException(input.OrderNo == null, "璇疯緭鍏ヤ笟鍔¤鍗曞彿");
+ CheckExtensions.IfTrueThrowUserFriendlyException(input.RechargeAmount <= 0, "鍏呭�奸噾棰濆簲澶т簬0");
+ CheckExtensions.IfTrueThrowUserFriendlyException(input.Voucher == null, "璇锋彁浜ゅ厖鍊煎嚟璇�");
+ var repeat = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.OrderNo == input.OrderNo).FirstOrDefaultAsync();
+ CheckExtensions.IfTrueThrowUserFriendlyException(repeat != null && repeat.Id != input.Id, "涓氬姟璁㈠崟鍙烽噸澶�");
+ if (input.Id.HasValue)
+ {
+ var payRechargeReceipts = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.Id == input.Id.Value).FirstOrDefaultAsync();
+ payRechargeReceipts.OrderNo = input.OrderNo;
+ payRechargeReceipts.RechargeAmount = input.RechargeAmount;
+ payRechargeReceipts.Remark = input.Remark;
+ payRechargeReceipts.Voucher = input.Voucher;
+ }
+ else
+ {
+ LifePayRechargeReceipts payRechargeReceipts = new LifePayRechargeReceipts()
+ {
+ Id = Guid.NewGuid(),
+ OrderNo = input.OrderNo,
+ RechargeAmount = input.RechargeAmount,
+ Remark = input.Remark,
+ Voucher = input.Voucher,
+ };
+ await _lifePayRechargeReceiptsRepository.InsertAsync(payRechargeReceipts);
+ }
+ }
+
+
+ /// <summary>
/// 鎻掑叆鏀舵敮娴佹按
/// </summary>
/// <param name="input"></param>
@@ -256,10 +300,33 @@
await AddLifePayExpensesReceipts(input);
}
-
}
}
-
+ }
+
+ public async Task GetAllChannlesRake()
+ {
+ var orderlist = await _lifePayOrderRepository.Where(x => x.IsDeleted == false && x.PayStatus == LifePayStatusEnum.宸叉敮浠� && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�).ToListAsync();
+ foreach (var item in orderlist)
+ {
+ /// 姣涘埄
+ var grossProfit = item.RechargeAmount * (item.ChannleRate - item.PlatformRate) / 100;
+ /// 娓犻亾浣i噾 锛�(鍏呭�奸潰棰� * 娓犻亾鎶樻墸姣斾緥)-(鍏呭�奸潰棰� * 骞冲彴鎶樻墸姣斾緥)锛�* 浣i噾姣斾緥
+ var channlesRakePrice = grossProfit * (item.ChannlesRakeRate) / 100;
+ if (channlesRakePrice.HasValue)
+ {
+ LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake()
+ {
+ OrderNo = item.OrderNo,
+ PayAmount = item.PayAmount.Value,
+ ChannlesRakeRate = item.ChannlesRakeRate.Value,
+ ChannlesRakePrice = channlesRakePrice.Value,
+ FinishTime = item.FinishTime.Value,
+ ChannelId = item.ChannelId,
+ };
+ await _lifePayChannlesRakeRepository.InsertAsync(lifePayChannlesRake);
+ }
+ }
}
}
}
diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
index b385f25..7547c44 100644
--- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -44,34 +44,34 @@
{
var today = DateTime.Now.Date;
var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.Date == today)
- .WhereIf(string.IsNullOrWhiteSpace(channleId), x => x.Channel == channleId)
+ .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId)
.FirstOrDefaultAsync();
if (statistics == null)
{
/// 绱鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱
var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus != LifePayStatusEnum.鏈敮浠�)
- .WhereIf(string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�).SumAsync(x => (x.RefundPrice ?? 0));
+ .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�).SumAsync(x => (x.RefundPrice ?? 0));
/// 鏄ㄦ棩鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱
var receiptsYesterday = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.PayStatus == LifePayStatusEnum.宸叉敮浠�)
- .WhereIf(string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�).SumAsync(x => (x.RefundPrice ?? 0));
+ .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�).SumAsync(x => (x.RefundPrice ?? 0));
/// 绱鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵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));
+ .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();
+ var accumulatedOrders = await _lifePayOrderRepository.Where(x => x.CreationTime < today).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync();
/// 鏄ㄦ棩涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛�
var ordersNumYesterday = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today)
- .WhereIf(string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync();
+ .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync();
/// 鏄ㄦ棩鎴愬姛锛氱粺璁″钩鍙颁腑璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚/閮ㄥ垎鍏呭�兼垚鍔熲�濅笖璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛�
var yesterdaySuccess = 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 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();
+ .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.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.WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).Where(x => x.LastLoginTime >= today.AddDays(-1)).CountAsync();
var entity = new DallyStatistics()
{
@@ -87,7 +87,7 @@
YesterdayFail = yesterdayFail,
AccumulatedUsers = accumulatedUsers,
YesterdayActiveUsers = yesterdayActiveUsers,
- Channel = channleId
+ ChannelId = channleId
};
await _dallyStatisticsRepository.InsertAsync(entity);
diff --git a/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs b/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs
index 5b90509..d5b6125 100644
--- a/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs
+++ b/LifePayment/LifePayment.Domain/LifePay/DallyStatistics.cs
@@ -66,5 +66,5 @@
/// <summary>
/// 缁熻娓犻亾
/// </summary>
- public string Channel { get; set; }
+ public string ChannelId { get; set; }
}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs
new file mode 100644
index 0000000..4eb4d14
--- /dev/null
+++ b/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs
@@ -0,0 +1,57 @@
+锘縰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 LifePayChannlesRake : FullAuditedEntity<Guid>, IDataUserFilter
+ {
+ public LifePayChannlesRake()
+ {
+ }
+
+ /// <summary>
+ /// 骞冲彴璁㈠崟鍙�
+ /// </summary>
+ public string OrderNo { get; set; }
+
+ /// <summary>
+ /// 鎴愪氦閲戦
+ /// </summary>
+ public decimal PayAmount { get; set; }
+
+
+ /// <summary>
+ /// 娓犻亾浣i噾姣斾緥
+ /// </summary>
+ public decimal ChannlesRakeRate { get; set; }
+
+ /// <summary>
+ /// 浣i噾
+ /// </summary>
+ public decimal ChannlesRakePrice { get; set; }
+
+ /// <summary>
+ /// 缁撶畻鏃堕棿
+ /// </summary>
+ public DateTime FinishTime { get; set; }
+
+ /// <summary>
+ /// 鎷撳睍灞炴��
+ /// </summary>
+ public string ExtraProperties { get; set; }
+
+ /// <summary>
+ /// 涓嬪崟娓犻亾
+ /// </summary>
+ public string ChannelId { get; set; }
+ }
+}
diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
index af9e688..796362e 100644
--- a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
+++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
@@ -29,6 +29,8 @@
public virtual DbSet<LifePayExpensesReceipts> LifePayExpensesReceipts { get; set; }
+ public virtual DbSet<LifePayChannlesRake> LifePayChannlesRake { get; set; }
+
public virtual DbSet<Area> Area { get; set; }
public virtual DbSet<User> Users { get; set; }
diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
index c696fbb..e545425 100644
--- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -267,6 +267,13 @@
<param name="input"></param>
<returns></returns>
</member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesRakePage(LifePayment.Application.Contracts.LifePayChannlesRakePageInput)">
+ <summary>
+ 鑾峰彇娓犻亾鍒嗕剑鍒嗛〉鍒楄〃
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
<member name="M:LifePayment.HttpApi.LifePayController.GetLifePayExpensesReceiptsPage(LifePayment.Application.Contracts.LifePayExpensesReceiptsPageInput)">
<summary>
鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁
@@ -308,6 +315,12 @@
</summary>
<returns></returns>
</member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetAllChannlesRake">
+ <summary>
+ 鍚屾璁㈠崟
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:LifePayment.HttpApi.LifePayController.CreateLifePayPhoneOrder(LifePayment.Application.Contracts.CreateLifePayOrderInput{LifePayment.Application.Contracts.LifePhoneData})">
<summary>
鍒涘缓鐢熸椿缂磋垂璇濊垂璁㈠崟
diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
index 8b3f52e..6a12b8b 100644
--- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -836,6 +836,36 @@
浜ゆ槗閲戦
</summary>
</member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.KeyWord">
+ <summary>
+ 鏌ヨ鏉′欢
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.ChannelId">
+ <summary>
+ 娓犻亾鍙�
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.CreationTimeBegin">
+ <summary>
+ 璧峰涓嬪崟鏃堕棿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.CreationTimeEnd">
+ <summary>
+ 缁撴潫涓嬪崟鏃堕棿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.FinishTimeBegin">
+ <summary>
+ 璧峰缁撶畻鏃堕棿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakePageInput.FinishTimeEnd">
+ <summary>
+ 缁堟缁撶畻鏃堕棿
+ </summary>
+ </member>
<member name="P:LifePayment.Application.Contracts.LifePayIntroInfoInput.LifePayType">
<summary>
鐢熸椿缂磋垂绫诲瀷
@@ -1781,11 +1811,61 @@
瀹為檯鏀跺叆
</summary>
</member>
+ <member name="P:LifePayment.Application.Contracts.LifePayLifePayChannlesRakeStatistics.TotalRakePrice">
+ <summary>
+ 鍚堣浣i噾
+ </summary>
+ </member>
<member name="P:LifePayment.Application.Contracts.ReceiptsListOutPut.CreationTime">
<summary>
鍒涘缓鏃堕棿
</summary>
</member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.Id">
+ <summary>
+ 缂栧彿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.OrderNo">
+ <summary>
+ 骞冲彴璁㈠崟鍙�
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.PayAmount">
+ <summary>
+ 鎴愪氦閲戦
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.ChannlesRakeRate">
+ <summary>
+ 娓犻亾浣i噾姣斾緥
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.ChannlesRakePrice">
+ <summary>
+ 浣i噾
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.FinishTime">
+ <summary>
+ 缁撶畻鏃堕棿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.CreationTime">
+ <summary>
+ 涓嬪崟鏃堕棿
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.ExtraProperties">
+ <summary>
+ 鎷撳睍灞炴��
+ </summary>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayChannlesRakeListOutput.ChannelId">
+ <summary>
+ 涓嬪崟娓犻亾
+ </summary>
+ </member>
<member name="P:LifePayment.Application.Contracts.RecordOperateHistoryEto.RelationId">
<summary>
鍏宠仈鍏崇郴ID
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index 96e2a15..e51e445 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -443,6 +443,17 @@
}
/// <summary>
+ /// 鑾峰彇娓犻亾鍒嗕剑鍒嗛〉鍒楄〃
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input)
+ {
+ return await _lifePayOrderService.GetLifePayChannlesRakePage(input);
+ }
+
+ /// <summary>
/// 鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁
/// </summary>
/// <param name="input"></param>
@@ -539,7 +550,17 @@
await _lifePayOrderService.GetAllLifePayExpensesReceipts();
}
-
+ /// <summary>
+ /// 鍚屾璁㈠崟
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet]
+ [AllowAnonymous]
+ public async Task GetAllChannlesRake()
+ {
+ await _lifePayOrderService.GetAllChannlesRake();
+ }
+
#endregion
--
Gitblit v1.10.0