会员等级

This commit is contained in:
齐天大圣 2023-11-17 15:39:55 +08:00
parent 1d24fcfee2
commit 435e6feb10
4 changed files with 23 additions and 11 deletions

View File

@ -13,9 +13,11 @@ import com.fuint.business.marketingActivity.activeConsumption.service.ActiveCons
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionService; import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionService;
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVO; import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVO;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -38,6 +40,8 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
private StoreService storeService; private StoreService storeService;
@Resource @Resource
private ActiveConsumptionChildService activeConsumptionChildService; private ActiveConsumptionChildService activeConsumptionChildService;
@Autowired
private LJUserGradeService userGradeService;
/** /**
* 新增数据 * 新增数据
* @param activeConsumptionDTO * @param activeConsumptionDTO
@ -116,9 +120,12 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
.map(Integer::valueOf) .map(Integer::valueOf)
.toArray(Integer[]::new)); .toArray(Integer[]::new));
activeConsumptionVO.setActiveGift(s.getActiveGift().split(",")); activeConsumptionVO.setActiveGift(s.getActiveGift().split(","));
activeConsumptionVO.setDieselUserLevel(s.getDieselUserLevel().split(",")); //获取会员等级
activeConsumptionVO.setGasolineUserLevel(s.getGasolineUserLevel().split(",")); String str = "";
activeConsumptionVO.setNaturalUserLevel(s.getNaturalUserLevel().split(",")); for (String gradeId : s.getDieselUserLevel().split(",")) {
str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ",";
}
activeConsumptionVO.setDieselUserLevel(str.split(","));
activeConsumptionVO.setActiveConsumptionChildList(activeConsumptionChildList); activeConsumptionVO.setActiveConsumptionChildList(activeConsumptionChildList);
return activeConsumptionVO; return activeConsumptionVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());

View File

@ -16,9 +16,11 @@ import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscoun
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService; import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO; import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -41,6 +43,8 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
private StoreService storeService; private StoreService storeService;
@Resource @Resource
private ActiveDiscountChildService activeDiscountChildService; private ActiveDiscountChildService activeDiscountChildService;
@Autowired
private LJUserGradeService userGradeService;
/** /**
* 新增数据 * 新增数据
* @param activeDiscountDTO * @param activeDiscountDTO
@ -116,9 +120,12 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
activeDiscountVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(",")) activeDiscountVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
.map(Integer::valueOf) .map(Integer::valueOf)
.toArray(Integer[]::new)); .toArray(Integer[]::new));
activeDiscountVO.setDieselUserLevel(s.getDieselUserLevel().split(",")); //获取会员等级
activeDiscountVO.setGasolineUserLevel(s.getGasolineUserLevel().split(",")); String str = "";
activeDiscountVO.setNaturalUserLevel(s.getNaturalUserLevel().split(",")); for (String gradeId : s.getDieselUserLevel().split(",")) {
str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ",";
}
activeDiscountVO.setDieselUserLevel(str.split(","));
activeDiscountVO.setActiveDiscountChildList(activeDiscountChildList); activeDiscountVO.setActiveDiscountChildList(activeDiscountChildList);
return activeDiscountVO; return activeDiscountVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());

View File

@ -143,7 +143,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStoreId,transferDTO.getStoreId()); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStoreId,transferDTO.getStoreId());
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0);
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0);
//userGradeService.selectUserGradeById(transferDTO.getGradeId()).getGrade() //会员等级判断
fullminusLambdaQueryWrapper.in(ActiveFullminus::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId());
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getDieselUserLevel,transferDTO.getGradeId()); fullminusLambdaQueryWrapper.eq(ActiveFullminus::getDieselUserLevel,transferDTO.getGradeId());
//activeFullminusService.list() //activeFullminusService.list()

View File

@ -117,16 +117,12 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(",")) activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
.map(Integer::valueOf) .map(Integer::valueOf)
.toArray(Integer[]::new)); .toArray(Integer[]::new));
//userGradeService.selectUserGradeById(s.getAdaptOil())
//获取会员等级 //获取会员等级
String str = ""; String str = "";
for (String gradeId : s.getDieselUserLevel().split(",")) { for (String gradeId : s.getDieselUserLevel().split(",")) {
str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ","; str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ",";
} }
activeFullminusVO.setDieselUserLevel(str.split(",")); activeFullminusVO.setDieselUserLevel(str.split(","));
/*activeFullminusVO.setDieselUserLevel(s.getDieselUserLevel().split(","));
activeFullminusVO.setGasolineUserLevel(s.getGasolineUserLevel().split(","));
activeFullminusVO.setNaturalUserLevel(s.getNaturalUserLevel().split(","));*/
activeFullminusVO.setActiveDiscountChildList(activeDiscountChildList); activeFullminusVO.setActiveDiscountChildList(activeDiscountChildList);
return activeFullminusVO; return activeFullminusVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());