From 92f669102507b3c5f504f719019cf88ee4d5c975 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 21 Nov 2023 11:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ActiveExchangeServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }