From f768672f35f1e0c7bc568f903eb1b86c11b383ee Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 30 Jun 2025 18:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89supermarket=5Fmaterial?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canteen/core/cook/service/impl/CookMaterialServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookMaterialServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookMaterialServiceImpl.java index 84778b9..552dc4e 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookMaterialServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookMaterialServiceImpl.java @@ -62,7 +62,7 @@ public class CookMaterialServiceImpl implements ICookMaterialService { if (StringUtils.isNull(cookMaterial.getMaterialTypeId()) || cookMaterial.getMaterialTypeId() == 0L){ throw new ServiceException("请选择原料类别"); } - if (StringUtils.isNull(cookMaterial.getNutritionId()) || cookMaterial.getNutritionId() == 0L){ + if (cookMaterial.getGoodsType().equals(1L) && (StringUtils.isNull(cookMaterial.getNutritionId()) || cookMaterial.getNutritionId() == 0L)){ throw new ServiceException("请选择营养信息名称"); } if (cookMaterialMapper.checkIsExistByCode(cookMaterial.getMaterialCode(), null) > 0) {