fix 处理删除缺少判断

This commit is contained in:
2024-03-21 15:48:59 +08:00
parent c582fb40c0
commit 0eb76e878c

View File

@@ -147,7 +147,9 @@ public class DishesMenuService : IDishesMenuService
var where = LinqExpressionExtension.False<DishesMenuEntity>(); var where = LinqExpressionExtension.False<DishesMenuEntity>();
keys.ForEach(x => keys.ForEach(x =>
{ {
where = where.Or(item => SqlFunc.DateIsSame(item.Date, x.Date, DateType.Day) && item.ShiftType == x.ShiftType); where = where.Or(item => item.BusinessPlaceCode == request.BusinessPlaceCode
&& SqlFunc.DateIsSame(item.Date, x.Date, DateType.Day)
&& item.ShiftType == x.ShiftType);
}); });
await _dbContext.Client.Deleteable<DishesMenuEntity>().Where(where).ExecuteCommandAsync(); await _dbContext.Client.Deleteable<DishesMenuEntity>().Where(where).ExecuteCommandAsync();