添加保护
This commit is contained in:
parent
85ddb86e6a
commit
81f11e3800
|
|
@ -560,6 +560,9 @@ public class CookDishesServiceImpl implements ICookDishesService {
|
|||
Long userId = dishesDetailDTO.getUserId();
|
||||
if (!ObjectUtil.isNull(userId) && userId != -1L) {
|
||||
AppletDishesDetailVO appletDishesDetailVO = cookDishesMapper.selectDishesDetailByDishesId(dishesDetailDTO);
|
||||
if (Objects.isNull(appletDishesDetailVO)) {
|
||||
return null;
|
||||
}
|
||||
Long countDishes = this.cookCollectionDishesMapper.getCountByUserIdAndDishesId(userId, inputDishesId);
|
||||
if (ObjectUtil.isNotNull(countDishes) && countDishes > 0L) {
|
||||
appletDishesDetailVO.setIsFavorites(1);
|
||||
|
|
|
|||
|
|
@ -169,7 +169,8 @@ public class CookRecipeServiceH5Impl implements ICookRecipeH5Service {
|
|||
recipeIdList = this.cookRecipeH5Mapper.selectWeekRecipeId(content.getRecipeId());
|
||||
}
|
||||
if(recipeIdList == null || recipeIdList.size() == 0){
|
||||
throw new ServiceException("本档口没有更早的历史菜谱记录");
|
||||
log.error("本档口没有更早的历史菜谱记录");
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue