From beaeb5eade615149df2fb12c52d069a8d6faa26e Mon Sep 17 00:00:00 2001 From: liux <963924687@qq.com> Date: Thu, 17 Apr 2025 18:33:49 +0800 Subject: [PATCH] =?UTF-8?q?H5=E4=B8=80=E5=91=A8=E8=8F=9C=E8=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/menu/mapper/MenuRecipeMapper.java | 3 +++ .../service/impl/MenuRecipeServiceImpl.java | 10 +++++----- .../mapper/menu/MenuRecipeMapper.xml | 19 +++++++++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuRecipeMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuRecipeMapper.java index 6decaa2..5aa1df2 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuRecipeMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuRecipeMapper.java @@ -200,4 +200,7 @@ public interface MenuRecipeMapper extends BaseMapper { List getSnByCanteenId(Long canteenId); int deleteRecipeByrecipeId(Long recipeId); + + List getDeviceIdByDevivce(@Param("canteenId")String canteenId, @Param("stallId")String stallId); + void updateRecipeByCanteeStallMeal(@Param("recipeId")String recipeId, @Param("canteenId")String canteenId, @Param("stallId")String stallId, @Param("deviceIds")List deviceIds); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuRecipeServiceImpl.java index 65354c0..99950ac 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuRecipeServiceImpl.java @@ -136,6 +136,7 @@ public class MenuRecipeServiceImpl extends ServiceImpl deviceTypeList = menuRecipeMapper.getDeviceIdByDevivce(String.valueOf(menuRecipe.getCanteenId()), String.valueOf(menuRecipe.getStallId())); if (ObjectUtil.isEmpty(sortEnum)) { throw new ServiceException(I18n.getMessage("bingType值异常", new Object[0])); } else { @@ -163,15 +164,14 @@ public class MenuRecipeServiceImpl extends ServiceImpl - delete from menu_recipe_detail where id in + delete from menu_recipe_detail where detail_id in #{id} - delete from menu_recipe_dishes where id in + delete from menu_recipe_dishes where detail_id in #{id} @@ -973,5 +973,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from menu_recipe where recipe_id = #{recipeId} + + + update device_recipe set recipe_id = #{ recipeId} + where canteen_id = #{canteenId} and stall_id = #{stallId} + and device_id in + + #{item} + + +