From 0149ed26adc14dff38951ca3f915fa1b330bd718 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 24 三月 2025 11:21:20 +0800
Subject: [PATCH] fix:修复订单管理页面搜索bug

---
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index e14b2a2..205f8f8 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -234,6 +234,7 @@
     /// <returns></returns>
     public async Task<PageOutput<LifePayOrderListOutput>> GetLifePayOrderPage(QueryLifePayOrderListInput input)
     {
+        var channles = await _lifePayChannlesRep.Where(x => x.ChannlesName.Contains(input.KeyWords)).Select(x => x.ChannlesNum).ToListAsync();
         var result = await (from a in _channelFilter.GetChannelLifePayOrderFilter(_lifePayOrderRepository)
                       .WhereIf(input.BeginFinishTime.HasValue, x => x.FinishTime >= input.BeginFinishTime)
                                             .WhereIf(input.EndFinishTime.HasValue, x => x.FinishTime <= input.EndFinishTime)
@@ -245,7 +246,7 @@
                                             .WhereIf(input.ACOOLYStatus.HasValue, x => x.ACOOLYStatus == input.ACOOLYStatus.Value)
                                             .WhereIf(input.LifePayOrderType.HasValue, x => x.LifePayOrderType == input.LifePayOrderType.Value)
                                             .WhereIf(input.UserId.HasValue, x => x.UserId == input.UserId.Value)
-                                            .WhereIf(input.KeyWords.IsNotNullOrEmpty(), x => x.PhoneNumber.Contains(input.KeyWords) || x.OrderNo.Contains(input.KeyWords) || x.OutOrderNo.Contains(input.KeyWords) || x.ACOOLYOrderNo.Contains(input.KeyWords))
+                                            .WhereIf(input.KeyWords.IsNotNullOrEmpty(), x => x.OrderNo.Contains(input.KeyWords) || x.OutOrderNo.Contains(input.KeyWords) || x.ACOOLYOrderNo.Contains(input.KeyWords) || channles.Contains(x.ChannelId))
                             join b in _lifePayChannlesRep on a.ChannelId equals b.ChannlesNum into temp
                             from b in temp.DefaultIfEmpty()
                             select new LifePayOrderListOutput

--
Gitblit v1.9.1