fix 心跳间隔控制
This commit is contained in:
@@ -43,7 +43,6 @@ public class DeviceSaveRequest : IValidatableObject
|
||||
/// <summary>
|
||||
/// 心跳间隔
|
||||
/// </summary>
|
||||
[Range(0, int.MaxValue)]
|
||||
public int HeartbeatInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -83,5 +82,10 @@ public class DeviceSaveRequest : IValidatableObject
|
||||
{
|
||||
yield return new ValidationResult($"{DeviceTypeEnumType.Door.GetDescription()}才可设置作为考勤设备", new[] { nameof(AsAttendance) });
|
||||
}
|
||||
|
||||
if (HeartbeatInterval != 0 && HeartbeatInterval < 30)
|
||||
{
|
||||
yield return new ValidationResult($"心跳间隔需要设置>=30秒", new[] { nameof(HeartbeatInterval) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user