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

This commit is contained in:
zyx 2023-06-21 17:12:24 +08:00
parent b31231caa1
commit f321f418ae

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);