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; } /// /// 设备的唯一编码 ///