From 731b7a71ef441daee5439b77e4858c878a7ed673 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期一, 09 六月 2025 10:29:52 +0800 Subject: [PATCH] pref:推广员列表新增搜索条件 --- LifePayment/LifePayment.Application/Promoter/PromoterService.cs | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/LifePayment/LifePayment.Application/Promoter/PromoterService.cs b/LifePayment/LifePayment.Application/Promoter/PromoterService.cs index 0df452f..d7c0b1e 100644 --- a/LifePayment/LifePayment.Application/Promoter/PromoterService.cs +++ b/LifePayment/LifePayment.Application/Promoter/PromoterService.cs @@ -66,6 +66,24 @@ ApplyCount = it.ApplyCount, Remark = it.Remark, }); + if (input.StartDate.HasValue) + { + query = query.Where(s => s.CreationTime >= input.StartDate); + } + + if (input.EndDate.HasValue) + { + query = query.Where(s => s.CreationTime <= input.EndDate); + } + + if (!string.IsNullOrEmpty(input.SearchKey)) + { + query = query.Where(s => + s.IdNumber.Contains(input.SearchKey) + || s.PhoneNumber.Contains(input.SearchKey) + || s.Name.Contains(input.SearchKey)); + } + var result = await query.GetPageResult(input.PageModel); return result; } -- Gitblit v1.9.1