From eb1da8e82cb3331f65144562479af1c9fab2d1fd Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期一, 24 三月 2025 14:48:30 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 102 +++++++++++++++++++++++++ LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 57 ++++++++++++++ LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs | 4 LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs | 4 LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 29 +++---- 5 files changed, 175 insertions(+), 21 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs index 41279f3..dd567e3 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs @@ -58,7 +58,7 @@ /// <param name="acoolyStatus"></param> /// <param name="payAmount"></param> /// <returns></returns> - Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount); + Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount, string refundApplyRemark); /// <summary> /// 鍒涘缓鐢熸椿缂磋垂璇濊垂璁㈠崟 @@ -258,7 +258,7 @@ Task<List<LifePayOrderListTemplate>> GetLifePayOrderPageExport(QueryLifePayOrderListInput input); - Task<List<LifePayOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input); + Task<List<LifePayRefundOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input); Task<string> GetBillErceiptExport(string orderNo); diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs index ef263de..da36ea5 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs @@ -176,6 +176,11 @@ public string OrderNo { get; set; } /// <summary> + /// 閫�娆捐鍗曞彿 + /// </summary> + public string RefundOrderNo { get; set; } + + /// <summary> /// 鍏呭�奸噾棰� /// </summary> public decimal RechargeAmount { get; set; } @@ -379,6 +384,103 @@ } + +public class LifePayRefundOrderListTemplate +{ + + [Name("搴忓彿")] + public int SerialNumber { get; set; } + + [Name("鎵嬫満鍙�")] + public string PhoneNumber { get; set; } + + public LifePayTypeEnum? LifePayType { get; set; } + + public LifePayOrderTypeEnum LifePayOrderType { get; set; } + + [Name("鍏呭�肩被鍨�")] + public string LifePayOrderTypeStr { get; set; } + + [Name("鍏呭�兼笭閬�")] + public string ChannelName { get; set; } + + /// <summary> + /// 閫�娆剧敵璇锋椂闂� + /// </summary> + [Name("鐢宠閫�娆炬椂闂�")] + public string RefundApplyTimeStr { get; set; } + + /// <summary> + /// 涓嬪崟鏃堕棿 + /// </summary> + public DateTime CreationTime { get; set; } + + [Name("涓嬪崟鏃堕棿")] + public string CreationTimeStr { get; set; } + + [Name("閫�娆捐鍗曞彿")] + public string RefundOrderNo { get; set; } + + + [Name("鍏呭�奸噾棰�")] + public string RechargeAmountStr { get; set; } + + + /// <summary> + /// 鍏呭�奸噾棰� + /// </summary> + public decimal RechargeAmount { get; set; } + + /// <summary> + /// 瀹為檯鍒拌处閲戦 + /// </summary> + [Name("瀹為檯鍒拌处閲戦")] + public string ActualReceivedAmount { get; set; } + + /// <summary> + /// 瀹炰粯閲戦 + /// </summary> + public decimal PayAmount { get; set; } + + [Name("瀹炰粯閲戦")] + public string PayAmountStr { get; set; } + + [Name("閫�娆炬笭閬�")] + public string LifePayTypeStr { get; set; } + + /// <summary> + /// 閫�娆鹃噾棰� + /// </summary> + [Name("閫�娆鹃噾棰�")] + public decimal? RefundPrice { get; set; } + + + public ACOOLYStatusEnum ACOOLYStatus { get; set; } + + /// <summary> + /// 渚涘簲鍟嗚鍗曠姸鎬� + /// </summary> + [Name("渚涘簲鍟嗚鍗曠姸鎬�")] + public string ACOOLYStatusStr { get; set; } + + + /// <summary> + /// 瀹屾垚鏃堕棿 + /// </summary> + public DateTime? FinishTime { get; set; } + + + /// <summary> + /// 骞冲彴閫�娆剧姸鎬� + /// </summary> + [Name("骞冲彴閫�娆剧姸鎬�")] + public string LifePayRefundStatus { get; set; } + + [Name("瀹屾垚鏃堕棿")] + public string FinishTimeStr { get; set; } + + +} public class UserLifePayOrderOutput { public Guid Id { get; set; } diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 374d703..0db8bd2 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -354,41 +354,33 @@ /// </summary> /// <param name="input"></param> /// <returns></returns> - public async Task<List<LifePayOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input) + public async Task<List<LifePayRefundOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input) { - var result = await (await GetLifePayRefundOrderListFilter(input)).Select(x => new LifePayOrderListTemplate + var result = await (await GetLifePayRefundOrderListFilter(input)).Select(x => new LifePayRefundOrderListTemplate { - DiscountAmount = x.DiscountAmount, FinishTime = x.FinishTime, - LifePayOrderStatus = x.LifePayOrderStatus, + RefundPrice = x.RefundPrice, LifePayOrderType = x.LifePayOrderType, LifePayType = x.LifePayType, - OrderNo = x.OrderNo, PayAmount = x.PayAmount, PhoneNumber = x.PhoneNumber, - RechargeAmount = x.RechargeAmount, - OutOrderNo = x.OutOrderNo, - PayStatus = x.PayStatus, - PayTime = x.PayTime, - ACOOLYOrderNo = x.ACOOLYOrderNo, - CreationTime = x.CreationTime, - RefundApplyRemark = x.RefundApplyRemark, + RefundOrderNo = x.RefundOrderNo, ChannelName = x.ChannelName }).OrderByDescending(r => r.CreationTime).ToListAsync(); var i = 0; result.ForEach(s => { s.SerialNumber = ++i; + s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription(); s.LifePayOrderTypeStr = s.LifePayOrderType.GetDescription(); s.CreationTimeStr = s.CreationTime.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); s.RechargeAmountStr = s.RechargeAmount.ToString("F2"); + s.ActualReceivedAmount = s.ActualReceivedAmount; + s.LifePayRefundStatus = s.LifePayRefundStatus.GetDescription(); s.PayAmountStr = s.PayAmount.ToString("F2"); - s.PayTimeStr = !s.PayTime.HasValue ? string.Empty : s.PayTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); s.LifePayTypeStr = s.LifePayType.GetDescription(); - s.PayStatusStr = s.PayStatus.GetDescription(); - s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); }); return result; @@ -1267,7 +1259,7 @@ /// <param name="orderNo"></param> /// <param name="outOrderNo"></param> /// <returns></returns> - public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount) + public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount,string refundApplyRemark) { var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync(); CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�"); @@ -1282,7 +1274,10 @@ { order.ACOOLYOrderNo = acoolyOrderNo; } - + if (refundApplyRemark.IsNotNullOrEmpty()) + { + order.RefundApplyRemark = refundApplyRemark; + } order.LifePayOrderStatus = status; order.ACOOLYStatus = acoolyStatus; diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml index af8a7c3..d1566ed 100644 --- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml +++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml @@ -42,7 +42,7 @@ <param name="outOrderNo"></param> <returns></returns> </member> - <member name="M:LifePayment.Application.Contracts.ILifePayService.ACOOLYOrderNotifyHandler(System.String,System.String,LifePayment.Domain.Shared.LifePayOrderStatusEnum,LifePayment.Domain.Shared.ACOOLYStatusEnum,System.Decimal)"> + <member name="M:LifePayment.Application.Contracts.ILifePayService.ACOOLYOrderNotifyHandler(System.String,System.String,LifePayment.Domain.Shared.LifePayOrderStatusEnum,LifePayment.Domain.Shared.ACOOLYStatusEnum,System.Decimal,System.String)"> <summary> 渚涘簲鍟嗗洖璋冨鐞� </summary> @@ -526,6 +526,11 @@ 璁㈠崟鐘舵�� </summary> </member> + <member name="P:LifePayment.Application.Contracts.QueryLifePayRefundOrderListInput.LifePayRefundStatus"> + <summary> + 璁㈠崟鐘舵�� + </summary> + </member> <member name="P:LifePayment.Application.Contracts.QueryLifePayRefundOrderListInput.UserId"> <summary> 鐢ㄦ埛Id @@ -731,6 +736,11 @@ 璁㈠崟鍙� </summary> </member> + <member name="P:LifePayment.Application.Contracts.LifePayOrderListOutput.RefundOrderNo"> + <summary> + 閫�娆捐鍗曞彿 + </summary> + </member> <member name="P:LifePayment.Application.Contracts.LifePayOrderListOutput.RechargeAmount"> <summary> 鍏呭�奸噾棰� @@ -871,6 +881,51 @@ 瀹屾垚鏃堕棿 </summary> </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.RefundApplyTimeStr"> + <summary> + 閫�娆剧敵璇锋椂闂� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.CreationTime"> + <summary> + 涓嬪崟鏃堕棿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.RechargeAmount"> + <summary> + 鍏呭�奸噾棰� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.ActualReceivedAmount"> + <summary> + 瀹為檯鍒拌处閲戦 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.PayAmount"> + <summary> + 瀹炰粯閲戦 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.RefundPrice"> + <summary> + 閫�娆鹃噾棰� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.ACOOLYStatusStr"> + <summary> + 渚涘簲鍟嗚鍗曠姸鎬� + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.FinishTime"> + <summary> + 瀹屾垚鏃堕棿 + </summary> + </member> + <member name="P:LifePayment.Application.Contracts.LifePayRefundOrderListTemplate.LifePayRefundStatus"> + <summary> + 骞冲彴閫�娆剧姸鎬� + </summary> + </member> <member name="P:LifePayment.Application.Contracts.UserLifePayOrderOutput.LifePayType"> <summary> 鐢熸椿缂磋垂鏀粯绫诲瀷 diff --git a/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs index 8c2b4be..82e8728 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/ACOOLYNotifyController.cs @@ -56,6 +56,7 @@ ACOOLYStatusEnum acoolyStatus = ACOOLYStatusEnum.鍏呭�煎け璐�; var acoolyOrderNo = string.Empty; decimal payAmount = 0; + string refundApplyRemark = string.Empty; _logger.LogError("ACOOLY鍥炶皟閫氬鐞嗙被鍨嬶細" + baseInfo.Service); _logger.LogError("ACOOLY鍥炶皟鍐呭锛�" + body); switch (baseInfo.Service) @@ -90,6 +91,7 @@ { status = LifePayOrderStatusEnum.寰呴��娆�; acoolyStatus = ACOOLYStatusEnum.鍏呭�煎け璐�; + refundApplyRemark = "渚涘簲鍟嗗厖鍊煎け璐�"; } else if (confirmElectricOrderResponse.ElectricChargeOrder.Status == ACOOLYConstant.Status.閫�娆句腑) @@ -216,7 +218,7 @@ throw new UserFriendlyException("ACOOLY鍥炶皟閫氬鐞嗙被鍨嬩笉瀛樺湪"); } - await _lifePayService.ACOOLYOrderNotifyHandler(orderNo, acoolyOrderNo, status, acoolyStatus, payAmount); + await _lifePayService.ACOOLYOrderNotifyHandler(orderNo, acoolyOrderNo, status, acoolyStatus, payAmount, refundApplyRemark); } } } \ No newline at end of file -- Gitblit v1.9.1