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