This commit is contained in:
tanglong 2025-07-01 13:19:30 +08:00
parent 004d95d99f
commit d8a77cfbaf
8 changed files with 7 additions and 5 deletions

View File

@ -180,11 +180,11 @@ namespace YD_AllHeartRates.Api.Services.Impl
/// <summary>
/// 删除设备
/// </summary>
/// <param name="deviceId"></param>
/// <param name="code"></param>
/// <returns></returns>
public async Task<bool> DeleteDevice(int deviceId)
public async Task<bool> DeleteDevice(string code)
{
var device = await _sportsContext.Device.Where(x => x.Id == deviceId).FirstOrDefaultAsync();
var device = await _sportsContext.Device.Where(x => x.Code == code).FirstOrDefaultAsync();
if (device == null)
throw new Exception("更新的设备不存在");
@ -222,10 +222,12 @@ namespace YD_AllHeartRates.Api.Services.Impl
{
throw new Exception("设备编号不能为空");
}
if (data.DeviceType == null || data.DeviceType == 0)
{
throw new Exception("设备类型不能为空");
}
if (string.IsNullOrWhiteSpace(data.StudentNo))
{
throw new Exception("学生学号不能为空");

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+78b4b7a2dca0a722e2d52135db6742f4c132cfcb")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+004d95d99ff99178d85706baa65f942e603b27b8")]
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
0ad81329af15c6f44eede5cbc07d595ef76262d21ff1d8c2ee95619147d91d05
844251014a8251e921b70c3a76cc7e48ab9b073be1fbf7aa0468e9ad6b2b596e