From 6b289dd1a8c87e64247fd6c0dd486b077b9ed21e Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期三, 02 四月 2025 16:47:39 +0800
Subject: [PATCH] fix:bug修复

---
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index c8f1967..54cb8e9 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -607,9 +607,9 @@
         return await GetLifePayChannlesListFilter().GetPageResult(input.PageModel);
     }
 
-    public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList()
+    public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList(QueryLifePayChannlesInput input)
     {
-        return await GetLifePayChannlesListFilter().Where(x => x.Status == LifePayChannelsStatsEnum.鍚敤).ToListAsync();
+        return await GetLifePayChannlesListFilter().WhereIf(input.Status.HasValue,x => x.Status == input.Status).ToListAsync();
     }
 
     public async Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id)
@@ -1416,6 +1416,7 @@
 
         if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�)
         {
+            ///缁撶畻娓犻亾浣i噾
             /// 姣涘埄
             var grossProfit = order.RechargeAmount * (order.ChannleRate - order.PlatformRate) / 100;
             /// 娓犻亾浣i噾  锛�(鍏呭�奸潰棰� * 娓犻亾鎶樻墸姣斾緥)-(鍏呭�奸潰棰� * 骞冲彴鎶樻墸姣斾緥)锛�* 浣i噾姣斾緥
@@ -1425,9 +1426,9 @@
                 LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake()
                 {
                     OrderNo = order.OrderNo,
-                    PayAmount = order.PayAmount.Value,
-                    ChannlesRakeRate = order.ChannlesRakeRate.Value,
-                    ChannlesRakePrice = channlesRakePrice.Value,
+                    PayAmount = order.RechargeAmount ?? 0,
+                    ChannlesRakeRate = order.ChannlesRakeRate ?? 0,
+                    ChannlesRakePrice = channlesRakePrice ?? 0,
                     FinishTime = order.FinishTime.Value,
                     ChannelId = order.ChannelId,
                 };
@@ -1673,17 +1674,6 @@
         userAccount.DeletionTime = DateTime.Now;
         userAccount.IsDeleted = true;
 
-        /// 娓呴櫎鎴峰彿瀵瑰簲鐨勭敤鎴峰鍚�
-        if (userAccount.LifePayType == LifePayOrderTypeEnum.PhoneOrder || userAccount.LifePayType == LifePayOrderTypeEnum.ElectricOrder)
-        {
-            var user = await _lifePayUserRepository.Where(r => r.Id == userAccount.UserId && !r.IsDeleted).FirstOrDefaultAsync();
-            CheckExtensions.IfTrueThrowUserFriendlyException(user == null, "鐢ㄦ埛涓嶅瓨鍦�");
-            var extraProperties = JsonConvert.DeserializeObject<Model_UserAccountExtraProperties>(userAccount.ExtraProperties);
-            if (!string.IsNullOrEmpty(extraProperties.Name) && extraProperties.Phone == user.PhoneNumber)
-            {
-                user.Name = string.Empty;
-            }
-        }
         return Constant.SUCCESS;
     }
 
@@ -2234,7 +2224,7 @@
         var channlesRakePrice = grossProfit * (channlesRakeRate) / 100;
 
         /// 鍒╂鼎
-        var profit = grossProfit - channlesRakePrice - (premiumRate);
+        var profit = grossProfit - channlesRakePrice - premiumPrice;
 
         return new OrderPriceReturn()
         {

--
Gitblit v1.9.1