修改会员等级
This commit is contained in:
parent
d184f6cccd
commit
88053d1a20
@ -1,10 +1,9 @@
|
|||||||
package com.fuint.business.marketingActivity.activeExchange.controller;
|
package com.fuint.business.marketingActivity.activeExchange.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService;
|
import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
|
||||||
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;
|
||||||
@ -28,7 +27,7 @@ public class ActiveExchangeController extends BaseController {
|
|||||||
private ActiveExchangeService activeExchangeService;
|
private ActiveExchangeService activeExchangeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询所有数据
|
* 分页查询所有优惠券兑换券数据
|
||||||
* @param pageNo
|
* @param pageNo
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param cardExchangeRecord
|
* @param cardExchangeRecord
|
||||||
@ -53,5 +52,18 @@ public class ActiveExchangeController extends BaseController {
|
|||||||
return getSuccessResult(this.activeExchangeService.updateOneById(activeExchangeRecordDTO));
|
return getSuccessResult(this.activeExchangeService.updateOneById(activeExchangeRecordDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询满减活动
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param transferDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectConsumptionList")
|
||||||
|
public ResponseObject selectConsumptionList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
|
@Param("transferDTO") TransferDTO transferDTO) {
|
||||||
|
return getSuccessResult(this.activeExchangeService.selectConsumptionList(pageNo,pageSize, transferDTO));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeExchange.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class TransferDTO implements Serializable {
|
||||||
|
//所属店铺id
|
||||||
|
private Integer storeId;
|
||||||
|
//用户id
|
||||||
|
private Integer userId;
|
||||||
|
//会员等级id
|
||||||
|
private Integer gradeId;
|
||||||
|
//油号id
|
||||||
|
private Integer oilName;
|
||||||
|
//油品价格
|
||||||
|
private Double oilPrice;
|
||||||
|
//油品升数
|
||||||
|
private Double oilLiters;
|
||||||
|
|
||||||
|
public Integer getStoreId() {
|
||||||
|
return storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreId(Integer storeId) {
|
||||||
|
this.storeId = storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getGradeId() {
|
||||||
|
return gradeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGradeId(Integer gradeId) {
|
||||||
|
this.gradeId = gradeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOilName() {
|
||||||
|
return oilName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOilName(Integer oilName) {
|
||||||
|
this.oilName = oilName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getOilPrice() {
|
||||||
|
return oilPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOilPrice(Double oilPrice) {
|
||||||
|
this.oilPrice = oilPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getOilLiters() {
|
||||||
|
return oilLiters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOilLiters(Double oilLiters) {
|
||||||
|
this.oilLiters = oilLiters;
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
package com.fuint.business.marketingActivity.activeExchange.service;
|
package com.fuint.business.marketingActivity.activeExchange.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
||||||
import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO;
|
import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.vo.MaxoutVO;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,4 +23,13 @@ public interface ActiveExchangeService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean updateOneById(ActiveExchangeRecordDTO activeExchangeRecordDTO);
|
boolean updateOneById(ActiveExchangeRecordDTO activeExchangeRecordDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询满减活动
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param transferVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaxoutVO> selectConsumptionList(Integer pageNo, Integer pageSize, TransferDTO transferDTO);
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,23 @@ 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.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
|
||||||
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO;
|
||||||
import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService;
|
import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService;
|
||||||
import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO;
|
import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.vo.MaxoutVO;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullminus;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||||
|
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||||
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;
|
||||||
|
|
||||||
@ -29,9 +37,17 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private CardFavorableRecordService cardFavorableRecordService;
|
private CardFavorableRecordService cardFavorableRecordService;
|
||||||
|
@Resource
|
||||||
|
private ActiveDiscountService activeDiscountService;
|
||||||
|
@Resource
|
||||||
|
private ActiveDiscountChildService activeDiscountChildService;
|
||||||
|
@Resource
|
||||||
|
private ActiveFullminusService activeFullminusService;
|
||||||
|
@Autowired
|
||||||
|
private LJUserGradeService userGradeService;
|
||||||
/**
|
/**
|
||||||
* 分页查询所有
|
* 分页查询所有
|
||||||
* @param page
|
* @param
|
||||||
* @param cardExchangeRecord
|
* @param cardExchangeRecord
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -119,4 +135,18 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
}
|
}
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MaxoutVO> selectConsumptionList(Integer pageNo, Integer pageSize, TransferDTO transferDTO) {
|
||||||
|
//构造满减券查询条件
|
||||||
|
LambdaQueryWrapper<ActiveFullminus> fullminusLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStoreId,transferDTO.getStoreId());
|
||||||
|
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0);
|
||||||
|
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0);
|
||||||
|
//userGradeService.selectUserGradeById(transferDTO.getGradeId()).getGrade()
|
||||||
|
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getDieselUserLevel,transferDTO.getGradeId());
|
||||||
|
|
||||||
|
//activeFullminusService.list()
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeExchange.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MaxoutVO implements Serializable {
|
||||||
|
//主键id
|
||||||
|
private Integer id;
|
||||||
|
//活动名称
|
||||||
|
private String name;
|
||||||
|
//参与条件 0:不限制 1:优惠订单不参与
|
||||||
|
private String participationCondition;
|
||||||
|
//参与次数类别0:不限制 1:限制
|
||||||
|
private String participationAcount;
|
||||||
|
//限制次数
|
||||||
|
private Integer limitAcount;
|
||||||
|
//满减折扣集合
|
||||||
|
private List<ActiveDiscountChild> activeDiscountChildList;
|
||||||
|
//创建者
|
||||||
|
private String createBy;
|
||||||
|
//创建时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
//更新者
|
||||||
|
private String updateBy;
|
||||||
|
//更新时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParticipationCondition() {
|
||||||
|
return participationCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParticipationCondition(String participationCondition) {
|
||||||
|
this.participationCondition = participationCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParticipationAcount() {
|
||||||
|
return participationAcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParticipationAcount(String participationAcount) {
|
||||||
|
this.participationAcount = participationAcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimitAcount() {
|
||||||
|
return limitAcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimitAcount(Integer limitAcount) {
|
||||||
|
this.limitAcount = limitAcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ActiveDiscountChild> getActiveDiscountChildList() {
|
||||||
|
return activeDiscountChildList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveDiscountChildList(List<ActiveDiscountChild> activeDiscountChildList) {
|
||||||
|
this.activeDiscountChildList = activeDiscountChildList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(String updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
@ -15,9 +15,11 @@ import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullmin
|
|||||||
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
||||||
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO;
|
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO;
|
||||||
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 javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -39,6 +41,8 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
|||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
@Resource
|
@Resource
|
||||||
private ActiveDiscountChildService activeDiscountChildService;
|
private ActiveDiscountChildService activeDiscountChildService;
|
||||||
|
@Autowired
|
||||||
|
private LJUserGradeService userGradeService;
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
* @param activeFullminusDTO
|
* @param activeFullminusDTO
|
||||||
@ -113,9 +117,16 @@ 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));
|
||||||
activeFullminusVO.setDieselUserLevel(s.getDieselUserLevel().split(","));
|
//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.setGasolineUserLevel(s.getGasolineUserLevel().split(","));
|
||||||
activeFullminusVO.setNaturalUserLevel(s.getNaturalUserLevel().split(","));
|
activeFullminusVO.setNaturalUserLevel(s.getNaturalUserLevel().split(","));*/
|
||||||
activeFullminusVO.setActiveDiscountChildList(activeDiscountChildList);
|
activeFullminusVO.setActiveDiscountChildList(activeDiscountChildList);
|
||||||
return activeFullminusVO;
|
return activeFullminusVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
Loading…
Reference in New Issue
Block a user