fix 覆盖保存

This commit is contained in:
2024-07-08 14:04:59 +08:00
parent d1b450471e
commit f79844281d

View File

@@ -91,8 +91,12 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
var shiftCode = requests[0].ShiftCode;
var shift = await CheckExistsShiftAsync(shiftCode);
await _dbContext.Deleteable<BusinessShiftMealRelationshipEntity>().Where(x => x.ShiftCode == shiftCode).ExecuteCommandAsync();
foreach (var request in requests)
{
request.Id = null;
await CheckExistsMealShiftAsync(request);
await DuplicateTimePeriodAsync(request);