fix 就餐时段保存处理

This commit is contained in:
2024-07-02 10:30:14 +08:00
parent a40ca244cc
commit 1f035abc68

View File

@@ -88,9 +88,14 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
public async Task SaveMealShiftsAsync(List<BusinessPlaceShiftSaveMealShiftRequest> requests)
{
var shiftCode = requests[0].ShiftCode;
await _dbContext.Deleteable<BusinessShiftMealRelationshipEntity>().Where(x => x.ShiftCode == shiftCode).ExecuteCommandAsync();
var shift = await CheckExistsShiftAsync(shiftCode);
foreach (var request in requests)
{
var shift = await CheckExistsShiftAsync(request.ShiftCode);
await CheckExistsMealShiftAsync(request);
await DuplicateTimePeriodAsync(request);