From 6990177adb32e5fa264d32f98984abd394c93a7e Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期一, 07 四月 2025 09:19:23 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 4 ++-- LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 18 +++++++++++------- LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs | 6 ------ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs index f2ab0af..5e4627b 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs @@ -1444,7 +1444,7 @@ /// <summary> /// 缁撶畻鏃堕棿 /// </summary> - public DateTime FinishTime { get; set; } + public DateTime? FinishTime { get; set; } /// <summary> /// 涓嬪崟鏃堕棿 @@ -1508,7 +1508,7 @@ /// <summary> /// 缁撶畻鏃堕棿 /// </summary> - public DateTime FinishTime { get; set; } + public DateTime? FinishTime { get; set; } [Name("缁撶畻鏃堕棿")] public string FinishTimeStr { get; set; } diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs index 34c5bb8..6f8ca5a 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs @@ -74,7 +74,7 @@ FrozenStatus = x.FrozenStatus, Flow = x.Flow, DeductionAmount = x.DeductionAmount, - FrozenAmount = x.FrozenAmount.Value + FrozenAmount = x.FrozenAmount ?? 0 }) .GetPageResult(input.PageModel); @@ -82,7 +82,7 @@ var totalFrozenAmount = await _lifePayConsumption.SumAsync(x => x.FrozenAmount); LifePayConsumptionStatistics objectData = new LifePayConsumptionStatistics(); objectData.TotalDeductionAmount = totalDeductionAmount; - objectData.TotalFrozenAmount = totalFrozenAmount.Value; + objectData.TotalFrozenAmount = totalFrozenAmount ?? 0; list.ObjectData = objectData; return list; } @@ -136,7 +136,7 @@ OrderNo = x.OrderNo, OutOrderNo = x.OutOrderNo, LifePayType = x.LifePayType, - ExpensesReceiptsType = x.ExpensesReceiptsType.Value, + ExpensesReceiptsType = x.ExpensesReceiptsType ?? 0, Amount = x.Amount, FinishTime = x.FinishTime }) @@ -213,7 +213,7 @@ s.PayAmountStr = s.PayAmount.ToString("F2"); s.ChannlesRakeRateStr = s.ChannlesRakeRate.ToString("F0") + "%"; s.ChannlesRakePriceStr = s.ChannlesRakePrice.ToString("F2"); - s.FinishTimeStr = s.FinishTime.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss); + s.FinishTimeStr = s.FinishTime.HasValue ? s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss) : ""; }); return result; } @@ -394,8 +394,8 @@ OrderNo = a.OrderNo, OutOrderNo = a.OutOrderNo, RefundOrderNo = a.RefundOrderNo, - LifePayType = a.LifePayType.Value, - Amount = a.PayAmount.Value, + LifePayType = a.LifePayType ?? 0, + Amount = a.PayAmount ?? 0, ExpensesReceiptsType = b.ExpensesReceiptsType }).ToListAsync(); foreach (var item in orderlist) @@ -455,9 +455,13 @@ PayAmount = item.RechargeAmount ?? 0, ChannlesRakeRate = item.ChannlesRakeRate ?? 0, ChannlesRakePrice = channlesRakePrice ?? 0, - FinishTime = item.FinishTime.Value, ChannelId = item.ChannelId, }; + if (item.FinishTime.HasValue) + { + lifePayChannlesRake.FinishTime = item.FinishTime.Value; + } + var repeat = await _lifePayChannlesRakeRepository.Where(x => x.OrderNo == item.OrderNo).AnyAsync(); if (repeat) { diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs index 21ec4ba..faf1cb5 100644 --- a/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs +++ b/LifePayment/LifePayment.Domain/LifePay/LifePayChannlesRake.cs @@ -1,11 +1,5 @@ 锘縰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 { -- Gitblit v1.9.1