fix .
This commit is contained in:
@@ -44,7 +44,7 @@ public class OrderAddRequest : IValidatableObject
|
||||
/// </summary>
|
||||
public DateTime? CostDateTime { get; set; }
|
||||
|
||||
|
||||
|
||||
public bool IsUserId { get; set; }
|
||||
|
||||
|
||||
@@ -58,9 +58,14 @@ public class OrderAddRequest : IValidatableObject
|
||||
|
||||
CostDateTime ??= DateTime.Now;
|
||||
|
||||
if (!IsOffline)
|
||||
{
|
||||
(CostDateTime.Value.AddMinutes(5) < DateTime.Now).ThrowIfTrue("非法请求,时差超出允许范围");
|
||||
}
|
||||
|
||||
if (DeviceUniqueNo.IsEmpty())
|
||||
{
|
||||
yield return new ValidationResult("设备号不能为空", new[] { nameof(DeviceUniqueNo) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user