diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index fbc9b0262..69447975d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -216,8 +216,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { cardFavorableLambdaQueryWrapper.in(CardFavorable::getOilType,transferDTO.getOilName()); cardFavorableLambdaQueryWrapper.le(CardFavorable::getSatisfiedAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters()); List list1 = cardFavorableService.list(cardFavorableLambdaQueryWrapper); - BeanUtils.copyProperties(list1.get(0), exchangeFavorableVO); - exchangeFavorableVOArrayList.add(exchangeFavorableVO); + if (list1.size()>0){ + BeanUtils.copyProperties(list1.get(0), exchangeFavorableVO); + exchangeFavorableVOArrayList.add(exchangeFavorableVO); + } } return exchangeFavorableVOArrayList; }