From 9da6684bf0aab3ce47ffaf63687b4b018c411bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 22 Nov 2023 13:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ActiveExchangeServiceImpl.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 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 e87154f9a..3d4b32e17 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 @@ -156,14 +156,12 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0); fullminusLambdaQueryWrapper.orderByDesc(ActiveFullminus::getCreateTime); - //会员等级判断 - Integer id = userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId(); - //符合油号判断 - fullminusLambdaQueryWrapper.in(ActiveFullminus::getAdaptOil,transferDTO.getOilName()); List activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper); for (ActiveFullminus activeFullminus : activeFullminusList) { MaxoutVO maxoutVO = new MaxoutVO(); - if (activeFullminus.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){ + // 会员等级判断、符合油号判断 + if (activeFullminus.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId())) && + activeFullminus.getAdaptOil().contains(String.valueOf(transferDTO.getOilName()))){ BeanUtils.copyProperties(activeFullminus,maxoutVO); LambdaQueryWrapper queryWrappers = new LambdaQueryWrapper<>(); queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId()); @@ -182,13 +180,13 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { discountLambdaQueryWrapper.eq(ActiveDiscount::getStatus,0); discountLambdaQueryWrapper.orderByDesc(ActiveDiscount::getCreateTime); //符合油号判断 - discountLambdaQueryWrapper.in(ActiveDiscount::getAdaptOil,transferDTO.getOilName()); List activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper); //获取兑换物品信息 for (ActiveDiscount activeDiscount : activeDiscountList) { MaxoutVO maxoutVO = new MaxoutVO(); - - if (activeDiscount.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){ + // 会员等级判断、符合油号判断 + if (activeDiscount.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId())) && + activeDiscount.getAdaptOil().contains(String.valueOf(transferDTO.getOilName()))){ BeanUtils.copyProperties(activeDiscount,maxoutVO); LambdaQueryWrapper queryWrappers = new LambdaQueryWrapper<>(); queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());