细节调整

This commit is contained in:
yanghongwei 2025-04-18 20:33:01 +08:00
parent 32e9ced4dc
commit 12bf8601ea
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@ namespace LY.App.Service
public async Task<ApiResult> Add(AddDevice input)
{
var entity = input.Adapt<DeviceEntity>();
var exists = await _db.Queryable<DeviceEntity>().FirstAsync(s => s.DeviceSN == entity.DeviceSN);
if (exists!= null)
var exists = await _db.Queryable<DeviceEntity>().FirstAsync(s => s.DeviceSN == entity.DeviceSN && s.IsDeleted == false);
if (exists != null)
{
return new ApiResult()
{