修改Bug

This commit is contained in:
齐天大圣 2023-11-22 13:39:57 +08:00
parent efaf87cb3e
commit 9da6684bf0

View File

@ -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<ActiveFullminus> 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<ActiveDiscountChild> 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<ActiveDiscount> 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<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());