请选择营养信息名称

This commit is contained in:
sxu 2025-07-01 15:19:08 +08:00
parent 3692aa3024
commit 41990c1468
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,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(), cookMaterial.getMaterialId()) > 0) {