6/21 修复检查菜品是否包含在套餐中的功能
This commit is contained in:
parent
78c5b00f5d
commit
cf890bc32b
@ -198,10 +198,9 @@ public class DishController {
|
|||||||
for(Long id:ids){
|
for(Long id:ids){
|
||||||
LambdaQueryWrapper<SetmealDish> wrapper=new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SetmealDish> wrapper=new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(SetmealDish::getDishId,id);
|
wrapper.eq(SetmealDish::getDishId,id);
|
||||||
if(setmealDishService.list(wrapper)!=null) {
|
if(setmealDishService.count(wrapper)!=0) {
|
||||||
return new Result().error("存在套餐内含有该菜品");
|
return new Result().error("存在套餐内含有该菜品");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dishService.delete(ids);
|
dishService.delete(ids);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user