From 87c77582d51a9c0c3c540c2864e5387519482c18 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Mon, 4 Nov 2024 22:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9PageRequest=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=BA=E4=B8=8D=E5=8F=AF=E7=A9=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/NetCorePal.Extensions.Dto/PageRequest.cs | 4 ++-- test/NetCorePal.Web/Application/Queries/OrderQuery.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NetCorePal.Extensions.Dto/PageRequest.cs b/src/NetCorePal.Extensions.Dto/PageRequest.cs index 2cec0f6c..1d05cfc7 100644 --- a/src/NetCorePal.Extensions.Dto/PageRequest.cs +++ b/src/NetCorePal.Extensions.Dto/PageRequest.cs @@ -8,9 +8,9 @@ public class PageRequest /// /// 请求的页码,从1开始 /// - public int? Index { get; set; } + public int Index { get; set; } /// /// 请求的每页条数 /// - public int? Size { get; set; } + public int Size { get; set; } } diff --git a/test/NetCorePal.Web/Application/Queries/OrderQuery.cs b/test/NetCorePal.Web/Application/Queries/OrderQuery.cs index 8ff60789..78de0419 100644 --- a/test/NetCorePal.Web/Application/Queries/OrderQuery.cs +++ b/test/NetCorePal.Web/Application/Queries/OrderQuery.cs @@ -33,7 +33,7 @@ public class OrderQuery(ApplicationDbContext applicationDbContext) /// 是否需要总数 /// /// - public async Task> ListOrderByPage(string? name, int? index, int? size, bool countTotal, CancellationToken cancellationToken) + public async Task> ListOrderByPage(string? name, int index, int size, bool countTotal, CancellationToken cancellationToken) { return await applicationDbContext.Orders .Where(x => string.IsNullOrEmpty(name) || x.Name.Contains(name)) @@ -50,7 +50,7 @@ public async Task> ListOrderByPage(string? name, int /// 每页数量 /// 是否需要总数 /// - public PagedData ListOrderByPageSync(string? name, int? index, int? size, bool countTotal) + public PagedData ListOrderByPageSync(string? name, int index, int size, bool countTotal) { return applicationDbContext.Orders .Where(x => string.IsNullOrEmpty(name) || x.Name.Contains(name))