From 0562fbb9425809d08da538da95b2eb9dd6992834 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Mon, 23 Jun 2025 17:26:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?0623bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canteen/core/cook/service/impl/CookDishesServiceImpl.java | 2 +- .../src/main/resources/mapper/cook/CookNutritionTypeMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java index 2fa591f..7f44fa4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java @@ -220,7 +220,7 @@ public class CookDishesServiceImpl implements ICookDishesService { log.debug("总和: {}", nutritionEntity.getCalcium()); System.err.println("总和:" + nutritionEntity.getCalcium()); //计算营养成分 - countNum(nutritionEntity, Double.valueOf(cookDishes.getWeight() + "")); +// countNum(nutritionEntity, Double.valueOf(cookDishes.getWeight() + "")); System.err.println("计算后:" + nutritionEntity.getCalcium()); log.debug("计算后: {}", nutritionEntity.getCalcium()); cookDishesMapper.updateFinalNutrition(nutritionEntity, cookDishes.getDishesId()); diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml index 691ef66..37d7162 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml @@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" resultType="com.bonus.canteen.core.cook.domain.CookNutritionType"> where nutrition_type_name = #{nutritionTypeName} - and parent_id = #{nutritionTypeId} + and nutrition_type_id != #{nutritionTypeId} limit 1