diff --git a/renren-admin/src/main/java/io/renren/modules/takeout/controller/DishController.java b/renren-admin/src/main/java/io/renren/modules/takeout/controller/DishController.java index 8a0e6a5..aca6b8c 100644 --- a/renren-admin/src/main/java/io/renren/modules/takeout/controller/DishController.java +++ b/renren-admin/src/main/java/io/renren/modules/takeout/controller/DishController.java @@ -198,10 +198,9 @@ public class DishController { for(Long id:ids){ LambdaQueryWrapper 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);