From 37262f7797191c889bc59837ad88f9164ac27bb5 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Fri, 11 Jul 2025 15:12:09 +0800 Subject: [PATCH] paicu --- YD_AllHeartRates.Api/Services/Impl/DeviceService.cs | 3 ++- YD_AllHeartRates.Commons/Dto/Device/DevicePageListDto.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/YD_AllHeartRates.Api/Services/Impl/DeviceService.cs b/YD_AllHeartRates.Api/Services/Impl/DeviceService.cs index 69473ce..9d6848b 100644 --- a/YD_AllHeartRates.Api/Services/Impl/DeviceService.cs +++ b/YD_AllHeartRates.Api/Services/Impl/DeviceService.cs @@ -51,6 +51,7 @@ namespace YD_AllHeartRates.Api.Services.Impl from s in ds.DefaultIfEmpty() select new DevicePageListDto { + Id = s.Id, Code = d.Code, DeviceType = d.DeviceType, StudentNo = d.StudentNo, @@ -85,7 +86,7 @@ namespace YD_AllHeartRates.Api.Services.Impl res.Total = await query.CountAsync(); - var list = await query + var list = await query.OrderByDescending(x => x.Id) .Skip((dto.PageIndex - 1) * dto.PageSize) .Take(dto.PageSize) .ToListAsync(); diff --git a/YD_AllHeartRates.Commons/Dto/Device/DevicePageListDto.cs b/YD_AllHeartRates.Commons/Dto/Device/DevicePageListDto.cs index 85862d7..cdac2ef 100644 --- a/YD_AllHeartRates.Commons/Dto/Device/DevicePageListDto.cs +++ b/YD_AllHeartRates.Commons/Dto/Device/DevicePageListDto.cs @@ -13,6 +13,7 @@ namespace YD_AllHeartRates.Commons.Dto.Device /// public class DevicePageListDto { + public int Id { get; set; } /// /// 设备的唯一编码 ///