细节调整
This commit is contained in:
parent
32e9ced4dc
commit
12bf8601ea
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue