fix 处理营业点分配功能问题
This commit is contained in:
@@ -27,6 +27,7 @@ public class BusinessPlaceShiftSaveMealShiftRequest : IValidatableObject
|
||||
/// <summary>
|
||||
/// 时间段
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "时间段不可为空")]
|
||||
public TimePeriod TimePeriod { get; set; }
|
||||
|
||||
|
||||
@@ -37,14 +38,14 @@ public class BusinessPlaceShiftSaveMealShiftRequest : IValidatableObject
|
||||
yield return new ValidationResult("时间段配置错误", new[] { nameof(TimePeriod) });
|
||||
}
|
||||
|
||||
if (TimePeriod?.Start == null || TimePeriod?.End == null)
|
||||
if (TimePeriod!.Start == null || TimePeriod!.End == null)
|
||||
{
|
||||
yield return new ValidationResult("时间段配置错误", new[] { nameof(TimePeriod) });
|
||||
}
|
||||
|
||||
if (TimePeriod.Start == TimePeriod.End)
|
||||
if (TimePeriod!.Start == TimePeriod!.End)
|
||||
{
|
||||
yield return new ValidationResult("时间段设置区间有误,开始时段不能等于结束时段.", new[] { nameof(TimePeriod) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user