From f321f418ae9335e5025f2d7a7dbd89a456d02f25 Mon Sep 17 00:00:00 2001 From: zyx <1029606625@qq.com> Date: Wed, 21 Jun 2023 17:12:24 +0800 Subject: [PATCH] =?UTF-8?q?6/21=20=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E8=8F=9C=E5=93=81=E6=98=AF=E5=90=A6=E5=8C=85=E5=90=AB=E5=9C=A8?= =?UTF-8?q?=E5=A5=97=E9=A4=90=E4=B8=AD=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/modules/takeout/controller/DishController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);