From d2f9c5ec0b76276b68b2bf69b159937ea7337e0b Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期三, 26 三月 2025 17:39:25 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentApi --- LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 6906837..a319041 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -402,7 +402,6 @@ var channle = await _lifePayChannlesRep.FirstOrDefaultAsync(r => r.ChannlesNum == order.ChannelId); CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�"); var user = await _lifePayUserRepository.FirstOrDefaultAsync(x => x.Id == order.UserId); - var channlesRakePrice = (order.PayAmount - (order.PlatformDeductionAmount == null ? 0 : order.PlatformDeductionAmount)) * channle.ChannlesRakeRate / 100; var orderpirce = await GetOrderPrice(order.RechargeAmount, order.PayAmount, order.PlatformRate, order.ChannleRate, order.ChannlesRakeRate, order.PremiumRate); @@ -442,7 +441,8 @@ ChannlesRakePrice = orderpirce.ChannlesRakePrice, PremiumRate = order.PremiumRate, PremiumPrice = orderpirce.PremiumPrice, - Profit = orderpirce.Profit + Profit = orderpirce.Profit, + RefundOrderNo = order.RefundOrderNo, }; return result; @@ -729,7 +729,7 @@ { DiscountAmount = x.DiscountAmount, FinishTime = x.FinishTime, - //LifePayOrderStatus = x.LifePayOrderStatus, + LifePayOrderStatus = x.LifePayOrderStatus, LifePayOrderType = x.LifePayOrderType, LifePayType = x.LifePayType, OrderNo = x.OrderNo, @@ -762,7 +762,7 @@ s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2"); s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.鏃犻渶閫�娆� ? "" : s.LifePayRefundStatus.GetDescription(); s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription(); - //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); + s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss); }); return result; @@ -1571,9 +1571,9 @@ if (input.LifePayType == LifePayOrderTypeEnum.璇濊垂璁㈠崟) { var extraProperties = JsonConvert.DeserializeObject<Model_UserAccountExtraProperties>(input.ExtraProperties); - if (!string.IsNullOrEmpty(extraProperties.Name)) + if (!string.IsNullOrEmpty(extraProperties.Name) && extraProperties.Phone == user.PhoneNumber) { - user.Name = extraProperties.Phone == user.PhoneNumber ? extraProperties.Name : string.Empty; + user.Name = extraProperties.Name; } } @@ -1655,7 +1655,7 @@ dto.Status = input.Status; #region 璁板綍鏃ュ織 - await PublishLifePayOrderHistoryEvent("娓犻亾绠$悊", "缂栬緫", input.Id.Value, TableType.LifePayChannles); + await LifePayOrderHistory("娓犻亾绠$悊", "缂栬緫", input.Id.Value, TableType.LifePayChannles); #endregion } @@ -1668,7 +1668,7 @@ #region 璁板綍鏃ュ織 - await PublishLifePayOrderHistoryEvent("娓犻亾绠$悊", "鏂板", input.Id.Value, TableType.LifePayChannles); + await LifePayOrderHistory("娓犻亾绠$悊", "鏂板", input.Id.Value, TableType.LifePayChannles); #endregion } @@ -1685,8 +1685,7 @@ #region 璁板綍鏃ュ織 - await PublishLifePayOrderHistoryEvent("娓犻亾绠$悊", status.GetDescription(), id, TableType.LifePayChannles); - + await LifePayOrderHistory("娓犻亾绠$悊", status.GetDescription(), id, TableType.LifePayChannles); #endregion } @@ -1800,10 +1799,10 @@ private (decimal PayAmont, decimal DiscountAmount, decimal RechargeAmount) CalculateAmount(decimal amount, decimal rate) { /// 姝e父鏀粯 - //var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); + var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); /// 1鍒嗛挶鏀粯 - decimal payAmount = 0.01m; + //decimal payAmount = 0.01m; CheckExtensions.IfTrueThrowUserFriendlyException(payAmount < 0.01m, "鏀粯閲戦閿欒"); -- Gitblit v1.9.1