fix 处理删除缺少判断
This commit is contained in:
@@ -147,7 +147,9 @@ public class DishesMenuService : IDishesMenuService
|
||||
var where = LinqExpressionExtension.False<DishesMenuEntity>();
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user