修改Bug
This commit is contained in:
parent
92251e2556
commit
916383fe82
@ -103,6 +103,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
if(ObjectUtils.isNotEmpty(activeConsumption.getIsonline())) {
|
||||
queryWrapper.eq(ActiveConsumption::getIsonline,activeConsumption.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveConsumption::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveConsumption::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -104,6 +104,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
||||
if(ObjectUtils.isNotEmpty(activeDiscount.getIsonline())) {
|
||||
queryWrapper.eq(ActiveDiscount::getIsonline,activeDiscount.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveDiscount::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.marketingActivity.activeExchange.service.impl;
|
||||
|
||||
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.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService;
|
||||
@ -156,20 +157,22 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0);
|
||||
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());
|
||||
List<ActiveFullminus> activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper);
|
||||
for (ActiveFullminus activeFullminus : activeFullminusList) {
|
||||
MaxoutVO maxoutVO = new MaxoutVO();
|
||||
BeanUtils.copyProperties(activeFullminus,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
if (activeFullminus.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){
|
||||
BeanUtils.copyProperties(activeFullminus,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
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::getStatus,0);
|
||||
discountLambdaQueryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
|
||||
//会员等级判断
|
||||
discountLambdaQueryWrapper.in(ActiveDiscount::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId());
|
||||
//符合油号判断
|
||||
discountLambdaQueryWrapper.in(ActiveDiscount::getAdaptOil,transferDTO.getOilName());
|
||||
List<ActiveDiscount> activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper);
|
||||
//获取兑换物品信息
|
||||
for (ActiveDiscount activeDiscount : activeDiscountList) {
|
||||
MaxoutVO maxoutVO = new MaxoutVO();
|
||||
BeanUtils.copyProperties(activeDiscount,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
|
||||
if (activeDiscount.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId()))){
|
||||
BeanUtils.copyProperties(activeDiscount,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
}
|
||||
}
|
||||
return maxoutVOArrayList;
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
||||
if(ObjectUtils.isNotEmpty(activeFullminus.getIsonline())) {
|
||||
queryWrapper.eq(ActiveFullminus::getIsonline,activeFullminus.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveFullminus::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveFullminus::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -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.ActiveDiscountChild;
|
||||
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.dto.ActiveNewlywedsDTO;
|
||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
||||
@ -90,6 +91,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
||||
if(ObjectUtils.isNotEmpty(activeNewlyweds.getIsonline())) {
|
||||
queryWrapper.eq(ActiveNewlyweds::getIsonline,activeNewlyweds.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveNewlyweds::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveNewlyweds::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
|
||||
|
@ -4,10 +4,12 @@ package com.fuint.business.marketingActivity.activeRecommend.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.entity.ActiveRecommend;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendChildService;
|
||||
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.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -46,6 +48,7 @@ public class ActiveRecommendController extends BaseController {
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardFuelDiesel") ActiveRecommend activeRecommend) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
activeRecommend.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
||||
return getSuccessResult(this.activeRecommendService.page(page, new QueryWrapper<>(activeRecommend)));
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ public class CardExchangeServiceImpl extends ServiceImpl<CardExchangeMapper, Car
|
||||
if(ObjectUtils.isNotEmpty(cardExchange.getIsonline())) {
|
||||
queryWrapper.eq(CardExchange::getIsonline,cardExchange.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardExchange::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardExchange::getCreateTime);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
if(ObjectUtils.isNotEmpty(cardFavorable.getIsonline())) {
|
||||
queryWrapper.eq(CardFavorable::getIsonline,cardFavorable.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardFavorable::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardFavorable::getCreateTime);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
|
||||
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.service.OilNameService;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
@ -68,7 +69,8 @@ public class CardFuelDieselController extends BaseController {
|
||||
if(ObjectUtils.isNotEmpty(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);
|
||||
List<CardFuelDiesel> records = page1.getRecords();
|
||||
//返回囤油卡状态
|
||||
|
@ -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.service.CardGiftService;
|
||||
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.ResponseObject;
|
||||
import com.fuint.utils.ObjectUtil;
|
||||
@ -61,7 +62,8 @@ public class CardGiftController extends BaseController {
|
||||
if(ObjectUtils.isNotEmpty(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));
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
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.entity.CardValue;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
||||
@ -65,6 +66,7 @@ public class CardValueController extends BaseController {
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
|
||||
queryWrapper.eq(CardValue::getIsonline,cardValue.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardValue::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardValue::getCreateTime);
|
||||
IPage page1 = this.cardValueService.page(page, queryWrapper);
|
||||
List<CardValue> records = page1.getRecords();
|
||||
|
Loading…
Reference in New Issue
Block a user