修改Bug

This commit is contained in:
齐天大圣 2023-11-22 10:47:20 +08:00
parent 92251e2556
commit 916383fe82
11 changed files with 41 additions and 21 deletions

View File

@ -103,6 +103,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
if(ObjectUtils.isNotEmpty(activeConsumption.getIsonline())) { if(ObjectUtils.isNotEmpty(activeConsumption.getIsonline())) {
queryWrapper.eq(ActiveConsumption::getIsonline,activeConsumption.getIsonline()); queryWrapper.eq(ActiveConsumption::getIsonline,activeConsumption.getIsonline());
} }
queryWrapper.eq(ActiveConsumption::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(ActiveConsumption::getCreateTime); queryWrapper.orderByDesc(ActiveConsumption::getCreateTime);
IPage page1 = page(page, queryWrapper); IPage page1 = page(page, queryWrapper);
//会员等级 //会员等级

View File

@ -104,6 +104,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
if(ObjectUtils.isNotEmpty(activeDiscount.getIsonline())) { if(ObjectUtils.isNotEmpty(activeDiscount.getIsonline())) {
queryWrapper.eq(ActiveDiscount::getIsonline,activeDiscount.getIsonline()); queryWrapper.eq(ActiveDiscount::getIsonline,activeDiscount.getIsonline());
} }
queryWrapper.eq(ActiveDiscount::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(ActiveDiscount::getCreateTime); queryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
IPage page1 = page(page, queryWrapper); IPage page1 = page(page, queryWrapper);
//会员等级 //会员等级

View File

@ -1,6 +1,7 @@
package com.fuint.business.marketingActivity.activeExchange.service.impl; package com.fuint.business.marketingActivity.activeExchange.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService; import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService;
@ -156,20 +157,22 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0);
fullminusLambdaQueryWrapper.orderByDesc(ActiveFullminus::getCreateTime); fullminusLambdaQueryWrapper.orderByDesc(ActiveFullminus::getCreateTime);
//会员等级判断 //会员等级判断
fullminusLambdaQueryWrapper.in(ActiveFullminus::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()); Integer id = userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId();
//符合油号判断 //符合油号判断
fullminusLambdaQueryWrapper.in(ActiveFullminus::getAdaptOil,transferDTO.getOilName()); fullminusLambdaQueryWrapper.in(ActiveFullminus::getAdaptOil,transferDTO.getOilName());
List<ActiveFullminus> activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper); List<ActiveFullminus> activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper);
for (ActiveFullminus activeFullminus : activeFullminusList) { for (ActiveFullminus activeFullminus : activeFullminusList) {
MaxoutVO maxoutVO = new MaxoutVO(); MaxoutVO maxoutVO = new MaxoutVO();
BeanUtils.copyProperties(activeFullminus,maxoutVO); if (activeFullminus.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>(); BeanUtils.copyProperties(activeFullminus,maxoutVO);
queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId()); LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
//判断符合金额 queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId());
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters()); //判断符合金额
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount); queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers)); queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
maxoutVOArrayList.add(maxoutVO); maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
maxoutVOArrayList.add(maxoutVO);
}
} }
//构造折扣券查询条件 //构造折扣券查询条件
@ -178,22 +181,23 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
discountLambdaQueryWrapper.eq(ActiveDiscount::getIsonline,0); discountLambdaQueryWrapper.eq(ActiveDiscount::getIsonline,0);
discountLambdaQueryWrapper.eq(ActiveDiscount::getStatus,0); discountLambdaQueryWrapper.eq(ActiveDiscount::getStatus,0);
discountLambdaQueryWrapper.orderByDesc(ActiveDiscount::getCreateTime); discountLambdaQueryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
//会员等级判断
discountLambdaQueryWrapper.in(ActiveDiscount::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId());
//符合油号判断 //符合油号判断
discountLambdaQueryWrapper.in(ActiveDiscount::getAdaptOil,transferDTO.getOilName()); discountLambdaQueryWrapper.in(ActiveDiscount::getAdaptOil,transferDTO.getOilName());
List<ActiveDiscount> activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper); List<ActiveDiscount> activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper);
//获取兑换物品信息 //获取兑换物品信息
for (ActiveDiscount activeDiscount : activeDiscountList) { for (ActiveDiscount activeDiscount : activeDiscountList) {
MaxoutVO maxoutVO = new MaxoutVO(); MaxoutVO maxoutVO = new MaxoutVO();
BeanUtils.copyProperties(activeDiscount,maxoutVO);
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>(); if (activeDiscount.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId()); BeanUtils.copyProperties(activeDiscount,maxoutVO);
//判断符合金额 LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters()); queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount); //判断符合金额
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers)); queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
maxoutVOArrayList.add(maxoutVO); queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
maxoutVOArrayList.add(maxoutVO);
}
} }
return maxoutVOArrayList; return maxoutVOArrayList;
} }

View File

@ -101,6 +101,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
if(ObjectUtils.isNotEmpty(activeFullminus.getIsonline())) { if(ObjectUtils.isNotEmpty(activeFullminus.getIsonline())) {
queryWrapper.eq(ActiveFullminus::getIsonline,activeFullminus.getIsonline()); queryWrapper.eq(ActiveFullminus::getIsonline,activeFullminus.getIsonline());
} }
queryWrapper.eq(ActiveFullminus::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(ActiveFullminus::getCreateTime); queryWrapper.orderByDesc(ActiveFullminus::getCreateTime);
IPage page1 = page(page, queryWrapper); IPage page1 = page(page, queryWrapper);
//会员等级 //会员等级

View File

@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO; import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullminus;
import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO; import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO;
import com.fuint.business.marketingActivity.activeNewlyweds.dto.ActiveNewlywedsDTO; import com.fuint.business.marketingActivity.activeNewlyweds.dto.ActiveNewlywedsDTO;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild; import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
@ -90,6 +91,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
if(ObjectUtils.isNotEmpty(activeNewlyweds.getIsonline())) { if(ObjectUtils.isNotEmpty(activeNewlyweds.getIsonline())) {
queryWrapper.eq(ActiveNewlyweds::getIsonline,activeNewlyweds.getIsonline()); queryWrapper.eq(ActiveNewlyweds::getIsonline,activeNewlyweds.getIsonline());
} }
queryWrapper.eq(ActiveNewlyweds::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(ActiveNewlyweds::getCreateTime); queryWrapper.orderByDesc(ActiveNewlyweds::getCreateTime);
IPage page1 = page(page, queryWrapper); IPage page1 = page(page, queryWrapper);

View File

@ -4,10 +4,12 @@ package com.fuint.business.marketingActivity.activeRecommend.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendDTO; import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendDTO;
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommend; import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommend;
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendChildService; import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendChildService;
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService; import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -46,6 +48,7 @@ public class ActiveRecommendController extends BaseController {
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") ActiveRecommend activeRecommend) { @Param("cardFuelDiesel") ActiveRecommend activeRecommend) {
Page page = new Page(pageNo, pageSize); Page page = new Page(pageNo, pageSize);
activeRecommend.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
return getSuccessResult(this.activeRecommendService.page(page, new QueryWrapper<>(activeRecommend))); return getSuccessResult(this.activeRecommendService.page(page, new QueryWrapper<>(activeRecommend)));
} }

View File

@ -74,6 +74,7 @@ public class CardExchangeServiceImpl extends ServiceImpl<CardExchangeMapper, Car
if(ObjectUtils.isNotEmpty(cardExchange.getIsonline())) { if(ObjectUtils.isNotEmpty(cardExchange.getIsonline())) {
queryWrapper.eq(CardExchange::getIsonline,cardExchange.getIsonline()); queryWrapper.eq(CardExchange::getIsonline,cardExchange.getIsonline());
} }
queryWrapper.eq(CardExchange::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(CardExchange::getCreateTime); queryWrapper.orderByDesc(CardExchange::getCreateTime);
return page(page, queryWrapper); return page(page, queryWrapper);
} }

View File

@ -89,6 +89,7 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
if(ObjectUtils.isNotEmpty(cardFavorable.getIsonline())) { if(ObjectUtils.isNotEmpty(cardFavorable.getIsonline())) {
queryWrapper.eq(CardFavorable::getIsonline,cardFavorable.getIsonline()); queryWrapper.eq(CardFavorable::getIsonline,cardFavorable.getIsonline());
} }
queryWrapper.eq(CardFavorable::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(CardFavorable::getCreateTime); queryWrapper.orderByDesc(CardFavorable::getCreateTime);
return page(page, queryWrapper); return page(page, queryWrapper);
} }

View File

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService; import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import com.fuint.business.petrolStationManagement.entity.OilName; import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.service.OilNameService; import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
@ -68,7 +69,8 @@ public class CardFuelDieselController extends BaseController {
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getType())) { if(ObjectUtils.isNotEmpty(cardFuelDiesel.getType())) {
queryWrapper.eq(CardFuelDiesel::getType,cardFuelDiesel.getType()); queryWrapper.eq(CardFuelDiesel::getType,cardFuelDiesel.getType());
} }
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime); queryWrapper.eq(CardFuelDiesel::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime);
IPage page1 = this.cardFuelDieselService.page(page, queryWrapper); IPage page1 = this.cardFuelDieselService.page(page, queryWrapper);
List<CardFuelDiesel> records = page1.getRecords(); List<CardFuelDiesel> records = page1.getRecords();
//返回囤油卡状态 //返回囤油卡状态

View File

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift; import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import com.fuint.business.marketingActivity.cardGift.service.CardGiftService; import com.fuint.business.marketingActivity.cardGift.service.CardGiftService;
import com.fuint.business.marketingActivity.cardValue.entity.CardValue; import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import com.fuint.utils.ObjectUtil; import com.fuint.utils.ObjectUtil;
@ -61,7 +62,8 @@ public class CardGiftController extends BaseController {
if(ObjectUtils.isNotEmpty(cardGift.getStatus())) { if(ObjectUtils.isNotEmpty(cardGift.getStatus())) {
queryWrapper.eq(CardGift::getStatus,cardGift.getStatus()); queryWrapper.eq(CardGift::getStatus,cardGift.getStatus());
} }
queryWrapper.orderByDesc(CardGift::getCreateTime); queryWrapper.eq(CardGift::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(CardGift::getCreateTime);
return getSuccessResult(this.cardGiftService.page(page, queryWrapper)); return getSuccessResult(this.cardGiftService.page(page, queryWrapper));
} }

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO; import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValue; import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
@ -65,6 +66,7 @@ public class CardValueController extends BaseController {
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){ if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
queryWrapper.eq(CardValue::getIsonline,cardValue.getIsonline()); queryWrapper.eq(CardValue::getIsonline,cardValue.getIsonline());
} }
queryWrapper.eq(CardValue::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.orderByDesc(CardValue::getCreateTime); queryWrapper.orderByDesc(CardValue::getCreateTime);
IPage page1 = this.cardValueService.page(page, queryWrapper); IPage page1 = this.cardValueService.page(page, queryWrapper);
List<CardValue> records = page1.getRecords(); List<CardValue> records = page1.getRecords();