From 8f1dc34334a66a264c97f76ef6a93d16342312fa Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 30 May 2025 16:46:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=8F=9C=E8=B0=B1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/cook/CookRecipeMapper.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeMapper.xml index b7de7d9..4d6c13d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeMapper.xml @@ -420,14 +420,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - SELECT distinct(crd.recipe_detail_id) FROM cook_recipe_detail crd left join cook_recipe cr ON cr.recipe_id = crd.recipe_id - where cr.recipe_id = #{recipeId} and cr.recipe_type = 3 and crd.detail_type = 1 - - UNION + where cr.recipe_id = #{recipeId} and cr.recipe_type = 3 and crd.detail_type = 1 and crd.apply_week in + + #{applyWeek} + + + - + + del_flag = '0' and area_name like concat('%', #{areaName}, '%') and parent_id = #{parentId} and manager = #{manager} @@ -37,12 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicCanteenMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicCanteenMapper.xml index 2423238..f28116c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicCanteenMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicCanteenMapper.xml @@ -40,7 +40,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - where bc.canteen_id = #{canteenId} and bc.del_flag = 0 + where bc.canteen_id = #{canteenId} and bc.del_flag = '0' - + + bs.del_flag = '0' and bs.stall_name like concat('%', #{stallName}, '%') and bs.area_id = #{areaId} and bs.canteen_id = #{canteenId} @@ -65,12 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - cr.del_flag = 0 + ba.del_flag = '0' and bc.del_flag = '0' and bs.del_flag = '0' and cr.del_flag = '0' and cr.recipe_name like concat('%', #{recipeName}, '%') and cr.recipe_type = #{recipeType} and cr.stall_id = #{stallId} @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND recipe_id in + AND cr.recipe_id in #{item} @@ -237,12 +237,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -382,12 +382,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" basic_stall t1 LEFT JOIN basic_canteen t2 ON t1.canteen_id = t2.canteen_id LEFT JOIN basic_area t3 ON t2.area_id = t3.area_id - where 1=1 + where t1.del_flag = '0' and t2.del_flag = '0' and t3.del_flag = '0' AND EXISTS ( select null from cook_recipe_bind_app t4 INNER JOIN cook_recipe t5 on t4.recipe_id = t5.recipe_id - where t5.stall_id = t1.stall_id AND t4.bind_type = #{bindType} + where t5.del_flag = '0' and t5.stall_id = t1.stall_id AND t4.bind_type = #{bindType} and t5.recipe_name like #{recipeName} ) From 070bf9c495dbc3b629b3119909ec6f60d010d1d7 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Sat, 31 May 2025 10:51:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=8F=9C=E8=B0=B1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CookRecipeServiceImpl.java | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java index f72a843..653fb25 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java @@ -241,11 +241,13 @@ public class CookRecipeServiceImpl implements ICookRecipeService { if (!CollectionUtils.isEmpty(cookRecipeDTO.getRecipeDateList())) { for (CookRecipeDateDTO recipeDateDTO : cookRecipeDTO.getRecipeDateList()) { List detailList = recipeDateDTO.getDetailList(); - for (CookRecipeDetailDTO detailDTO : detailList) { - if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据 - continue; + if (!CollectionUtils.isEmpty(detailList)) { + for (CookRecipeDetailDTO detailDTO : detailList) { + if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据 + continue; + } + insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO); } - insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO); } } } @@ -254,11 +256,13 @@ public class CookRecipeServiceImpl implements ICookRecipeService { if (!CollectionUtils.isEmpty(generatedRecipeDateList)) { for (CookRecipeDateDTO recipeDateDTO : generatedRecipeDateList) { List detailList = recipeDateDTO.getDetailList(); - for (CookRecipeDetailDTO detailDTO : detailList) { - if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据 - continue; + if (!CollectionUtils.isEmpty(detailList)) { + for (CookRecipeDetailDTO detailDTO : detailList) { + if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据 + continue; + } + insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO); } - insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO); } } } @@ -293,15 +297,6 @@ public class CookRecipeServiceImpl implements ICookRecipeService { } } recipeDateListNew.add(cookRecipeDateDTO); -// if (!CollectionUtils.isEmpty(cookRecipeDateDTO.getDetailList())) { -// List detailList = cookRecipeDateDTO.getDetailList(); -// for (CookRecipeDetailDTO detail : detailList) { -// if (!CollectionUtils.isEmpty(detail.getDishesList())) { -// recipeDateListNew.add(cookRecipeDateDTO); -// } -// break; -// } -// } } } return recipeDateListNew;