From 73001d5f8abccc60dc4436fffb0148e5d4c54c1e Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Fri, 30 Apr 2021 09:41:45 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Core/Service/Area/AreaCodeService.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Api/Ewide.Core/Service/Area/AreaCodeService.cs b/Api/Ewide.Core/Service/Area/AreaCodeService.cs index 2e48274..43a7e52 100644 --- a/Api/Ewide.Core/Service/Area/AreaCodeService.cs +++ b/Api/Ewide.Core/Service/Area/AreaCodeService.cs @@ -1,4 +1,5 @@ -using Ewide.Core.Service.Area.Dto; +using Ewide.Core.Extension; +using Ewide.Core.Service.Area.Dto; using Furion.DatabaseAccessor; using Furion.DatabaseAccessor.Extensions; using Furion.DependencyInjection; @@ -94,11 +95,11 @@ namespace Ewide.Core.Service.Area public async Task QueryAreaCodePageList(AreaCodeInput input) { var AreaCodes = await _areaCodeRep.DetachedEntities - .Where(input.LevelType.HasValue ,a=>a.LevelType == input.LevelType) - .Where(!string.IsNullOrEmpty(input.Code),a=>a.Code.StartsWith(input.Code)) - .Where(!string.IsNullOrEmpty(input.ShowCode),a =>a.ShowCode.StartsWith(input.ShowCode)) - .Where(!string.IsNullOrEmpty(input.Name),a =>a.Name.StartsWith(input.Name)) - .Select(p => p.Adapt()).ToPagedListAsync(input.PageNo, input.PageSize); + .Where(input.LevelType.HasValue, a => a.LevelType == input.LevelType) + .Where(!string.IsNullOrEmpty(input.Code), a => a.Code.StartsWith(input.Code)) + .Where(!string.IsNullOrEmpty(input.ShowCode), a => a.ShowCode.StartsWith(input.ShowCode)) + .Where(!string.IsNullOrEmpty(input.Name), a => a.Name.StartsWith(input.Name)) + .ToPageData(input); return XnPageResult.PageResult(AreaCodes); }