6/21 修复检查菜品是否包含在套餐中的功能

This commit is contained in:
zyx 2023-06-21 17:12:24 +08:00
parent 78c5b00f5d
commit cf890bc32b

View File

@ -198,10 +198,9 @@ public class DishController {
for(Long id:ids){
LambdaQueryWrapper<SetmealDish> wrapper=new LambdaQueryWrapper<>();
wrapper.eq(SetmealDish::getDishId,id);
if(setmealDishService.list(wrapper)!=null) {
if(setmealDishService.count(wrapper)!=0) {
return new Result().error("存在套餐内含有该菜品");
}
}
dishService.delete(ids);