feat 电子餐券
This commit is contained in:
@@ -82,6 +82,11 @@ public class EMealVoucherReceiveRequest : IValidatableObject
|
||||
{
|
||||
yield return new ValidationResult("来宾数量不匹配", new[] { nameof(Number) });
|
||||
}
|
||||
|
||||
if (Details.DistinctBy(x => x.IdNo).Count() != Details.Count)
|
||||
{
|
||||
yield return new ValidationResult("证件信息重复", new[] { "IdNo" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class EMealVoucherService : IEMealVoucherService
|
||||
Phone = x.Phone,
|
||||
Start = x.Start,
|
||||
End = x.End,
|
||||
Amount = x.Amount
|
||||
Balance = x.Amount
|
||||
}).ToList();
|
||||
|
||||
var id = await _dbContext.InsertReturnIdentityAsync(voucher);
|
||||
|
||||
Reference in New Issue
Block a user