会员等级

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

View File

@ -143,7 +143,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStoreId,transferDTO.getStoreId());
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,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());
//activeFullminusService.list()

View File

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