From bb228d2969bbe420a9def07024434eb00d6970a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Tue, 20 May 2025 17:20:40 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9=202.?= =?UTF-8?q?=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DroneSsnydManage/DroneSsnyApp.cs | 20 +++++++++---------- .../ServiceControllers/DroneSsnyController.cs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs b/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs index 65da1e2..7e2743c 100644 --- a/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs +++ b/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs @@ -14,13 +14,13 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage { public class DroneSsnyApp : SqlSugarBaseApp { - public DroneSsnyApp(ISugarUnitOfWork unitWork, ISimpleClient repository, IAuth auth) : base(unitWork, repository, auth) + public DroneSsnyApp(ISugarUnitOfWork unitWork, ISimpleClient repository, IAuth auth) + : base(unitWork, repository, auth) { - } /// - /// 超期预警 + /// 到期预警 /// /// /// @@ -31,9 +31,9 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage var endTime = DateTime.Now.AddMonths(2); var list = base.Repository.AsQueryable() - .Where(a => a.end_time <= endTime&&a.end_time>DateTime.Now) - .OrderBy(a => a.end_time, OrderByType.Desc) - .ToPageList(pageIndex, pageSize, ref totalCount); + .Where(a => a.end_time <= endTime && a.end_time > DateTime.Now) + .OrderBy(a => a.end_time, OrderByType.Desc) + .ToPageList(pageIndex, pageSize, ref totalCount); return new PageInfo> { @@ -54,9 +54,9 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage var endTime = DateTime.Now; var list = base.Repository.AsQueryable() - .Where(a => a.end_time a.end_time, OrderByType.Desc) - .ToPageList(pageIndex, pageSize, ref totalCount); + .Where(a => a.end_time < endTime) + .OrderBy(a => a.end_time, OrderByType.Desc) + .ToPageList(pageIndex, pageSize, ref totalCount); return new PageInfo> { @@ -65,4 +65,4 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage }; } } -} +} \ No newline at end of file diff --git a/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs b/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs index 52d1aef..87fc331 100644 --- a/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs +++ b/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs @@ -21,7 +21,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers } /// - /// 超期预警 + /// 到期预警 /// /// ///