fix id返回,仅判断meal设,移除心跳间隔30秒判断
This commit is contained in:
@@ -126,10 +126,14 @@ public class DeviceService : IDeviceService
|
||||
var item = request[i];
|
||||
await SaveAsync(item);
|
||||
|
||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == item.UniqueNo).FirstAsync();
|
||||
businessPlaces.Any(x => x.Code == item.BusinessPlaceCode).ThrowIfFalse("营业点不存在");
|
||||
registry.BusinessPlaceCode = item.BusinessPlaceCode;
|
||||
await _dbContext.UpdateAsync(registry);
|
||||
if (item.Type == DeviceTypeEnumType.Meal)
|
||||
{
|
||||
|
||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == item.UniqueNo).FirstAsync();
|
||||
businessPlaces.Any(x => x.Code == item.BusinessPlaceCode).ThrowIfFalse("营业点不存在");
|
||||
registry.BusinessPlaceCode = item.BusinessPlaceCode;
|
||||
await _dbContext.UpdateAsync(registry);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -269,7 +273,7 @@ public class DeviceService : IDeviceService
|
||||
_dbContext.Client.QueryFilter.Restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<List<DeviceResponse>> GetAttendanceDevicesAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user